nmbd starts fine with no interfaces, but doesn't notify systemd that it started
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
samba |
Unknown
|
Unknown
|
|||
samba (Ubuntu) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
nmbd seems to start fine when there are no non-loopback interfaces up, and will loop indefinitely:
/* We only count IPv4, non-loopback interfaces here. */
while (iface_
}
It can happen that during boot there is really no interface available, because, for example, it's a desktop connected via wifi and the wireless connection is only established after the user logs in.
nmbd will happily start up and wait for an interface, but systemd is expecting a notification because the Type is set to notify:
$ cat packaging/
[Unit]
Description=Samba NMB Daemon
After=syslog.target network.target
[Service]
Type=notify
(...)
So after about 1m30s without a notification from nmbd, systemd will just kill it:
Oct 30 14:25:51 artful-samba-init systemd[1]: nmbd.service: Supervising process 171 which is not our child. We'll most likely not notice when it exits.
...
Oct 30 14:27:21 artful-samba-init systemd[1]: nmbd.service: Start operation timed out. Terminating.
Oct 30 14:27:21 artful-samba-init systemd[1]: nmbd.service: Killing process 171 (nmbd) with signal SIGKILL.
Oct 30 14:27:21 artful-samba-init systemd[1]: nmbd.service: Killing process 171 (nmbd) with signal SIGKILL.
Oct 30 14:27:21 artful-samba-init systemd[1]: Failed to start Samba NMB Daemon.
Oct 30 14:27:21 artful-samba-init systemd[1]: nmbd.service: Unit entered failed state.
Oct 30 14:27:21 artful-samba-init systemd[1]: nmbd.service: Failed with result 'timeout'.
--- Original description ---
ProblemType: Package
DistroRelease: Ubuntu Kylin 17.10
Package: samba 2:4.6.7+
ProcVersionSign
Uname: Linux 4.13.0-
ApportVersion: 2.20.7-0ubuntu3.2
Architecture: amd64
Date: Fri Nov 10 09:51:44 2017
ErrorMessage: subprocess installed post-installation script returned error exit status 1
InstallationDate: Installed on 2017-10-19 (22 days ago)
InstallationMedia: Ubuntu-Studio 17.04 "Zesty Zapus" - Release amd64 (20170412)
Python3Details: /usr/bin/python3.6, Python 3.6.3, python3-minimal, 3.6.3-0ubuntu2
PythonDetails: /usr/bin/python2.7, Python 2.7.14, python-minimal, 2.7.14-2ubuntu1
RelatedPackageV
nautilus 1:3.26.0-0ubuntu1
gvfs 1.34.1-1ubuntu1
SambaClientRegr
SourcePackage: samba
Title: package samba 2:4.6.7+
UpgradeStatus: No upgrade log present (probably fresh install)
Thanks for taking the time to report this bug and helping to make Ubuntu better. We appreciate the difficulties you are facing, but this appears to be a "regular" (non-security) bug. I have unmarked it as a security issue since this bug does not show evidence of allowing attackers to cross privilege boundaries nor directly cause loss of data/privacy. Please feel free to report any other bugs you may find.