<html><head><meta http-equiv="content-type" content="text/html; charset=us-ascii"><style>body { line-height: 1.5; }blockquote { margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em; }div.foxdiv20140604110125689734 { }body { font-size: 10.5pt; font-family: Tahoma; color: rgb(0, 0, 0); line-height: 1.5; }</style></head><body>
<div><span></span>Hi Qin Zhao,</div><div><br></div><div><span style="font-size: 10.5pt; line-height: 1.5; background-color: window;">Thanks for raising this issue and analysis. </span>According to the issue description and happen scenario(<a href="https://docs.google.com/drawings/d/1pItX9urLd6fmjws3BVovXQvRg_qMdTHS-0JhYfSkkVc/pub?w=960&h=720" style="font-size: 10.5pt; line-height: 1.5; background-color: window;">https://docs.google.com/drawings/d/1pItX9urLd6fmjws3BVovXQvRg_qMdTHS-0JhYfSkkVc/pub?w=960&h=720</a>)<span style="font-size: 10.5pt; line-height: 1.5; background-color: window;">, </span><span style="background-color: window; font-size: 10.5pt; line-height: 1.5;">if that's the case, concurrent mutiple KVM spawn instances(</span><b style="font-size: 10.5pt; line-height: 1.5;">with both config drive and data injection enabled</b><span style="background-color: window; font-size: 10.5pt; line-height: 1.5;">) are triggered, the issue can be very likely to happen. </span></div><div>As in libvirt/driver.py <span style="background-color: rgba(0, 0, 0, 0); font-size: 10.5pt; line-height: 1.5;">_create_image method</span><span style="font-size: 10.5pt; line-height: 1.5; background-color: window;">, right after iso making "</span><span style="font-size: 10.5pt; line-height: 1.5; background-color: rgba(0, 0, 0, 0);">cdb.make_drive", the driver will attempt "data injection" which will call the libguestfs launch in another thread. </span></div><div><span style="background-color: window; font-size: 10.5pt; line-height: 1.5;"><br></span></div><div><span style="background-color: window; font-size: 10.5pt; line-height: 1.5;">Looks there were also a couple of libguestfs hang issues from Launch pad as below. . I am not sure if libguestfs itself can have certain mechanism to free/close the fds that inherited from parent process instead of require explicitly calling the tear down. Maybe open a defect to libguestfs to see what their thoughts? </span></div><div><span style="background-color: window; font-size: 10.5pt; line-height: 1.5;"><br></span></div><div><div><span style="background-color: rgba(0, 0, 0, 0);">https://bugs.launchpad.net/nova/+bug/1286256</span></div><span style="background-color: rgba(0, 0, 0, 0);"></span></div><div><a href="https://bugs.launchpad.net/nova/+bug/1270304" style="font-size: 10.5pt; line-height: 1.5; background-color: window;">https://bugs.launchpad.net/nova/+bug/1270304</a><span style="font-size: 10.5pt; line-height: 1.5; background-color: rgba(0, 0, 0, 0);"> </span></div><div><br></div>
<hr style="WIDTH: 210px; HEIGHT: 1px" align="left" color="#b5c4df" size="1">
<div><span><div style="MARGIN: 10px; FONT-FAMILY: verdana; FONT-SIZE: 10pt"><div>Zhu Zhu</div><div>Best Regards</div></div></span></div><blockquote style="margin-top: 0px; margin-bottom: 0px; margin-left: 2em;"><div> </div><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm"><div style="PADDING-RIGHT: 8px; PADDING-LEFT: 8px; FONT-SIZE: 12px;FONT-FAMILY:tahoma;COLOR:#000000; BACKGROUND: #efefef; PADDING-BOTTOM: 8px; PADDING-TOP: 8px"><div><b>From:</b> <a href="mailto:chaochin@gmail.com">Qin Zhao</a></div><div><b>Date:</b> 2014-05-31 01:25</div><div><b>To:</b> <a href="mailto:openstack-dev@lists.openstack.org">OpenStack Development Mailing List (not for usage questions)</a></div><div><b>Subject:</b> [openstack-dev] [Nova] nova-compute deadlock</div></div></div><div><div class="FoxDiv20140604110125689734"><div dir="ltr"><div><div>Hi all,<br><br></div>When I run Icehouse code, I encountered a strange problem. The nova-compute service becomes stuck, when I boot instances. I report this bug in <a href="https://bugs.launchpad.net/nova/+bug/1313477">https://bugs.launchpad.net/nova/+bug/1313477</a>.<br>
<br></div>After thinking several days, I feel I know its root cause. This bug should be a deadlock problem cause by pipe fd leaking. I draw a diagram to illustrate this problem. <a href="https://docs.google.com/drawings/d/1pItX9urLd6fmjws3BVovXQvRg_qMdTHS-0JhYfSkkVc/pub?w=960&h=720">https://docs.google.com/drawings/d/1pItX9urLd6fmjws3BVovXQvRg_qMdTHS-0JhYfSkkVc/pub?w=960&h=720</a><br clear="all">
<div><div><div><div><div><br></div><div>However, I have not find a very good solution to prevent this deadlock. This problem is related with Python runtime, libguestfs, and eventlet. The situation is a little complicated. Is there any expert who can help me to look for a solution? I will appreciate for your help!<br>
</div><div><br>-- <br><div dir="ltr">Qin Zhao<br></div>
</div></div></div></div></div></div>
</div></div></blockquote>
</body></html>