Re: heisenbug in command.c

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

 



On 03/16/2012 10:36 AM, Serge Hallyn wrote:
> Hi,
> 
> It seems I've run into quite the heisenbug, reported at
> https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/922628
> 
> It manifests itself as virPidWait returning status=4 for iptables (which
> should never exit with status=4).

Maybe iptables isn't documented as exiting with $? of 4, but that's what
is happening.  The libvirt code in question is quite clear that it
grabbed an accurate exit status from the child process.

    ret = virPidWait(cmd->pid, exitstatus ? exitstatus : &status);
    if (ret == 0) {
        cmd->pid = -1;
        cmd->reap = false;
        if (status) {
            char *str = virCommandToString(cmd);
            char *st = virCommandTranslateStatus(status);
            virCommandError(VIR_ERR_INTERNAL_ERROR,
                            _("Child process (%s) status unexpected: %s"),
                            str ? str : cmd->args[0], NULLSTR(st));

>  But it's only been seen on two (very
> different) machines, and the slightest shifting of the winds makes it go
> away.  Given how sneaky this bug appears to be, there's a slight
> temptation to have iptablesAddRemoveRule pass in a int* for status and
> better deal with the -EINTR.  But I fear that might be papering over a
> worse race.

I don't follow how you think there is a -EINTR being encountered in
libvirt.  I think you'd be better off investigating why iptables really
is exiting with status 4.

-- 
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]