Samba crashes during startup

Bug #1738119 reported by Dawid Wróbel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
samba (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

I cannot get samba to run on my system - it used to work, albeit with a *newer* version of the package (2.4.5) installed as part of Zentyal suite.

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: samba 2:4.3.11+dfsg-0ubuntu0.16.04.12
ProcVersionSignature: Ubuntu 4.4.0-103.126-generic 4.4.98
Uname: Linux 4.4.0-103-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.14
Architecture: amd64
Date: Wed Dec 13 21:41:18 2017
InstallationDate: Installed on 2016-07-28 (503 days ago)
InstallationMedia: Ubuntu-Server 16.04.1 LTS "Xenial Xerus" - Release amd64 (20160719)
NmbdLog:

OtherFailedConnect: Yes
ProcEnviron:
 SHELL=/bin/bash
 TERM=xterm-256color
 PATH=(custom, no user)
 LANG=en_US.UTF-8
SambaServerRegression: Yes
SmbConfIncluded: Yes
SmbLog:
 PANIC (pid 1522): open_sockets_smbd() failed
   PANIC (pid 1509): open_sockets_smbd() failed
SourcePackage: samba
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Dawid Wróbel (dawidw) wrote :
Revision history for this message
Dawid Wróbel (dawidw) wrote :
Revision history for this message
Dawid Wróbel (dawidw) wrote :
Revision history for this message
Dawid Wróbel (dawidw) wrote :

What's worth noting, samba is failing during installation already - after purging packages and re-installing samba, I see following:

Setting up samba (2:4.3.11+dfsg-0ubuntu0.16.04.12) ...
Job for smbd.service failed because the control process exited with error code. See "systemctl status smbd.service" and "journalctl -xe" for details.
invoke-rc.d: initscript smbd, action "start" failed.
● smbd.service - LSB: start Samba SMB/CIFS daemon (smbd)
   Loaded: loaded (/etc/init.d/smbd; bad; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2017-12-13 22:01:08 EST; 11ms ago
     Docs: man:systemd-sysv-generator(8)
  Process: 15197 ExecStart=/etc/init.d/smbd start (code=exited, status=1/FAILURE)

Dec 13 22:01:07 trout systemd[1]: Starting LSB: start Samba SMB/CIFS daemon (smbd)...
Dec 13 22:01:08 trout smbd[15197]: * Starting SMB/CIFS daemon smbd
Dec 13 22:01:08 trout smbd[15197]: ...fail!
Dec 13 22:01:08 trout systemd[1]: smbd.service: Control process exited, code=exited status=1
Dec 13 22:01:08 trout systemd[1]: Failed to start LSB: start Samba SMB/CIFS daemon (smbd).
Dec 13 22:01:08 trout systemd[1]: smbd.service: Unit entered failed state.
Dec 13 22:01:08 trout systemd[1]: smbd.service: Failed with result 'exit-code'.
dpkg: error processing package samba (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up attr (1:2.4.47-2) ...
Setting up libaio1:amd64 (0.3.110-2) ...
Setting up samba-dsdb-modules (2:4.3.11+dfsg-0ubuntu0.16.04.12) ...
Setting up samba-vfs-modules (2:4.3.11+dfsg-0ubuntu0.16.04.12) ...
Processing triggers for libc-bin (2.23-0ubuntu9) ...
Processing triggers for systemd (229-4ubuntu21) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for ufw (0.35-0ubuntu2) ...
Errors were encountered while processing:
 samba

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

I believe your interfaces setting in smb.conf is incorrect:

 interfaces = lan wlan

That tells the service to bind to an interface named "lan" and an interface named "wlan". If these interfaces don't exist, samba will fail to start. It shouldn't segfault, of course, but it will definitely not start.

Could you verify that setting please?

Regarding why purging and reinstalling samba didn't work, it's because smb.conf is provided by the samba-common package, not samba. It's not clear from the console output above if you also purged samba-common.

Changed in samba (Ubuntu):
status: New → Incomplete
Revision history for this message
Dawid Wróbel (dawidw) wrote :

Hi Andreas,

These interfaces *do* exist and samba worked before with the same setting just fine. I do, however, use the udev rules to rename the generic interface names to 'lan' and 'wlan'. But as I said, samba worked before in this setup.

I just purged the samba including samba-commmon package and reinstalled. The /etc/samba/smb.conf is definitely a vanilla one. It still crashes.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Ok, since you purged and reinstalled, let's try to get a fresh crash file.

First, remove any samba related crash files from /var/crash/*. Unless you have other crashes in that directory for other apps that you plan to file bugs for, I would even remove all content from /var/crash.

Then trigger the error by restarting samba:
sudo systemctl restart smbd nmbd

Assuming it crashes again, please attach:
- fresh /var/log/samba/log* files that have the crash reported
- the crash file from /var/crash/
- the current smb.conf

Thanks
Thanks!

Revision history for this message
Dawid Wróbel (dawidw) wrote :
Revision history for this message
Dawid Wróbel (dawidw) wrote :
Revision history for this message
Dawid Wróbel (dawidw) wrote :
Revision history for this message
Dawid Wróbel (dawidw) wrote :
Revision history for this message
Dawid Wróbel (dawidw) wrote :

Hi Andreas,

I attached the files as requested.

Changed in samba (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Hm, for some reason I'm unable to extract a good backtrace from this core file, even with the correct samba symbols packages installed.

Do you also have a core file in /var/log/samba/cores/smbd?

Revision history for this message
Dawid Wróbel (dawidw) wrote :

Nothing in /var/log/samba/cores/smbd or /var/log/samba/cores/nmbd

Revision history for this message
Dawid Wróbel (dawidw) wrote :

Can anything be done here to help fixing this?

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Do you have any samba users in your tdbsam db?

Try:
sudo pdbedit -L

If it's empty, you might want to consider purging and reinstalling the samba packages. There may be some corrupted data in the samba databases in /var/lib/samba that is causing the crash. You should do a backup of /var/lib/samba first before trying this, though.

Sorry I don't have anything better to offer at the moment.

Revision history for this message
Dawid Wróbel (dawidw) wrote :

pdbedit -L yields no results. So I purged samba once again (apt purge samba samba-common) and reinstalled, but there'are still no users in the DB.

Also, purging packages removes the /var/lib/samba and its contents, so it can't be the corrupted data there at fault.

Revision history for this message
Dawid Wróbel (dawidw) wrote :

Forgot to mention - I added a user to the DB so that pdbedit -L actually returns a record, but samba still fails to start.

Revision history for this message
siyamraj (siyamraj) wrote : Re: [Bug 1738119] Re: Samba crashes during startup

Hi !
Noted and thank you for the update,

Regards,
Raj

On Feb 27, 2018 04:25, "Andreas Hasenack" <email address hidden> wrote:

Do you have any samba users in your tdbsam db?

Try:
sudo pdbedit -L

If it's empty, you might want to consider purging and reinstalling the
samba packages. There may be some corrupted data in the samba databases
in /var/lib/samba that is causing the crash. You should do a backup of
/var/lib/samba first before trying this, though.

Sorry I don't have anything better to offer at the moment.

--
You received this bug notification because you are subscribed to samba
in Ubuntu.
https://bugs.launchpad.net/bugs/1738119

Title:
  Samba crashes during startup

Status in samba package in Ubuntu:
  Confirmed

Bug description:
  I cannot get samba to run on my system - it used to work, albeit with
  a *newer* version of the package (2.4.5) installed as part of Zentyal
  suite.

  ProblemType: Bug
  DistroRelease: Ubuntu 16.04
  Package: samba 2:4.3.11+dfsg-0ubuntu0.16.04.12
  ProcVersionSignature: Ubuntu 4.4.0-103.126-generic 4.4.98
  Uname: Linux 4.4.0-103-generic x86_64
  ApportVersion: 2.20.1-0ubuntu2.14
  Architecture: amd64
  Date: Wed Dec 13 21:41:18 2017
  InstallationDate: Installed on 2016-07-28 (503 days ago)
  InstallationMedia: Ubuntu-Server 16.04.1 LTS "Xenial Xerus" - Release
amd64 (20160719)
  NmbdLog:

  OtherFailedConnect: Yes
  ProcEnviron:
   SHELL=/bin/bash
   TERM=xterm-256color
   PATH=(custom, no user)
   LANG=en_US.UTF-8
  SambaServerRegression: Yes
  SmbConfIncluded: Yes
  SmbLog:
   PANIC (pid 1522): open_sockets_smbd() failed
     PANIC (pid 1509): open_sockets_smbd() failed
  SourcePackage: samba
  UpgradeStatus: No upgrade log present (probably fresh install)

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

Revision history for this message
David Britton (dpb) wrote :

Thanks for the updates, unfortunately I don't see a clear reproduction and I don't think progress will be made on fixing this until that exists. I'll set this to incomplete for now, set back to New if there is more information to make this actionable.

Changed in samba (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Dawid Wróbel (dawidw) wrote :

"I don't see a clear reproduction" - OK, but what does that mean? Can we work on getting a *clear reproduction*? Samba keeps segfaulting here and it is very reproducible, so if the core dumps are not enough, then I suppose I could provide a gdb dump?

Revision history for this message
Dawid Wróbel (dawidw) wrote :

This is no longer an issue after upgrading to 18.04

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

[Expired for samba (Ubuntu) because there has been no activity for 60 days.]

Changed in samba (Ubuntu):
status: Incomplete → Expired
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.