Actually, this is unlikely because there was locking for image fetching already. This patch only adds it for case when several compute processes share same $instances_dir. <br><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">- disk full really might be the case. Simple check is to extend available space and try to reproduce it again.</span><br>
<br><div class="gmail_quote">2012/9/25 Wangpan <span dir="ltr"><<a href="mailto:hzwangpan@corp.netease.com" target="_blank">hzwangpan@corp.netease.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<u></u>







<div style="LINE-HEIGHT:1.3;BORDER-RIGHT-WIDTH:0px;MARGIN:12px;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px" marginheight="0" marginwidth="0">
<div><font face="Verdana">Thanks for your clue.</font></div>
<div><font face="Verdana">yes, the occured condition of my issue is the 
same as BUG <u>1014227</u>, but the difference is that my instance directory is 
NOT shared between compute nodes,</font></div>
<div><font face="Verdana">the instances' images are saved in local disk on compute 
nodes.</font></div>
<div><font face="Verdana">I believe the bug Boris found may occur in NOT shared 
storage circumstance as mine, and my issue may be resloved by this patch which 
adds a lock to cache image method.</font></div>
<div><font face="Verdana">Thanks again.<br></font></div>
<div> </div>
<div align="left"><font color="#c0c0c0" face="Verdana">2012-09-25</font></div>
<div align="left"><font face="Verdana">
<hr style="WIDTH:122px;min-height:2px" align="left" size="2"><span class="HOEnZb"><font color="#888888">
</font></span></font></div><span class="HOEnZb"><font color="#888888">
<div align="left"><font color="#c0c0c0" face="Verdana"><span>Wangpan</span></font></div>
<div><font face="Verdana">
<hr>
</font></div>
<div><font face="Verdana"><strong>发件人:</strong>Boris Filippov</font></div>
<div><font face="Verdana"><strong>发送时间:</strong>2012-09-24 19:59</font></div>
<div><font face="Verdana"><strong>主题:</strong>Re: [Openstack] [Nova] Got 
'qemu-img: error while writing sector 634880: Input/output error' in 
_create_image</font></div>
<div><font face="Verdana"><strong>收件人:</strong>"Razique 
Mahroua"<<a href="mailto:razique.mahroua@gmail.com" target="_blank">razique.mahroua@gmail.com</a>></font></div>
<div><font face="Verdana"><strong>抄送:</strong>"Wangpan"<<a href="mailto:hzwangpan@corp.netease.com" target="_blank">hzwangpan@corp.netease.com</a>>,"openstack"<<a href="mailto:openstack@lists.launchpad.net" target="_blank">openstack@lists.launchpad.net</a>></font></div>
</font></span><div><div class="h5">
<div><font face="Verdana"></font> </div>
<div><font face="Verdana">Your instance directory is shared between compute 
nodes?<br>Similar issue was fixed for folsom-rc1 <br><a href="https://review.openstack.org/#/c/12024/" target="_blank">https://review.openstack.org/#/c/12024/</a><br>
<div class="gmail_quote"><a href="https://bugs.launchpad.net/nova/+bug/1014227" target="_blank">https://bugs.launchpad.net/nova/+bug/1014227</a><br><br><br>2012/9/24 
Razique Mahroua <span dir="ltr"><<a href="mailto:razique.mahroua@gmail.com" target="_blank">razique.mahroua@gmail.com</a>></span><br>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">
  <div style="WORD-WRAP:break-word">Here is what I found
  <div><a href="http://comments.gmane.org/gmane.comp.emulators.qemu/153254" target="_blank">http://comments.gmane.org/gmane.comp.emulators.qemu/153254</a></div>
  <div><a href="http://osdir.com/ml/qemu-devel/2012-05/msg04234.html" target="_blank">http://osdir.com/ml/qemu-devel/2012-05/msg04234.html</a></div>
  <div><br></div>
  <div>What do you think ?</div>
  <div><br></div>
  <div>
  <div>
  <div><span style="BORDER-SPACING:0px;BORDER-COLLAPSE:separate;FONT-FAMILY:'Lucida Grande'"><span style="FONT-FAMILY:Helvetica"><span style="FONT-FAMILY:Helvetica"><b style="COLOR:rgb(19,112,138)">Nuage & Co - Razique 
  Mahroua</b></span><span style="FONT-FAMILY:Helvetica;COLOR:rgb(19,112,138)"><b> </b></span><span style="LINE-HEIGHT:normal;TEXT-TRANSFORM:none;FONT-VARIANT:normal;FONT-STYLE:normal;TEXT-INDENT:0px;BORDER-COLLAPSE:separate;FONT-FAMILY:Helvetica;WHITE-SPACE:normal;LETTER-SPACING:normal;FONT-SIZE:medium;WORD-SPACING:0px"><span style="LINE-HEIGHT:normal;TEXT-TRANSFORM:none;FONT-VARIANT:normal;TEXT-INDENT:0px;BORDER-COLLAPSE:separate;WHITE-SPACE:normal;LETTER-SPACING:normal;WORD-SPACING:0px"><span style="LINE-HEIGHT:normal;TEXT-TRANSFORM:none;FONT-VARIANT:normal;TEXT-INDENT:0px;BORDER-COLLAPSE:separate;WHITE-SPACE:normal;LETTER-SPACING:normal;WORD-SPACING:0px">
  <div style="FONT-STYLE:normal;FONT-FAMILY:Helvetica;FONT-SIZE:medium;FONT-WEIGHT:normal"><font color="#13708a"><a href="mailto:razique.mahroua@gmail.com" target="_blank">razique.mahroua@gmail.com</a></font></div></span><br>
<span></span><span style="FONT-STYLE:normal;FONT-FAMILY:Helvetica;FONT-SIZE:medium;FONT-WEIGHT:normal"></span><span style="FONT-WEIGHT:normal"></span></span><span><img width="125" height="125"></span> </span></span></span></div>
<br></div>
  <div>
  <div>Le 24 sept. 2012 à 10:43, Wangpan <<a href="mailto:hzwangpan@corp.netease.com" target="_blank">hzwangpan@corp.netease.com</a>> a écrit :</div><br>
  <blockquote type="cite">
    <div style="BORDER-RIGHT-WIDTH:0px;TEXT-TRANSFORM:none;TEXT-INDENT:0px;MARGIN:12px;FONT:12pt/1.3 宋体,serif;WHITE-SPACE:normal;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;LETTER-SPACING:normal;BORDER-LEFT-WIDTH:0px;WORD-SPACING:0px" marginheight="0" marginwidth="0">

    <div>
    <div><font size="3" face="宋体">qemu-img check -f qcow2 test.qcow2<br>No errors 
    were found on the image.</font></div>
    <div> </div>
    <div align="left"><font color="#c0c0c0" face="Verdana">2012-09-24</font></div>
    <div align="left"><font face="Verdana">
    <hr style="MIN-HEIGHT:2px;WIDTH:122px" align="left" size="2">
    </font></div>
    <div align="left"><font color="#c0c0c0" face="Verdana">Wangpan</font></div>
    <div><font face="Verdana">
    <hr>
    </font></div>
    <div><font face="Verdana"><strong>发件人:</strong>Razique Mahroua</font></div>
    <div><font face="Verdana"><strong>发送时间:</strong>2012-09-24 16:30</font></div>
    <div><font face="Verdana"><strong>主题:</strong>Re: Re: [Openstack] [Nova] Got 
    'qemu-img: error while writing sector 634880: Input/output error' in 
    _create_image</font></div>
    <div><font face="Verdana"><strong>收件人:</strong>"Wangpan"<<a href="mailto:hzwangpan@corp.netease.com" target="_blank">hzwangpan@corp.netease.com</a>></font></div>
    <div><font face="Verdana"><strong>抄送:</strong>"openstack"<<a href="mailto:openstack@lists.launchpad.net" target="_blank">openstack@lists.launchpad.net</a>></font></div>
    <div><font face="Verdana"></font> </div></div>
    <div><font face="Verdana">
    <div>hi, 
    <div>what about a </div>
    <div>qemu-img check -f qcow2 test.qcow2</div>
    <div><br></div></div>
    <div><br>
    <div><span style="TEXT-TRANSFORM:none;TEXT-INDENT:0px;BORDER-SPACING:0px;BORDER-COLLAPSE:separate;FONT:medium 'Lucida Grande';WHITE-SPACE:normal;LETTER-SPACING:normal;WORD-SPACING:0px"><span style="FONT-FAMILY:Helvetica">
    <div><span style="FONT-FAMILY:Helvetica"><b style="COLOR:rgb(19,112,138)">Nuage & Co - Razique 
    Mahroua</b></span><span style="FONT-FAMILY:Helvetica;COLOR:rgb(19,112,138)"><b> </b></span></div><span style="LINE-HEIGHT:normal;TEXT-TRANSFORM:none;FONT-VARIANT:normal;FONT-STYLE:normal;TEXT-INDENT:0px;BORDER-SPACING:0px;BORDER-COLLAPSE:separate;FONT-FAMILY:Helvetica;WHITE-SPACE:normal;LETTER-SPACING:normal;FONT-SIZE:medium;WORD-SPACING:0px"><span style="LINE-HEIGHT:normal;TEXT-TRANSFORM:none;FONT-VARIANT:normal;TEXT-INDENT:0px;BORDER-SPACING:0px;BORDER-COLLAPSE:separate;WHITE-SPACE:normal;LETTER-SPACING:normal;WORD-SPACING:0px"><span style="LINE-HEIGHT:normal;TEXT-TRANSFORM:none;FONT-VARIANT:normal;TEXT-INDENT:0px;BORDER-SPACING:0px;BORDER-COLLAPSE:separate;WHITE-SPACE:normal;LETTER-SPACING:normal;WORD-SPACING:0px">
    <div style="FONT-STYLE:normal;FONT-FAMILY:Helvetica;FONT-SIZE:medium;FONT-WEIGHT:normal"><font color="#13708a"><a href="mailto:razique.mahroua@gmail.com" target="_blank">razique.mahroua@gmail.com</a></font></div></span><br>
<span></span><span style="FONT-STYLE:normal;FONT-FAMILY:Helvetica;FONT-SIZE:medium;FONT-WEIGHT:normal"></span><span style="FONT-WEIGHT:normal"></span></span><span><span><NUAGECO-LOGO-Fblan_petit(1).jpg></span></span></span></span></span></div>

    <div><br>
    <div>
    <div>Le 24 sept. 2012 à 10:19, "Wangpan"<<a href="mailto:hzwangpan@corp.netease.com" target="_blank">hzwangpan@corp.netease.com</a>> a écrit :</div><br>
    <blockquote type="cite">Thanks for your attention!<br><br>- disk full 
       ----# I believe there is enough space, because I have tried to boot 
      serveral instances after this error with the same image, they are all 
      booted successfully.<br>- permission issues    ----# Not 
      this reason, too. explain as above.<br><br>I still believe this is a race 
      problem, if we convert to image from qcow2 to raw at a short interval, one 
      of the convertion may fail,<span> </span><br>I have verified this by 
      running two same commands continuously such as:<br>qemu-img convert -f 
      qcow2 -O raw  test.qcow2 test.part &<br>and one of them give me 
      the same error:<br>qemu-img: error while writing sector 1052672: 
      Input/output 
  error</blockquote></div></div></div></font></div></div></blockquote></div><br></div></div><br>_______________________________________________<br>Mailing 
  list: <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>Post to     : 
  <a href="mailto:openstack@lists.launchpad.net" target="_blank">openstack@lists.launchpad.net</a><br>Unsubscribe 
  : <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>More help   : <a href="https://help.launchpad.net/ListHelp" target="_blank">https://help.launchpad.net/ListHelp</a><br>
<br></blockquote></div><br></font></div></div></div></div></blockquote></div><br>