← Back to team overview

touch-packages team mailing list archive

[Bug 1417010] Re: Reloading services can result in a deadlock under systemd

 

I pondered this for a while; quite naturally there is no perfect
solution as synchronous reload/restart requests in hooks which may be
part of a systemd unit transaction are fundamentally against the design
of systemd. But this patch now seems to fix this bug and the three
referenced Debian bugs, and supersedes Avoid-reload-and-re-start-
requests-during-early-boot.patch and Avoid-reloading-services-when-
shutting-down.patch, so I think it's better.

Attaching here so that I don't lose them.

** Patch added: "manager: avoid queueing reloads of inactive units"
   https://bugs.launchpad.net/ubuntu/+source/samba/+bug/1417010/+attachment/4312244/+files/0002-manager-avoid-queueing-reloads-of-inactive-units.patch

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/1417010

Title:
  Reloading services can result in a deadlock under systemd

Status in samba package in Ubuntu:
  Triaged
Status in systemd package in Ubuntu:
  In Progress
Status in samba package in Debian:
  Fix Committed

Bug description:
  since today (although haven't rebooted in a few days), systemd init is
  hanging trying to bring up ifup@eth0. I had to revert to upstart boot
  to get in, although sometimes it would successfully boot with systemd
  .debug-shell

  JOB UNIT                                 TYPE  STATE  
  120 winbind.service                      start waiting
  175 nmbd.service                         start waiting
  159 libvirt-bin.service                  start waiting
  151 dns-clean.service                    start waiting
  116 vmware-workstation-server.service    start waiting
  177 smbd.service                         start waiting
  178 fail2ban.service                     start waiting
  331 rpcbind.service                      start waiting
  109 apache2.service                      start waiting
  124 openvpn.service                      start waiting
  184 x-display-manager.target             start waiting
  173 vmware.service                       start waiting
  143 getty@tty1.service                   start waiting
  141 samba-ad-dc.service                  start waiting
    2 multi-user.target                    start waiting
  332 rpcbind.target                       start waiting
  108 hddtemp.service                      start waiting
  172 plymouth-quit-wait.service           start waiting
  152 autofs.service                       start waiting
  123 schroot.service                      start waiting
  130 mail-transport-agent.target          start waiting
  129 postfix.service                      start waiting
  128 isc-dhcp-server.service              start waiting
  131 mysql.service                        start waiting
  142 getty.target                         start waiting
  164 sabnzbdplus.service                  start waiting
    1 graphical.target                     start waiting
  176 apt-cacher-ng.service                start waiting
  183 gdm.service                          start waiting
  174 ssh.service                          start waiting
   77 network-online.target                start waiting
  112 systemd-update-utmp-runlevel.service start waiting
  133 urfkill.service                      start waiting
  111 kerneloops.service                   start waiting
  161 rc-local.service                     start waiting
  106 lxc.service                          start waiting
  107 lxc-net.service                      start waiting
  155 virtualbox.service                   start waiting
  191 ifup@eth0.service                    start running
   50 network.target                       start waiting

  40 jobs listed.
  * ifup@eth0.service - ifup for eth0
     Loaded: loaded (/lib/systemd/system/ifup@.service; static; vendor preset: enabled)
     Active: activating (start-post) since Mon 2015-02-02 19:17:25 AEDT; 9min ago
    Process: 800 ExecStart=/sbin/ifup --allow=hotplug %I (code=exited, status=0/SUCCESS)
   Main PID: 800 (code=exited, status=0/SUCCESS);         : 803 (ifup)
     CGroup: /system.slice/system-ifup.slice/ifup@eth0.service
             `-control
               |- 803 /sbin/ifup --allow=auto eth0
               |- 832 /bin/sh -c dhclient -1 -v -pf /run/dhclient.eth0.pid -lf /var/lib/dhcp/dhclient.eth0.leases eth0  
               |- 833 dhclient -1 -v -pf /run/dhclient.eth0.pid -lf /var/lib/dhcp/dhclient.eth0.leases eth0
               |-1269 /bin/sh /sbin/dhclient-script
               |-1273 /bin/sh /usr/sbin/invoke-rc.d smbd reload
               `-1294 systemctl reload smbd.service

  Feb 02 19:17:25 duhast dhclient[833]: Sending on   Socket/fallback
  Feb 02 19:17:25 duhast dhclient[833]: DHCPREQUEST of 192.168.15.67 on eth0 to 255.255.255.255 port 67 (xid=0x502572c4)
  Feb 02 19:17:25 duhast ifup[803]: Listening on LPF/eth0/1c:6f:65:c4:63:1b
  Feb 02 19:17:25 duhast ifup[803]: Sending on   LPF/eth0/1c:6f:65:c4:63:1b
  Feb 02 19:17:25 duhast ifup[803]: Sending on   Socket/fallback
  Feb 02 19:17:25 duhast ifup[803]: DHCPREQUEST of 192.168.15.67 on eth0 to 255.255.255.255 port 67 (xid=0x502572c4)
  Feb 02 19:17:28 duhast dhclient[833]: DHCPREQUEST of 192.168.15.67 on eth0 to 255.255.255.255 port 67 (xid=0x502572c4)
  Feb 02 19:17:28 duhast ifup[803]: DHCPREQUEST of 192.168.15.67 on eth0 to 255.255.255.255 port 67 (xid=0x502572c4)
  Feb 02 19:17:28 duhast dhclient[833]: DHCPACK of 192.168.15.67 from 192.168.15.1
  Feb 02 19:17:28 duhast ifup[803]: DHCPACK of 192.168.15.67 from 192.168.15.1

  ProblemType: Bug
  DistroRelease: Ubuntu 15.04
  Package: systemd 218-6ubuntu1
  ProcVersionSignature: Ubuntu 3.18.0-12.13-generic 3.18.4
  Uname: Linux 3.18.0-12-generic x86_64
  NonfreeKernelModules: nvidia
  ApportVersion: 2.15.1-0ubuntu4
  Architecture: amd64
  CurrentDesktop: GNOME
  Date: Mon Feb  2 19:47:21 2015
  InstallationDate: Installed on 2012-09-23 (862 days ago)
  InstallationMedia: Ubuntu GNOME Remix 12.10 "Quantal Quetzal" - Alpha amd64(20120922)
  MachineType: Gigabyte Technology Co., Ltd. P67A-UD3R-B3
  ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.18.0-12-generic root=UUID=71eeb904-068b-41c2-9d34-59365ca4c3ad ro quiet splash
  SourcePackage: systemd
  SystemdDelta:
   [EXTENDED]   /lib/systemd/system/graphical.target → /lib/systemd/system/graphical.target.d/xdiagnose.conf
   
   1 overridden configuration files found.
  UpgradeStatus: No upgrade log present (probably fresh install)
  dmi.bios.date: 03/21/2012
  dmi.bios.vendor: Award Software International, Inc.
  dmi.bios.version: F9
  dmi.board.name: P67A-UD3R-B3
  dmi.board.vendor: Gigabyte Technology Co., Ltd.
  dmi.board.version: x.x
  dmi.chassis.type: 3
  dmi.chassis.vendor: Gigabyte Technology Co., Ltd.
  dmi.modalias: dmi:bvnAwardSoftwareInternational,Inc.:bvrF9:bd03/21/2012:svnGigabyteTechnologyCo.,Ltd.:pnP67A-UD3R-B3:pvr:rvnGigabyteTechnologyCo.,Ltd.:rnP67A-UD3R-B3:rvrx.x:cvnGigabyteTechnologyCo.,Ltd.:ct3:cvr:
  dmi.product.name: P67A-UD3R-B3
  dmi.sys.vendor: Gigabyte Technology Co., Ltd.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/samba/+bug/1417010/+subscriptions


References