Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 652896 - >=net-fs/samba-4.8.0 in ADDC init script always reports it's crashed
Summary: >=net-fs/samba-4.8.0 in ADDC init script always reports it's crashed
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's SAMBA Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-10 08:33 UTC by Jernej Simončič
Modified: 2018-07-18 08:07 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jernej Simončič 2018-04-10 08:33:17 UTC
I installed Samba 4.8.0 and set it up as a domain controller (daemon_list="samba4" in /etc/conf.d/samba). Even though samba runs fine, the init script reports that it's crashed:

signum-2018 ~ # /etc/init.d/samba start; /etc/init.d/samba status; ps u -C samba
 * samba -> start: samba4 ...                                                                                                                                                     [ ok ]
 * status: crashed
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root     13157  0.0  0.0 429388 13944 ?        Rs   10:26   0:00 samba: root process
signum-2018 ~ # /etc/init.d/samba status; ps u -C samba
 * status: crashed
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root     13157  2.2  0.5 598616 84712 ?        Ss   10:26   0:00 samba: root process
root     13183  0.0  0.3 598616 55572 ?        S    10:26   0:00 samba: task[s3fs_parent]
root     13184  0.6  0.7 599096 113020 ?       S    10:26   0:00 samba: task[dcesrv]
root     13185  0.0  0.3 598616 60624 ?        S    10:26   0:00 samba: task[nbtd]
root     13186  0.0  0.3 598616 55720 ?        S    10:26   0:00 samba: task[wrepl]
root     13187  0.0  0.3 598620 55172 ?        S    10:26   0:00 samba: tfork waiter process
root     13188  1.5  0.3 598616 62660 ?        S    10:26   0:00 samba: task[ldapsrv]
root     13190  0.0  0.3 598616 56192 ?        S    10:26   0:00 samba: task[cldapd]
root     13191  0.0  0.3 598616 63052 ?        S    10:26   0:00 samba: task[kdc]
root     13192  0.7  0.4 609496 69280 ?        S    10:26   0:00 samba: task[dreplsrv]
root     13193  0.0  0.3 598616 55564 ?        S    10:26   0:00 samba: task[winbindd_parent]
root     13194  0.0  0.3 598616 55608 ?        S    10:26   0:00 samba: task[ntp_signd]
root     13195  1.2  0.5 598616 94372 ?        S    10:26   0:00 samba: task[kccsrv]
root     13196  0.0  0.3 598616 59776 ?        S    10:26   0:00 samba: task[dnsupdate]
root     13197  0.0  0.3 598620 55224 ?        S    10:26   0:00 samba: tfork waiter process


emerge --info:
Portage 2.3.24 (python 3.5.4-final-0, default/linux/amd64/17.0/no-multilib, gcc-6.4.0, glibc-2.25-r10, 4.15.11-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.15.11-gentoo-x86_64-AMD_Opteron-tm-_X3216_APU-with-gentoo-2.4.1
KiB Mem:    15879072 total,  14255824 free
KiB Swap:    8388604 total,   8323064 free
Timestamp of repository gentoo: Tue, 10 Apr 2018 08:00:01 +0000
Head commit of repository gentoo: 6530beb3ab90ebca0a9a5cc65b20e305b6c151b2
sh bash 4.4_p12
ld GNU ld (Gentoo 2.29.1 p3) 2.29.1
app-shells/bash:          4.4_p12::gentoo
dev-lang/perl:            5.24.3::gentoo
dev-lang/python:          2.7.14-r1::gentoo, 3.5.4-r1::gentoo
dev-util/cmake:           3.9.6::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/openrc:          0.34.11::gentoo
sys-apps/sandbox:         2.12::gentoo
sys-devel/autoconf:       2.69-r4::gentoo
sys-devel/automake:       1.15.1-r2::gentoo
sys-devel/binutils:       2.29.1-r1::gentoo
sys-devel/gcc:            6.4.0-r1::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.13::gentoo (virtual/os-headers)
sys-libs/glibc:           2.25-r10::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-metamanifest: no
    sync-rsync-extra-opts:

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.1/ext-active/ /etc/php/cgi-php7.1/ext-active/ /etc/php/cli-php7.1/ext-active/ /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="sl_SI.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="acl amd64 berkdb bzip2 cli crypt cxx dri fortran gdbm iconv ipv6 mmx modules ncurses nls nptl offensive openmp pam pcre readline seccomp sse sse2 ssl tcpd unicode xattr zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 fma4 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 xop" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_5" RUBY_TARGETS="ruby22 ruby23" USERLAND="GNU" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

net-fs/samba-4.8.0::gentoo was built with the following:
USE="acl addc addns ads client fam gnutls ldap pam python syslog winbind -ceph -cluster -cups -debug (-dmapi) -gpg -iprint -quota (-selinux) (-system-heimdal) -system-mitkrb5 -systemd -test -zeroconf" PYTHON_TARGETS="python2_7"
Comment 1 Jernej Simončič 2018-05-09 11:44:36 UTC
The same problem remains with Samba 4.8.1.
Comment 2 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2018-05-16 11:24:18 UTC
Patches are welcome. I cannot fix it as I cannot build ADDC in samba on my test machine.
Comment 3 Jernej Simončič 2018-05-17 13:09:45 UTC
Adding a --pidfile parameter to /etc/conf.d/samba seems to fix the problem:

samba4_start_options=""
samba4_start="start-stop-daemon --start --exec /usr/sbin/samba --pidfile /run/samba/samba.pid -- ${samba4_start_options}"
samba4_stop="start-stop-daemon --stop --exec /usr/sbin/samba --pidfile /run/samba/samba.pid"
samba4_reload="killall -HUP samba"
Comment 4 Oleh 2018-06-09 15:40:55 UTC
the fix from comment #3 does fix the problem. Can this be applied outside of ebuild maintainer responsibility assuming inability to test. Thank you.
Comment 5 Larry the Git Cow gentoo-dev 2018-06-11 10:22:06 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=22669e2a71987a74b588ab02edf7a3a909b645f2

commit 22669e2a71987a74b588ab02edf7a3a909b645f2
Author:     Lars Wendler <polynomial-c@gentoo.org>
AuthorDate: 2018-06-11 10:21:39 +0000
Commit:     Lars Wendler <polynomial-c@gentoo.org>
CommitDate: 2018-06-11 10:22:00 +0000

    net-fs/samba: Init script improvements.
    
    Bug: https://bugs.gentoo.org/652896
    Package-Manager: Portage-2.3.40, Repoman-2.3.9

 net-fs/samba/files/4.4/samba4.confd    | 23 +++++++++++++++--------
 net-fs/samba/files/4.4/samba4.initd-r1 |  4 ++--
 2 files changed, 17 insertions(+), 10 deletions(-)
Comment 6 Jernej Simončič 2018-06-21 16:21:24 UTC
samba4_pidfile="${piddir}/samba4.pid" doesn't work - it should be

samba4_pidfile="${piddir}/samba.pid"
Comment 7 Marc Elser 2018-07-18 08:00:04 UTC
That's correct. Also on my system which runs samba4 as Active Directory service the pid file is here:

/var/run/samba.pid

So it's not samba4.pid but samba.pid
Comment 8 Larry the Git Cow gentoo-dev 2018-07-18 08:07:08 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8374b58dfa5178f78f70ccdf49fab7c51da4e77c

commit 8374b58dfa5178f78f70ccdf49fab7c51da4e77c
Author:     Lars Wendler <polynomial-c@gentoo.org>
AuthorDate: 2018-07-18 08:06:56 +0000
Commit:     Lars Wendler <polynomial-c@gentoo.org>
CommitDate: 2018-07-18 08:06:56 +0000

    net-fs/samba: Fixed name of pidfile.
    
    Closes: https://bugs.gentoo.org/652896
    Package-Manager: Portage-2.3.43, Repoman-2.3.10

 net-fs/samba/files/4.4/samba4.confd | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)