upstart job state switched to running before the sock file created

Bug #1455608 reported by Liang Chen
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libvirt (Ubuntu)
Fix Released
High
Edward Hope-Morley
Trusty
Fix Released
High
Edward Hope-Morley
Utopic
Fix Released
High
Edward Hope-Morley
Vivid
Fix Released
High
Edward Hope-Morley
Wily
Fix Released
High
Edward Hope-Morley

Bug Description

[Impact]

 * Dependent upstart services fail to start because they cannot connect to libvirt through the sock file

[Test Case]

 * This is a race, and can sometimes be hit by stopping libvirt-bin and the dependent upstart services, and restarting them again.

[Regression Potential]

 * None

Dependent services get kicked off before libvirtd is really ready for serving incoming requests - the libvirt-sock sock file hasn't been created.

Liang Chen (cbjchen)
Changed in libvirt (Ubuntu):
assignee: nobody → Liang Chen (cbjchen)
status: New → In Progress
Liang Chen (cbjchen)
description: updated
tags: added: patch
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "libvirt_1.2.2-0ubuntu13.1.11-lp1455608.patch" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

Ante Karamatić (ivoks)
tags: added: cpec
Changed in libvirt (Ubuntu):
importance: Undecided → High
Changed in libvirt (Ubuntu Wily):
assignee: Liang Chen (cbjchen) → Edward Hope-Morley (hopem)
Changed in libvirt (Ubuntu Vivid):
assignee: nobody → Edward Hope-Morley (hopem)
Changed in libvirt (Ubuntu Utopic):
assignee: nobody → Edward Hope-Morley (hopem)
Changed in libvirt (Ubuntu Trusty):
assignee: nobody → Edward Hope-Morley (hopem)
Changed in libvirt (Ubuntu Vivid):
status: New → In Progress
Changed in libvirt (Ubuntu Utopic):
status: New → In Progress
Changed in libvirt (Ubuntu Trusty):
status: New → In Progress
Changed in libvirt (Ubuntu Vivid):
importance: Undecided → High
Changed in libvirt (Ubuntu Utopic):
importance: Undecided → High
Changed in libvirt (Ubuntu Trusty):
importance: Undecided → High
Revision history for this message
Martin Pitt (pitti) wrote :

This would certainly affect the Debian package as well, no? Can you please submit this to Debian?

Revision history for this message
Martin Pitt (pitti) wrote :

Is there an upstream bug for this? I guess the proper way forward is to add a systemd unit and a .socket unit for it to avoid that race, and having to poll for the socket. But this should be tracked somewhere, instead of carrying that delta in Ubuntu forever. Thanks!

Revision history for this message
Edward Hope-Morley (hopem) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libvirt - 1.2.15-0ubuntu4

---------------
libvirt (1.2.15-0ubuntu4) wily; urgency=medium

  * Add post-start to upstart (/etc/init/libvirt-bin.conf) and
    sysv (/etc/init.d/libvirt-bin) jobs to ensure libvirt-sock
    created before up (LP: #1455608)

 -- Edward Hope-Morley <email address hidden> Thu, 28 May 2015 16:06:44 +0100

Changed in libvirt (Ubuntu Wily):
status: In Progress → Fix Released
Revision history for this message
Stefan Bader (smb) wrote :

Guess any feedback for wily is slightly too late. But I throw in my few cents anyway. :-P Having a retry limit I like better. Not sure one needs a message while waiting every 2s (even though its only 5 times). I would agree that not having the socket should be considered a failure of the daemon start. In that case, should not the upstart variant also "exit 1"?

Revision history for this message
Edward Hope-Morley (hopem) wrote :

@smb i'm happy to remove the "waiting on..." as it is just debug fluff on top of the other two messages that provide enough info on their own. As for the upstart exit code, i agree it should be 1 not 0, as in the sysv. I'll get that fixed. Thanks for the review!

Revision history for this message
Edward Hope-Morley (hopem) wrote :
Revision history for this message
Edward Hope-Morley (hopem) wrote :
Revision history for this message
Edward Hope-Morley (hopem) wrote :
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Should we do this for precise as well?

Revision history for this message
Edward Hope-Morley (hopem) wrote :

@serge-hallyn I suppose we would need to backport to the Precise Icehouse UCA. Afaik that should be a straight copy although I see that P+I has 1.2.2-0ubuntu13.1.9~cloud0 whereas Trusty is currently on 1.2.2-0ubuntu13.1.10. I'll submit a debdiff for P+I as well just in case.

Revision history for this message
Chris J Arges (arges) wrote : Please test proposed package

Hello Liang, or anyone else affected,

Accepted libvirt into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/libvirt/1.2.2-0ubuntu13.1.13 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in libvirt (Ubuntu Trusty):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Chris J Arges (arges) wrote :

Hello Liang, or anyone else affected,

Accepted libvirt into utopic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/libvirt/1.2.8-0ubuntu11.8 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in libvirt (Ubuntu Utopic):
status: In Progress → Fix Committed
Changed in libvirt (Ubuntu Vivid):
status: In Progress → Fix Committed
Revision history for this message
Chris J Arges (arges) wrote :

Hello Liang, or anyone else affected,

Accepted libvirt into vivid-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/libvirt/1.2.12-0ubuntu14.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Revision history for this message
Edward Hope-Morley (hopem) wrote :

@arges I have tested these trusty-proposed packages on T/U/V and all seems good.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libvirt - 1.2.2-0ubuntu13.1.14

---------------
libvirt (1.2.2-0ubuntu13.1.14) trusty; urgency=medium

  [ Seyeong Kim ]
  * d/p/fix_libvirtd_killed_by_sigsegv.patch: fix incorrect backport
    (LP: #1464175)

 -- Chris J Arges <email address hidden> Wed, 08 Jul 2015 10:52:41 -0500

Changed in libvirt (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libvirt - 1.2.8-0ubuntu11.8

---------------
libvirt (1.2.8-0ubuntu11.8) utopic; urgency=medium

  [ Seyeong Kim ]
  * d/p/fix_libvirtd_killed_by_sigsegv.patch: fix incorrect backport
    (LP: #1464175)

  [ Edward Hope-Morley ]
  * Add post-start to upstart (/etc/init/libvirt-bin.conf) and
    sysv (/etc/init.d/libvirt-bin) to ensure libvirt-sock
    created before up (LP: #1455608)

 -- Chris J Arges <email address hidden> Wed, 08 Jul 2015 11:55:28 -0500

Changed in libvirt (Ubuntu Utopic):
status: Fix Committed → Fix Released
Revision history for this message
Chris J Arges (arges) wrote : Update Released

The verification of the Stable Release Update for libvirt has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libvirt - 1.2.12-0ubuntu14.1

---------------
libvirt (1.2.12-0ubuntu14.1) vivid; urgency=medium

  [ Seyeong Kim ]
  * d/p/fix_libvirtd_killed_by_sigsegv.patch: fix incorrect backport
    (LP: #1464175)

  [ Edward Hope-Morley ]
  * Add post-start to upstart (/etc/init/libvirt-bin.conf) and
    sysv (/etc/init.d/libvirt-bin) to ensure libvirt-sock
    created before up (LP: #1455608)

  [ Chris J Arges ]
  * Add d/p/PowerPC-Make-qemu-system-ppc64-the-default-emulator-.patch,
    d/p/PowerPC-Forbid-NULL-CPU-model-with-host-model-mode.patch,
    d/p/schema-Allow-multiple-machines-for-VMs-and-unite-arc.patch
    To fix issues with libvirt on ppc64el.(LP: #1468247)

 -- Chris J Arges <email address hidden> Wed, 08 Jul 2015 12:51:16 -0500

Changed in libvirt (Ubuntu Vivid):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.