package samba 2:4.7.6+dfsg~ubuntu-0ubuntu2.2 failed to install/upgrade: installed samba package post-installation script subprocess returned error exit status 1

Bug #1787210 reported by Tim Pointon
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
samba (Ubuntu)
Incomplete
Undecided
Unassigned

Bug Description

Yesterday I upgraded to 18.4 from 16.4 (? can't find version info). Today I got notification of an available update which I engaged. The error occurred during the upgrade operation.

ProblemType: Package
DistroRelease: Ubuntu 18.04
Package: samba 2:4.7.6+dfsg~ubuntu-0ubuntu2.2
ProcVersionSignature: Ubuntu 4.15.0-30.32-generic 4.15.18
Uname: Linux 4.15.0-30-generic x86_64
NonfreeKernelModules: kpatch_livepatch_Ubuntu_4_15_0_30_32_generic_42
ApportVersion: 2.20.9-0ubuntu7.2
Architecture: amd64
Date: Wed Aug 15 09:11:40 2018
ErrorMessage: installed samba package post-installation script subprocess returned error exit status 1
InstallationDate: Installed on 2015-08-19 (1091 days ago)
InstallationMedia: Ubuntu 14.04.3 LTS "Trusty Tahr" - Beta amd64 (20150805)
Python3Details: /usr/bin/python3.6, Python 3.6.5, python3-minimal, 3.6.5-3ubuntu1
PythonDetails: /usr/bin/python2.7, Python 2.7.15rc1, python-minimal, 2.7.15~rc1-1
RelatedPackageVersions:
 nautilus 1:3.26.3-0ubuntu4
 gvfs 1.36.1-0ubuntu1.1
SambaClientRegression: Yes
SourcePackage: samba
Title: package samba 2:4.7.6+dfsg~ubuntu-0ubuntu2.2 failed to install/upgrade: installed samba package post-installation script subprocess returned error exit status 1
UpgradeStatus: Upgraded to bionic on 2018-08-14 (0 days ago)

Revision history for this message
Tim Pointon (timothy-pointon) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in samba (Ubuntu):
status: New → Confirmed
Revision history for this message
Joe Francis (1-joe-s) wrote :

I had this same update apply overnight automatically on a pair of servers and kill samba as well.

I downgraded to prior version and things seem to be working, although on one server the package setup doesn't complete successfully:

invoke-rc.d: initscript samba-ad-dc, action "restart" failed.
● samba-ad-dc.service - Samba AD Daemon
   Loaded: loaded (/lib/systemd/system/samba-ad-dc.service; enabled; vendor preset: enabled)
   Active: failed (Result: timeout) since Thu 2018-08-16 08:44:00 CDT; 18ms ago
     Docs: man:samba(8)
           man:samba(7)
           man:smb.conf(5)
  Process: 2755 ExecStart=/usr/sbin/samba --foreground --no-process-group $SAMBAOPTIONS (code=exited, status=127)
 Main PID: 2755 (code=exited, status=127)

Aug 16 08:43:59 dc3 samba[2777]: Exiting pid 2777 on SIGTERM
Aug 16 08:43:59 dc3 samba[2779]: [2018/08/16 08:43:59.995892, 0] ../source4/smbd/process_standard.c:86(sigterm_signal_handler)
Aug 16 08:43:59 dc3 samba[2779]: Exiting pid 2779 on SIGTERM
Aug 16 08:44:00 dc3 samba[2780]: [2018/08/16 08:44:00.000400, 0] ../source4/smbd/process_standard.c:86(sigterm_signal_handler)
Aug 16 08:44:00 dc3 samba[2780]: Exiting pid 2780 on SIGTERM
Aug 16 08:44:00 dc3 samba[2771]: [2018/08/16 08:44:00.007958, 0] ../source4/smbd/process_standard.c:86(sigterm_signal_handler)
Aug 16 08:44:00 dc3 samba[2771]: Exiting pid 2771 on SIGTERM
Aug 16 08:44:00 dc3 systemd[1]: samba-ad-dc.service: Main process exited, code=exited, status=127/n/a
Aug 16 08:44:00 dc3 systemd[1]: samba-ad-dc.service: Failed with result 'timeout'.
Aug 16 08:44:00 dc3 systemd[1]: Failed to start Samba AD Daemon.
dpkg: error processing package samba (--configure):

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Hi Joe,
the initial bug contains no journal log or systemctl status of the failing service after install.
On the initial report per TerminalLog it seems smb itself failed:

Aug 15 09:11:35 Thinkpad smbd[17311]: STATUS=daemon 'smbd' finished starting up and ready to serve connections
Aug 15 09:11:37 Thinkpad systemd[1]: smbd.service: Failed with result 'timeout

This is odd to me, it first reports to be started and happy, to then fail with a timeout.

The latter update in comment #3 with the failing samba-ad-dc.service seems to be the service that fails after downgrade right?

I've so far seen this particular issue on e.g. [1], but other than retrying there was nothing there that could be reused here.

@Andreas - do you have a better samba-idea what to look for?

@Joe - is this reproducible? If so can you after upgrade show the "systemctl status" of the failed smbd service and also add the "journalctl -xe" output including other things happening around that time?

[1]: https://bugs.launchpad.net/ubuntu/+source/samba/+bug/1677329/comments/21

Changed in samba (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Umm, I just realized the samba-ad-dc.service issue was Joe.
If that is an issue pelase report a new bug for it.

The request about reproducing the case and reporting the logs above should be going to @Tim instead.

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

@joe, samba-ad-dc is a different service. That's samba4 acting as an active directory domain controller. Only one can be run: either samba-ad-dc, or the smbd/nmbd duo.

@tim, please attach these:
- /etc/samba/smb.conf
- /var/log/samba/log*

And also please elaborate a bit about your networking setup, specifically if you use wifi or some other sort of network that tipically only gets enabled after a user logs in.

Thanks!

Revision history for this message
Tim Pointon (timothy-pointon) wrote : Re: [Bug 1787210] Re: package samba 2:4.7.6+dfsg~ubuntu-0ubuntu2.2 failed to install/upgrade: installed samba package post-installation script subprocess returned error exit status 1

I attach /etc/samba/smb.conf and two logs from /var/log

I am running Ubuntu 18.04.1 LTS on a laptop with only myself as user. It
is likely that I only connect to WiFi upon login.

I attach a screenshot showing a Samba share as 'flac on nas.local' and
the URL smb://nas.local that I use to connect.

There seems to be no issue with accessing  my files via Samba. The error
that initiated this bug report occurred during an update (not an upgrade
as I mistakenly said in my initating message). Just prior to that, I had
upgraded Ubuntu from 16.04 to 18.04.

This is not an urgent issue for me so far. But the error upon an update
by invitation came as a surprise.

Thanks and cheers!

Tim <https://pointonspoints.blogspot.ca/>

------------------------------------------------------------------------
On 2018-08-20 10:10 AM, Andreas Hasenack wrote:
> @joe, samba-ad-dc is a different service. That's samba4 acting as an
> active directory domain controller. Only one can be run: either samba-
> ad-dc, or the smbd/nmbd duo.
>
> @tim, please attach these:
> - /etc/samba/smb.conf
> - /var/log/samba/log*
>
> And also please elaborate a bit about your networking setup,
> specifically if you use wifi or some other sort of network that
> tipically only gets enabled after a user logs in.
>
> Thanks!
>

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

Thanks Tim.

Your configuration looks fine. The log files are too new, however, since the crash happened on Aug 15th. Could you please check /var/log/samba/log* again and attach the log files that have content from that date?

Revision history for this message
Tim Pointon (timothy-pointon) wrote :

I think the attached logs cover the time period in question.

I notice the following in log.nmbd.1

    [2018/08/17 07:52:27.007161,  0]
    ../source3/nmbd/nmbd_namequery.c:109(query_name_response)
       query_name_response: Multiple (2) responses received for a query
    on subnet 192.168.1.170 for name WORKGROUP<1d>.
       This response was from IP 192.168.1.2, reporting an IP address of
    192.168.1.2.
       Packet send failed to 192.168.1.255(138) ERRNO=Invalid argument

I have 2 routers in my house.

192.168.1.1 is the actual gateway.

192.168.1.2 is acting (I hope) as a bridge to provide a 2nd wireless
access point. It has two ethernet cables attached, one for a desktop
computer and the other connecting to the gateway via a powerline
connection. The 'Internet' connector on this router is empty and it does
not supply DHCP. SSID's and WiFi security settings are the same on both
devices.

It seems to work most of the time, but I do experience occasional loss
of wireless connectivity from my Samsung tablet. I've tried to determine
if my cobbled-together bridge is an issue, but without success. Using
WiFi Analyzer on my tablet, I can see both the 2.4G and 5G signals from
both routers. (Currently I have SSID's MYNET5g and MYNET, so I have to
decide myself which to connect to depending on my device capabilities. I
have also tried all SSID's being identical which I think should also work).

Cheers!

Tim <https://pointonspoints.blogspot.ca/>

------------------------------------------------------------------------
On 2018-08-20 02:26 PM, Andreas Hasenack wrote:
> Thanks Tim.
>
> Your configuration looks fine. The log files are too new, however, since
> the crash happened on Aug 15th. Could you please check
> /var/log/samba/log* again and attach the log files that have content
> from that date?
>

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

I believe your problem could be related to bug #1731502, which happens when there is no network up and running yet by the time samba starts. It only waits so long. The usual case is a desktop machine or laptop that only connects to the network after a user logs in, like a wifi network. Is that your scenario?

Revision history for this message
Tim Pointon (timothy-pointon) wrote :

Yes, this could be my scenario. I'm using Ubuntu 18.04 on a laptop with
only WiFi connectivity.

The error that initiated this bug report happened while trying to apply
an update for which I was prompted and accepted..

Thanks,
Tim <https://pointonspoints.blogspot.ca/>

------------------------------------------------------------------------
On 2018-08-21 03:28 PM, Andreas Hasenack wrote:
> I believe your problem could be related to bug #1731502, which happens
> when there is no network up and running yet by the time samba starts. It
> only waits so long. The usual case is a desktop machine or laptop that
> only connects to the network after a user logs in, like a wifi network.
> Is that your scenario?
>

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

Ok, thanks for getting back to us. I'll mark this as a duplicate of that bug then.

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.