This bug was fixed in the package libvirt - 3.6.0-1ubuntu6.5

libvirt (3.6.0-1ubuntu6.5) artful; urgency=medium

  * d/p/ubuntu/lp1688508-fix-variable-scope-in-in-check_guests_shutdown.patch:
    backport further upstream fixes that were identified on verification.
    Together with the former change this fixes (LP: #1688508)

libvirt (3.6.0-1ubuntu6.4) artful; urgency=medium

  * d/p/ubuntu/lp1688508-tools-avoid-text-spilling-into-variables.patch:
    avoid hanging on shutdown (LP: #1688508)

 -- Christian Ehrhardt <>  Tue, 03 Apr
2018 16:23:04 +0200

** Changed in: libvirt (Ubuntu Artful)
       Status: Fix Committed => Fix Released

You received this bug notification because you are a member of नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs

Title: fails to shutdown guests in parallel

Status in libvirt:
  Fix Released
Status in libvirt package in Ubuntu:
  Fix Released
Status in libvirt source package in Xenial:
  Fix Released
Status in libvirt source package in Zesty:
  Won't Fix
Status in libvirt source package in Artful:
  Fix Released

Bug description:

  No LSB modules are available.
  Distributor ID:       Ubuntu
  Description:  Ubuntu 16.04.3 LTS
  Release:      16.04
  Codename:     xenial


  There is a bug/race condition on libvirt-guests.service, that prevents
  the shutdown of guests to happen in parallel.

  The critical chain for this service is:

  libvirt-guests.service +20ms
  └─libvirt-bin.service @2.784s +140ms
    └─ @2.777s
      └─ @2.775s
        └─open-iscsi.service @2.554s +116ms
          └─iscsid.service @2.525s +18ms
            └─ @2.502s
              └─ @1.955s
                └─networking.service @1.625s +299ms
                  └─ @1.601s
                    └─cloud-init-local.service @405ms +1.072s
                      └─systemd-remount-fs.service @232ms +64ms
                        └─systemd-journald.socket @178ms
                          └─-.slice @117ms

  As an example, I have the following kvm host with 42 virtual

  ubuntu@xenial-base:~$ virsh list --all
   Id    Name                           State
   12    locked-trusty-2                running
   13    locked-trusty-3                running
   41    locked-trusty-42               running

  After rebooting the machine:

  [  250.999516][4215]: Running guests on default URI: 
locked-trusty-2, locked-trusty-4, locked-trusty-12, locked-trusty-3, 
locked-trusty-5, locked-trusty-11, locked-trusty-10, locked-trusty-8, 
locked-trusty-9, locked-trusty-7, locked-trusty-6, locked-trusty-13, 
locked-trusty-14, locked-trusty-15, locked-trusty-16, locked-trusty-17, 
locked-trusty-18, locked-trusty-19, locked-trusty-20, locked-trusty-21, 
locked-trusty-22, locked-trusty-23, locked-trusty-24, locked-trusty-25, 
locked-trusty-26, locked-trusty-27, locked-trusty-28, locked-trusty-29, 
locked-trusty-30, locked-trusty-31, locked-trusty-32, locked-trusty-33, 
locked-trusty-34, locked-trusty-35, locked-trusty-36, locked-trusty-37, 
locked-trusty-38, locked-trusty-39, locked-trusty-40, locked-trusty-41, 
  [  251.011367][4215]: Shutting down guests on default URI...
  [  251.027072][4215]: Starting shutdown on guest: 
  [  391.949941][4215]: Waiting for 28 guests to shut down, 
10 seconds left
  [  398.074405][4215]: Waiting for 28 guests to shut down, 5 
seconds left
  [  403.020479][4215]: Timeout expired while shutting down 
  [  OK  ] Stopped Suspend Active Libvirt Guests.
  [  OK  ] Stopped target System Time Synchronized.

  [Test Case]

   * Make sure the following variables are set in /etc/default/libvirt-
  guests (which are all default options):


   * Create over 20 virtual machines (in my case, using uvt-kvm).

  $  for f in $(seq 0 40); do uvt-kvm create --memory 2000 --cpu 1
  locked-trusty-$f release=xenial arch=amd64 ; done

   * Reboot the machine and monitor the systemd service stop sequence
  or console output.

  (With systemd: systemctl start debug-shell and jumpt to ctrl+alt+f9)

  * Error message "Timeout expired while shutting down domains" should
  be displayed.

  [Regression Potential]

  * None identified.

  [Other Info]

  * There is a proposed patch in upstream already that has been already
  linked to this bug:

To manage notifications about this bug go to:

Mailing list:
Post to     :
Unsubscribe :
More help   :

Reply via email to