[Touch-packages] [Bug 1417010] Re: systemd init gets stuck reloading smbd.service

2015-02-04 Thread Martin Pitt
I thought I had DHCP fail yesterday on a failing hook, but I cannot
reproduce this today. So the || true was apparently a red herring.

I also linked to the Debian bug which describes the same problem, and
has a proposed patch. We could apply that as a short-term solution, or
try to fix this in systemd properly.

** Bug watch added: Debian Bug tracker #652942
   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=652942

** Also affects: samba (Debian) via
   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=652942
   Importance: Unknown
   Status: Unknown

** Changed in: samba (Ubuntu)
   Status: In Progress = Triaged

** Changed in: samba (Ubuntu)
 Assignee: Martin Pitt (pitti) = (unassigned)

** Changed in: systemd (Ubuntu)
 Assignee: (unassigned) = Martin Pitt (pitti)

-- 
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:
  systemd init gets stuck reloading smbd.service

Status in samba package in Ubuntu:
  Triaged
Status in systemd package in Ubuntu:
  Triaged
Status in samba package in Debian:
  Unknown

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.servicestart waiting
  116 vmware-workstation-server.servicestart 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.targetstart 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.servicestart waiting
  142 getty.target start waiting
  164 sabnzbdplus.service  start waiting
1 graphical.target start waiting
  176 apt-cacher-ng.servicestart waiting
  183 gdm.service  start waiting
  174 ssh.service  start waiting
   77 network-online.targetstart 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.servicestart 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 

[Touch-packages] [Bug 1417010] Re: systemd init gets stuck reloading smbd.service

2015-02-04 Thread Martin Pitt
Keeping notes: This is a well-known property/problem of systemd job
transactions. In its simplest form it looks like this:

# cat /etc/systemd/system/foo.service 
[Unit]
Description=some foo service
Requires=dep.service
After=dep.service

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/echo foo is running
ExecReload=/bin/echo reloading foo

# cat /etc/systemd/system/dep.service 
[Unit]
Description=dependency of foo.service

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStartPre=/bin/sleep 3
ExecStart=/bin/echo dep is running
ExecStartPost=-/bin/systemctl reload foo.service

# systemctl daemon-reload; systemctl start foo.service
→ hangs forever, and systemctl list-jobs shows:

JOB UNITTYPE  STATE  
886 dep.service start running
818 foo.service start waiting

In this form it's obviously bogus (nobody would write a unit like this).
But it becomes quite common if the reload happens through some
indirection, like a DHCP enter/exit or an ifupdown hook.

For these situations the reload should happen with --no-block, to not
wait until it's finished, but just to enqueue it. While that's easy
enough if a systemd unit itself does that, our various hooks didn't take
that into account when they were written, and as they usually use
invoke-rc.d or service (both of which don't know about --no-block)
we need a more generic solution/workaround.

I proposed some bits on the upstream ML:
http://lists.freedesktop.org/archives/systemd-
devel/2015-February/027966.html

-- 
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:
  systemd init gets stuck reloading smbd.service

Status in samba package in Ubuntu:
  In Progress
Status in systemd package in Ubuntu:
  Triaged

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.servicestart waiting
  116 vmware-workstation-server.servicestart 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.targetstart 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.servicestart waiting
  142 getty.target start waiting
  164 sabnzbdplus.service  start waiting
1 graphical.target start waiting
  176 apt-cacher-ng.servicestart waiting
  183 gdm.service  start waiting
  174 ssh.service  start waiting
   77 network-online.targetstart 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.servicestart 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 

[Touch-packages] [Bug 1417010] Re: systemd init gets stuck reloading smbd.service

2015-02-03 Thread Martin Pitt
The samba DHCP enter hook needs to be fixed too, so adding a task.

** Also affects: samba (Ubuntu)
   Importance: Undecided
   Status: New

** Changed in: samba (Ubuntu)
   Importance: Undecided = Medium

** Changed in: samba (Ubuntu)
   Status: New = In Progress

** Changed in: samba (Ubuntu)
 Assignee: (unassigned) = Martin Pitt (pitti)

-- 
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:
  systemd init gets stuck reloading smbd.service

Status in samba package in Ubuntu:
  In Progress
Status in systemd package in Ubuntu:
  Triaged

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.servicestart waiting
  116 vmware-workstation-server.servicestart 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.targetstart 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.servicestart waiting
  142 getty.target start waiting
  164 sabnzbdplus.service  start waiting
1 graphical.target start waiting
  176 apt-cacher-ng.servicestart waiting
  183 gdm.service  start waiting
  174 ssh.service  start waiting
   77 network-online.targetstart 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.servicestart 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 

[Touch-packages] [Bug 1417010] Re: systemd init gets stuck reloading smbd.service

2015-02-03 Thread Martin Pitt
 since the invoke-rc.d call never actually returns

Incidentally this is being discussed upstream at
http://lists.freedesktop.org/archives/systemd-
devel/2015-February/027877.html at the moment.

Can you please try to patch /usr/sbin/invoke-rc.d with this: 
http://paste.ubuntu.com/10048858/
This isn't a complete or completely correct fix, but confirming that  it works 
would be appreciated.

Thanks!

-- 
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:
  systemd init gets stuck reloading smbd.service

Status in systemd package in Ubuntu:
  Triaged

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.servicestart waiting
  116 vmware-workstation-server.servicestart 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.targetstart 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.servicestart waiting
  142 getty.target start waiting
  164 sabnzbdplus.service  start waiting
1 graphical.target start waiting
  176 apt-cacher-ng.servicestart waiting
  183 gdm.service  start waiting
  174 ssh.service  start waiting
   77 network-online.targetstart 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.servicestart 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 

[Touch-packages] [Bug 1417010] Re: systemd init gets stuck reloading smbd.service

2015-02-03 Thread Martin Pitt
Further explaining: ... and if the DHCP enter hook fails, then the whole
DHCP request fails, this ifup@eth0 never succeeds.

-- 
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:
  systemd init gets stuck reloading smbd.service

Status in systemd package in Ubuntu:
  Triaged

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.servicestart waiting
  116 vmware-workstation-server.servicestart 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.targetstart 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.servicestart waiting
  142 getty.target start waiting
  164 sabnzbdplus.service  start waiting
1 graphical.target start waiting
  176 apt-cacher-ng.servicestart waiting
  183 gdm.service  start waiting
  174 ssh.service  start waiting
   77 network-online.targetstart 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.servicestart 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
  

[Touch-packages] [Bug 1417010] Re: systemd init gets stuck reloading smbd.service

2015-02-03 Thread Martin Pitt
I was able to fudge a similar situation in a VM. Could you please try
and edit /etc/dhcp/dhclient-enter-hooks.d/samba to append a ||true in
the third last line where it calls invoke-rc.d smbd reload?

For reference: While smbd is not yet started (as it waits for $network)
this will fail with code 1 as the unit can't be reloaded yet.

-- 
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:
  systemd init gets stuck reloading smbd.service

Status in systemd package in Ubuntu:
  Triaged

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.servicestart waiting
  116 vmware-workstation-server.servicestart 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.targetstart 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.servicestart waiting
  142 getty.target start waiting
  164 sabnzbdplus.service  start waiting
1 graphical.target start waiting
  176 apt-cacher-ng.servicestart waiting
  183 gdm.service  start waiting
  174 ssh.service  start waiting
   77 network-online.targetstart 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.servicestart 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 

[Touch-packages] [Bug 1417010] Re: systemd init gets stuck reloading smbd.service

2015-02-03 Thread Tim
Martin, that doesn't work either since the invoke-rc.d call never
actually returns

-- 
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:
  systemd init gets stuck reloading smbd.service

Status in systemd package in Ubuntu:
  Triaged

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.servicestart waiting
  116 vmware-workstation-server.servicestart 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.targetstart 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.servicestart waiting
  142 getty.target start waiting
  164 sabnzbdplus.service  start waiting
1 graphical.target start waiting
  176 apt-cacher-ng.servicestart waiting
  183 gdm.service  start waiting
  174 ssh.service  start waiting
   77 network-online.targetstart 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.servicestart 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
  

[Touch-packages] [Bug 1417010] Re: systemd init gets stuck reloading smbd.service

2015-02-02 Thread Martin Pitt
Keeping notes:

 50 network.target start waiting

This is another bug, because ifup@.service has Before=network.target.
That's too strict, and should be Before=network-online.target.

-- 
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:
  systemd init gets stuck reloading smbd.service

Status in systemd package in Ubuntu:
  Triaged

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.servicestart waiting
  116 vmware-workstation-server.servicestart 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.targetstart 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.servicestart waiting
  142 getty.target start waiting
  164 sabnzbdplus.service  start waiting
1 graphical.target start waiting
  176 apt-cacher-ng.servicestart waiting
  183 gdm.service  start waiting
  174 ssh.service  start waiting
   77 network-online.targetstart 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.servicestart 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
  

[Touch-packages] [Bug 1417010] Re: systemd init gets stuck reloading smbd.service

2015-02-02 Thread Tim
journalctl debug logs from hang

** Attachment added: logs
   
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1417010/+attachment/4310992/+files/logs

-- 
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:
  systemd init gets stuck reloading smbd.service

Status in systemd package in Ubuntu:
  Triaged

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.servicestart waiting
  116 vmware-workstation-server.servicestart 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.targetstart 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.servicestart waiting
  142 getty.target start waiting
  164 sabnzbdplus.service  start waiting
1 graphical.target start waiting
  176 apt-cacher-ng.servicestart waiting
  183 gdm.service  start waiting
  174 ssh.service  start waiting
   77 network-online.targetstart 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.servicestart 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: 

[Touch-packages] [Bug 1417010] Re: systemd init gets stuck reloading smbd.service

2015-02-02 Thread Martin Pitt
It seems this is a dependency loop:

 (1) network-online.target waits for ifup@eth0.service as it's in 
/etc/network/interfaces
 (2) ifup@eth0.service starts during boot, triggered by udev; through samba's 
smbd dhclient-enter hook it calls invoke-rc.d smbd reload
 (3) /etc/init.d/smbd has Requires: $network
 (4) the SysV generator translates $network to network-online.target

We really want (1), (2) and (3) are justified. According to
http://refspecs.linuxbase.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-
generic/facilname.html, $network should be mapped to network.service,
not network-online.service. If others disagree and $network should have
the strong is-online meaning, we need to fix it at (3) instead, e. g.
by adding a proper systemd unit to samba. (We should really teach socket
activation to stuff..)

** Changed in: systemd (Ubuntu)
   Importance: Undecided = High

** Changed in: systemd (Ubuntu)
   Status: New = Triaged

-- 
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:
  systemd init gets stuck reloading smbd.service

Status in systemd package in Ubuntu:
  Triaged

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.servicestart waiting
  116 vmware-workstation-server.servicestart 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.targetstart 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.servicestart waiting
  142 getty.target start waiting
  164 sabnzbdplus.service  start waiting
1 graphical.target start waiting
  176 apt-cacher-ng.servicestart waiting
  183 gdm.service  start waiting
  174 ssh.service  start waiting
   77 network-online.targetstart 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.servicestart 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