[Libguestfs] Using guestfs.kill_subprocess()

Chris Lalancette clalancette at gmail.com
Fri Nov 4 01:41:40 UTC 2011


Hey Rich,
     In the past I know you have mentioned that using
guestfs.kill_subprocess() isn't strictly necessary after you are finished
using libguestfs.  I believe you said that in the python bindings, that
step would happen automatically when the object goes out of scope and the
__del__ method is called.  However, since it never seemed to harm anything
and I wanted to be extra safe, I always called guestfs.kill_subprocess() in
Oz, without apparent harm.
     However, Richard Su has been investigating an issue where
guestfs.kill_subprocess() actually does cause harm.  I believe the
situation is that running Oz (and hence libguestfs) simultaneously from two
threads in the same process causes the entire process to hang.  If we
remove the guestfs.kill_subprocess(), the problem goes away.  rwsu, can you
please fill in a bit more detail here, as I'm not intimately familiar with
the issue?  Things like host OS, libguestfs version, etc etc would be
helpful.  Also confirmation that the problem is indeed in the
multi-threaded environment of the image factory like I think it is.
     rjones, do you have any ideas here?  I'm going to merge rwsu's patch
to remove the call to kill_subprocess(), but I thought it would be worth a
little more digging into why it was happening.

Thanks,
Chris Lalancette
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20111103/3feda05e/attachment.htm>


More information about the Libguestfs mailing list