Re: [PATCH] command: avoid deadlock on EPIPE situation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/02/2012 02:12 AM, Michal Privoznik wrote:
> On 01.06.2012 17:41, Eric Blake wrote:
>> It is possible to deadlock libvirt by having a domain with XML
>> longer than PIPE_BUF, and by writing a hook script that closes
>> stdin early.  This is because libvirt was keeping a copy of the
>> child's stdin read fd open, which means the write fd in the
>> parent will never see EPIPE (remember, libvirt should always be
>> run with SIGPIPE ignored, so we should never get a SIGPIPE signal).
>> Since there is no error, libvirt blocks waiting for a write to
>> complete, even though the only reader is also libvirt.  The
>> solution is to ensure that only the child can act as a reader
>> before the parent does any writes; and then dealing with the
>> fallout of dealing with EPIPE.
>>

> 
> So we have now covered this case in tests. Awesome.
> 
> ACK

Thanks; pushed.

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]