Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 606820

Summary: Updating sys-libs/tevent-0.9.29 to sys-libs/tevent-0.9.31-r1 breaks samba, specifically nmbd process
Product: Gentoo Linux Reporter: thunderrd <rzubaly>
Component: Current packagesAssignee: Patrick Lauer <patrick>
Status: RESOLVED DUPLICATE    
Severity: normal CC: rzubaly, samba
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description thunderrd 2017-01-22 15:52:07 UTC
Similar if not the same as bug #592502 regarding tevent-0.9.30.  0.9.31-r1 is pulled in by the update to sys-fs/samba-4.5.4.  tevent emerges, but:

root@Q6600: ~# nmbd -FS
nmbd version 4.2.14 started.
Copyright Andrew Tridgell and the Samba Team 1992-2014
STATUS=daemon 'nmbd' finished starting up and ready to serve connections
===============================================================
INTERNAL ERROR: Signal 11 in pid 1469 (4.2.14)
Please read the Trouble-Shooting section of the Samba HOWTO
===============================================================
PANIC (pid 1469): internal error
BACKTRACE: 11 stack frames:
 #0 /usr/lib64/libsmbconf.so.0(log_stack_trace+0x1a) [0x7fe0a0f1a9ea]
 #1 /usr/lib64/libsmbconf.so.0(smb_panic_s3+0x20) [0x7fe0a0f1aac0]
 #2 /usr/lib64/libsamba-util.so.0(smb_panic+0x2f) [0x7fe0a191637f]
 #3 /usr/lib64/libsamba-util.so.0(+0x19596) [0x7fe0a1916596]
 #4 /lib64/libpthread.so.0(+0x10d90) [0x7fe0a1d44d90]
 #5 /usr/lib64/libtalloc.so.2(talloc_get_size+0x5) [0x7fe09f211435]
 #6 /usr/lib64/libsmbconf.so.0(event_add_to_poll_args+0x76) [0x7fe0a0f30726]
 #7 nmbd(listen_for_packets+0xff) [0x558da2af39af]
 #8 nmbd(main+0xcf6) [0x558da2ae2df6]
 #9 /lib64/libc.so.6(__libc_start_main+0xf0) [0x7fe09e64b670]
 #10 nmbd(_start+0x29) [0x558da2ae31b9]
dumping core in /var/log/


smbd remains running, however.  Reverting to 0.9.30 restores samba-4.2.14 functionality.  Building samba-4.5.4 fails completely.  I realize this may be a different bug, but I provide the snippet from the build log in case it is important:

[ 506/2272] Compiling default/source4/param/shares.empty.c
[ 507/2272] Compiling source4/auth/system_session.c
[ 508/2272] Compiling libcli/drsuapi/repl_decrypt.c
[ 509/2272] Compiling source4/auth/session.c
In file included from /usr/include/krb5.h:949:0,
                 from ../auth/credentials/credentials_krb5.h:28,
                 from ../source4/auth/session.c:28:
/usr/include/krb5-protos.h:3894:1: error: unknown type name ‘HEIMDAL_WARN_UNUSED_RESULT_ATTRIBUTE’
 HEIMDAL_WARN_UNUSED_RESULT_ATTRIBUTE KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
 ^
/usr/include/krb5-protos.h:3895:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘krb5_generate_random’
 krb5_generate_random (
 ^
Waf: Leaving directory `/var/tmp/portage/net-fs/samba-4.5.4/work/samba-4.5.4-abi_x86_32.x86/bin'
Build failed:  -> task failed (err #1): 
	{task: cc session.c -> session_1.o}
make: *** [Makefile:8: all] Error 1



Reproducible: Always

Steps to Reproduce:
1. emerge sys-fs/samba-4.5.4, pulling in sys-libs/tevent-0.9.31-r1.  On my machine, the samba build fails, but the tevent build succeeds
2. restart samba processes
3. no samba connectivity
4. revert to tevent-0.9.29 to restore functionality of samba-4.2.14


Expected Results:  
After samba-4.5.4 build failed, I expected the already installed version 4.2.14 to continue running nonetheless

root@Q6600: ~# emerge --info
Portage 2.3.3 (python 3.5.2-final-0, default/linux/amd64/13.0/desktop, gcc-5.4.0, glibc-2.23-r3, 4.9.4-ck x86_64)
=================================================================
System uname: Linux-4.9.4-ck-x86_64-Intel-R-_Core-TM-2_Extreme_CPU_X9650_@_3.00GHz-with-gentoo-2.3
KiB Mem:     8169016 total,   5608664 free
KiB Swap:    1060860 total,   1060860 free
Timestamp of repository gentoo: Sun, 22 Jan 2017 11:00:01 +0000
sh bash 4.4_p11
ld GNU ld (Gentoo 2.27 p1.0) 2.27
app-shells/bash:          4.4_p11::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.1_rc4::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo, 3.5.2::gentoo
dev-util/cmake:           3.7.2::gentoo
dev-util/pkgconfig:       0.29.1::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.23.1::gentoo
sys-apps/sandbox:         2.10-r3::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r2::gentoo
sys-devel/automake:       1.14.1-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.27::gentoo
sys-devel/gcc:            5.4.0-r2::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r2::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.9::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r3::gentoo
Repositories:

gentoo
    location: /mnt/ext4_STORAGE/usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts: --verbose --progress --exclude-from=/etc/portage/rsync_excludes

hnaparst
    location: /mnt/ext4_STORAGE/var/lib/layman/hnaparst
    sync-type: laymansync
    sync-uri: https://github.com/hnaparst/overlay.git
    masters: gentoo
    priority: 50

palemoon
    location: /mnt/ext4_STORAGE/var/lib/layman/palemoon
    sync-type: laymansync
    sync-uri: https://github.com/deuiore/palemoon-overlay.git
    masters: gentoo
    priority: 50

BZ-overlay
    location: /mnt/ext4_STORAGE/usr/local/portage
    masters: gentoo
    priority: 60

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/mnt/ext4_STORAGE/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build=n"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync 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://gentoo.mirrors.easynews.com/linux/gentoo/ http://ftp.lecl.net/pub/gentoo/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
PKGDIR="/mnt/ext4_STORAGE/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--verbose --progress --exclude-from=/etc/portage/rsync_excludes"
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="X a52 aac acl acpi alsa amd64 branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cxx dbus device-mapper directfb dri dts dvd dvdr emboss encode exif fam ffmpeg firefox flac fortran gdbm gif glamor gpm gtk iconv infinality ipv6 jack jpeg lcms ldap libnotify mad mmx mmxext mng modules mp3 mp4 mpeg multilib ncurses nls nptl offensive ogg opengl openmp openssl pam pango pcre pdf png policykit ppds python qt5 readline samba sdl seccomp session spell sse sse2 ssh ssl startup-notification svg tcpd threads tiff truetype udev udisks unicode usb uuid vdpau vorbis wxwidgets x264 xattr xcb xcomposite xft xml xv xvid zlib" ABI_X86="32 64" ALSA_CARDS="ca0106" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 sse4_1 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev" 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" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4 python3_5" RUBY_TARGETS="ruby21" USERLAND="GNU" VIDEO_CARDS="nvidia" 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, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, USE_PYTHON
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2017-01-25 16:51:41 UTC
It's the same bug. Either upgrade both, tevent _and_ samba or none.

Regarding your build error in samba-4.5.4, plase re-sync and try again.

*** This bug has been marked as a duplicate of bug 592502 ***
Comment 2 thunderrd 2017-01-25 17:27:51 UTC
That is exactly what I did.

tevent succeeds, and samba fails, and I can reproduce it _on_my_machine_.

When tevent succeeds, and samba fails, the current install of samba-4.2.14 loses connectivity as a result.

In order to restore connectivity to the existing samba version 4.2.14, I must downgrade tevent.

Upgrading both FAILS, because samba chokes in the manner I described.  If the samba build fail is a different bug, I will file another.  Let me know what is the correct protocol.
Comment 3 thunderrd 2017-01-25 18:11:48 UTC
...Well...it seems you're right.

I swear to you, I resynced and tried several times [3 or 4?] over the last two days since I filed this bug, and it failed each time, exactly the same way.

But, just to make sure I wasn't crazy, I tried again, just now.  Only because you asked me to, Poly-C.

And this time it succeeded.  So *something* must be different in the tree in the last 12 hours, because that is the last time I attempted this.

Anyhow, all's well that ends well, thanks.  I just wish I understood what happened.
Comment 4 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2017-01-25 18:32:34 UTC
Sorry for not being more verbose in my previous reply. I was in a rush.

This is what happened in the samba ebuild and why I asked you to re-sync and try again:

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7ad932cf204b2a7ccf65b6be853f23c4450eb732

which basically just prevents the error you've observed in samba-4.5.4
Comment 5 thunderrd 2017-01-26 00:43:55 UTC
That explains it, then.  Thanks for getting back to me.