Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 276943 - net-fs/samba-3.2.13-r2 opportunistically links against libdns_sd if available
Summary: net-fs/samba-3.2.13-r2 opportunistically links against libdns_sd if available
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's SAMBA Team
URL: http://0pointer.de/avahi-compat?s=lib...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-07 16:04 UTC by Martin von Gagern
Modified: 2009-08-17 17:08 UTC (History)
2 users (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 Martin von Gagern 2009-07-07 16:04:49 UTC
On systems with avahi installed, configure will automatically detect the presence of libdns_sd.so and dns_sd.h and link against them. This can be prevented using --disable-dnssd as some samba 3.3.6 ebuilds do.

I noticed all of this when I read the following lines in my syslog, each prefixed with a big fat *** WARNING ***:

  The program 'smbd' uses the Apple Bonjour compatibility layer of Avahi.
  Please fix your application to use the native API of Avahi!
  For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=smbd>

So I suggest you either simply pass --disable-dnssd to the configure script for a samba 3.2.13-r3 revbump, or you add some flag like zeroconf to IUSE along some suitable dependency, probably copied from samba-server-3.3.6.ebuild.
Comment 1 nuitari 2009-08-12 08:57:53 UTC
Not sure how much this is related to this bug, but I am getting segfaults with samba 3.2.13-r2 

  INTERNAL ERROR: Signal 11 in pid 13773 (3.2.13)
  Please read the Trouble-Shooting section of the Samba3-HOWTO
[2009/08/10 15:55:28,  0] lib/fault.c:fault_report(43)

  From: http://www.samba.org/samba/docs/Samba3-HOWTO.pdf
[2009/08/10 15:55:28,  0] lib/fault.c:fault_report(44)
  ===============================================================
[2009/08/10 15:55:28,  0] lib/util.c:smb_panic(1670)
  PANIC (pid 13773): internal error
[2009/08/10 15:55:29,  0] lib/util.c:log_stack_trace(1774)
  BACKTRACE: 10 stack frames:
   #0 /usr/sbin/smbd(log_stack_trace+0x2d) [0xb7cc1305]
   #1 /usr/sbin/smbd(smb_panic+0x7c) [0xb7cc145e]
   #2 /usr/sbin/smbd [0xb7cac407]
   #3 [0xb7a45400]
   #4 /usr/lib/libdns_sd.so.1(DNSServiceRegister+0x221) [0xb79ba0eb]
   #5 /usr/sbin/smbd(dns_register_smbd+0x13f) [0xb7b4e3af]
   #6 /usr/sbin/smbd [0xb7eefc57]
   #7 /usr/sbin/smbd(main+0xbaf) [0xb7ef0dfc]
   #8 /lib/libc.so.6(__libc_start_main+0xe5) [0xb786da3d]
   #9 /usr/sbin/smbd [0xb7ac99b1]
[2009/08/10 15:55:29,  0] lib/fault.c:dump_core(201)
  dumping core in /var/log/samba/cores/smbd
[2009/08/10 20:49:33,  0] lib/util_sock.c:read_socket_with_timeout(939)
[2009/08/10 20:49:33,  0] lib/util_sock.c:get_peer_addr_internal(1676)
  getpeername failed. Error was Transport endpoint is not connected
  read_socket_with_timeout: client 0.0.0.0 read error = Connection reset by peer.
[2009/08/10 20:49:33,  1] smbd/service.c:close_cnum(1405)
  10.0.2.192 (10.0.2.192) closed connection to service Backups


emerge --info :

nelson samba # emerge --info
Portage 2.1.6.13 (default/linux/x86/2008.0, gcc-4.3.3, glibc-2.10.1-r0, 2.6.30-gentoo-r2 i686)
=================================================================
System uname: Linux-2.6.30-gentoo-r2-i686-Intel-R-_Pentium-R-_4_CPU_3.00GHz-with-gentoo-2.0.1
Timestamp of tree: Wed, 12 Aug 2009 07:00:01 +0000
distcc 3.1 i686-pc-linux-gnu [disabled]
app-shells/bash:     4.0_p24
dev-java/java-config: 1.3.7, 2.1.8-r1
dev-lang/python:     2.4.4, 2.5.2-r5, 2.6.2-r1
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.4.3-r3
sys-apps/sandbox:    2.0
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2, 1.11
sys-devel/binutils:  2.19.1-r1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.30
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -mtune=pentium4 -O3 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/bind /var/qmail/alias /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=pentium4 -mtune=pentium4 -O3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/voip"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl berkdb bzip2 cli cracklib crypt cups dri fortran gdbm gpm iconv isdnlog mmx mmx2 mmxext mudflap ncurses nls nptl nptlonly offensive ogg openmp pam pcre perl ppds pppd python readline reflection session spl sse sse2 sse3 ssl sysfs tcpd unicode x86 xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="access auth auth_dbm auth_anon auth_digest alias file-cache echo charset-lite cache disk-cache mem-cache ext-filter case_filter case-filter-in deflate mime-magic cern-meta expires headers usertrack unique-id proxy proxy-connect proxy-ftp proxy-http info include cgi cgid dav dav-fs vhost-alias speling rewrite log_config logio env setenvif mime status autoindex asis negotiation dir imap actions userdir so filter authz_host" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse vmmouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="i128 i740 i810 v4l vesa vmware"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 nuitari 2009-08-12 09:33:19 UTC
removing mdnsresolver and recompiling samba seems to have fixed it
Comment 3 El Goretto 2009-08-13 17:23:58 UTC
(In reply to comment #1)
> Not sure how much this is related to this bug, but I am getting segfaults with
> samba 3.2.13-r2 
> 
>   INTERNAL ERROR: Signal 11 in pid 13773 (3.2.13)
>   Please read the Trouble-Shooting section of the Samba3-HOWTO
> [2009/08/10 15:55:28,  0] lib/fault.c:fault_report(43)
> 
>   From: http://www.samba.org/samba/docs/Samba3-HOWTO.pdf
> [2009/08/10 15:55:28,  0] lib/fault.c:fault_report(44)
>   ===============================================================
> [2009/08/10 15:55:28,  0] lib/util.c:smb_panic(1670)
>   PANIC (pid 13773): internal error
> [2009/08/10 15:55:29,  0] lib/util.c:log_stack_trace(1774)
>   BACKTRACE: 10 stack frames:
>    #0 /usr/sbin/smbd(log_stack_trace+0x2d) [0xb7cc1305]
>    #1 /usr/sbin/smbd(smb_panic+0x7c) [0xb7cc145e]
>    #2 /usr/sbin/smbd [0xb7cac407]
>    #3 [0xb7a45400]
>    #4 /usr/lib/libdns_sd.so.1(DNSServiceRegister+0x221) [0xb79ba0eb]
>    #5 /usr/sbin/smbd(dns_register_smbd+0x13f) [0xb7b4e3af]
>    #6 /usr/sbin/smbd [0xb7eefc57]
>    #7 /usr/sbin/smbd(main+0xbaf) [0xb7ef0dfc]
>    #8 /lib/libc.so.6(__libc_start_main+0xe5) [0xb786da3d]
>    #9 /usr/sbin/smbd [0xb7ac99b1]
> [2009/08/10 15:55:29,  0] lib/fault.c:dump_core(201)
>   dumping core in /var/log/samba/cores/smbd
> [2009/08/10 20:49:33,  0] lib/util_sock.c:read_socket_with_timeout(939)
> [2009/08/10 20:49:33,  0] lib/util_sock.c:get_peer_addr_internal(1676)
>   getpeername failed. Error was Transport endpoint is not connected
>   read_socket_with_timeout: client 0.0.0.0 read error = Connection reset by
> peer.
> [2009/08/10 20:49:33,  1] smbd/service.c:close_cnum(1405)
>   10.0.2.192 (10.0.2.192) closed connection to service Backups

Eventually same issue here with samba 3.2.x series:

[2009/08/13 19:16:34,  0] lib/fault.c:fault_report(40)
  ===============================================================
[2009/08/13 19:16:34,  0] lib/fault.c:fault_report(41)
  INTERNAL ERROR: Signal 11 in pid 14601 (3.2.11)
  Please read the Trouble-Shooting section of the Samba3-HOWTO
[2009/08/13 19:16:34,  0] lib/fault.c:fault_report(43)

  From: http://www.samba.org/samba/docs/Samba3-HOWTO.pdf
[2009/08/13 19:16:34,  0] lib/fault.c:fault_report(44)
  ===============================================================
[2009/08/13 19:16:34,  0] lib/util.c:smb_panic(1670)
  PANIC (pid 14601): internal error
[2009/08/13 19:16:34,  0] lib/util.c:log_stack_trace(1774)
  BACKTRACE: 5 stack frames:
   #0 /usr/sbin/smbd(log_stack_trace+0x2d) [0x1657ad81]
   #1 /usr/sbin/smbd(smb_panic+0x80) [0x1657aede]
   #2 /usr/sbin/smbd [0x165658e3]
   #3 [0x5603b400]
   #4 /usr/lib/libdns_sd.so.1(DNSServiceRegister+0x30c) [0x55f9d5fc]
[2009/08/13 19:16:35,  0] lib/fault.c:dump_core(201)
  dumping core in /var/log/samba/cores/smbd

# emerge --info
Portage 2.1.6.13 (hardened/x86, gcc-4.3.3, glibc-2.9_p20081201-r2, 2.6.29-hardened i686)
=================================================================
System uname: Linux-2.6.29-hardened-i686-AMD_Athlon-tm-_2600+-with-glibc2.3.2
Timestamp of tree: Thu, 13 Aug 2009 02:45:02 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 2.1.8-r1
dev-lang/python:     2.5.4-r2
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.5, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -mtune=athlon-xp -fomit-frame-pointer -fforce-addr -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /opt/i2p/*.config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -mtune=athlon-xp -fomit-frame-pointer -fforce-addr -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="buildsyspkg ccache distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="ftp://ftp.free.fr/mirrors/ftp.gentoo.org/ http://ftp.club-internet.fr/pub/mirrors/gentoo ftp://ftp.heanet.ie/pub/gentoo/ ftp://ftp.mneisen.org/gentoo"
LANG="fr_FR.UTF-8"
LC_ALL="fr_FR.UTF-8"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j2"
PKGDIR="/var/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/zugaina /usr/local/portage/layman/sunrise /usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext acl alsa apache2 bash-completion cli cracklib dba dedicated dri dvdr extensions gd gpm hardened hardenedphp ipv6 ithreads jpg lm_sensors logrotate mmx mmxext ncurses nfs nls nptl nptlonly pam pcre pic readline session snmp ssl svg sysfs truetype unicode urandom x86 xorg xv zlib" ALSA_CARDS="via82xx" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_connect proxy_http rewrite setenvif status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="mga"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


Comment 4 Martin von Gagern 2009-08-13 18:01:06 UTC
Possible workaround:
EXTRA_ECONF=--disable-dnssd emerge -1 samba
It should solve things for samba even without the need to uninstall anything. You may try it until the ebuild has been fixed to include that configuration switch.

Of course, the fact that samba crashes when linked against libdns_sd.so is probably an indication of some kind of bug, and might seriously trouble people who want to use zeroconf with samba. This is a different bug, though, so if not linking against libdns_sd.so is OK for you, stay here, try the workaround, wait for a fixed ebuild, and vote for this bug if you feel like it.

If you need zeroconf, or are willing to investigate bugs in a feature you are not actually using, please file a separate report about the segfault. If you do so, you probably should indicate when those crashes happen, i.e. at startup, or during some certain operation? Every time or only occasionally? A backtrace giving not only the addresses but also the line numbers would be even better, as would be a clear indication about what packages and versions the files involved belong to.
Comment 5 nuitari 2009-08-13 18:12:06 UTC
I just don't have enough motivation to open a new bug about it as I really don't care about zeroconf 

It would crash when my only client (a mac mini, using the share for the time machine) would connect. 
Comment 6 Patrick Lauer gentoo-dev 2009-08-17 17:08:03 UTC
+  17 Aug 2009; Patrick Lauer <patrick@gentoo.org> +samba-3.2.13-r3.ebuild:
+  Small fixes for #276457 #280565 #276943, unconditionally disables zeroconf
+  support for now as it is crashy

that should do it.