Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 99184 - Samba crashes after updating world
Summary: Samba crashes after updating world
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: AMD64 Linux
: High critical (vote)
Assignee: Gentoo's SAMBA Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-16 02:44 UTC by Róbert Čerňanský
Modified: 2007-07-05 11:17 UTC (History)
5 users (show)

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


Attachments
strace -f smbtree output (smbtree.strace,9.58 KB, text/plain)
2005-07-16 02:46 UTC, Róbert Čerňanský
Details
readelf differences between a broen and working (stage3) file (IBM850.readelf.diff,11.25 KB, text/plain)
2005-08-02 06:22 UTC, Mikko Tanner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Róbert Čerňanský 2005-07-16 02:44:09 UTC
After updating my system (with emerge -u world) samba do not starting. smbd and nmbd daemons as well as other samba related commands (smbtree, smbstatus, smbmount, ...) crashes.

Important system packages like glibc, linux-headers, libtool, udev were upgraded (samba was not upgraded). See below for complete list. I've tried re-emerge samba but without success.

I'll post strace output of smbtree as attachment. Other samba related commands have similar strace outputs.

Here is output which smbd and nmbd leave in /var/log/messages:

Jul 16 10:20:51 amit smbd[7956]: [2005/07/16 10:20:51, 0] lib/fault.c:fault_report(36)
Jul 16 10:20:51 amit smbd[7956]:   ===============================================================
Jul 16 10:20:51 amit smbd[7956]: [2005/07/16 10:20:51, 0] lib/fault.c:fault_report(37)
Jul 16 10:20:51 amit smbd[7956]:   INTERNAL ERROR: Signal 11 in pid 7956 (3.0.10)
Jul 16 10:20:51 amit smbd[7956]:   Please read the appendix Bugs of the Samba HOWTO collection
Jul 16 10:20:51 amit smbd[7956]: [2005/07/16 10:20:51, 0] lib/fault.c:fault_report(39)
Jul 16 10:20:51 amit smbd[7956]:   ===============================================================
Jul 16 10:20:51 amit smbd[7956]: [2005/07/16 10:20:51, 0] lib/util.c:smb_panic2(1482)
Jul 16 10:20:51 amit smbd[7956]:   PANIC: internal error
Jul 16 10:20:51 amit smbd[7956]: [2005/07/16 10:20:51, 0] lib/util.c:smb_panic2(1490)
Jul 16 10:20:51 amit smbd[7956]:   BACKTRACE: 22 stack frames:
Jul 16 10:20:51 amit smbd[7956]:    #0 /usr/sbin/smbd(smb_panic2+0x64) [0x575794]
Jul 16 10:20:51 amit smbd[7956]:    #1 /usr/sbin/smbd [0x563e96]
Jul 16 10:20:51 amit smbd[7956]:    #2 /lib/libc.so.6 [0x2aaaab6055e0]
Jul 16 10:20:51 amit smbd[7956]:    #3 /usr/lib64/gconv/IBM852.so(gconv+0x1b2) [0x2aaaab9559c2]
Jul 16 10:20:51 amit smbd[7956]:    #4 /usr/lib64/gconv/UTF-16.so(gconv+0x64c) [0x2aaaab85203c]
Jul 16 10:20:51 amit smbd[7956]:    #5 /lib/libc.so.6 [0x2aaaab5f3ee8]
Jul 16 10:20:51 amit smbd[7956]:    #6 /lib/libc.so.6(iconv+0x6b) [0x2aaaab5f34cb]
Jul 16 10:20:51 amit smbd[7956]:    #7 /usr/sbin/smbd [0x580be0]
Jul 16 10:20:51 amit smbd[7956]:    #8 /usr/sbin/smbd(smb_iconv+0xe0) [0x580d10]
Jul 16 10:20:51 amit smbd[7956]:    #9 /usr/sbin/smbd [0x560e6c]
Jul 16 10:20:51 amit smbd[7956]:    #10 /usr/sbin/smbd(convert_string+0x19b) [0x5613fb]
Jul 16 10:20:51 amit smbd[7956]:    #11 /usr/sbin/smbd(init_doschar_table+0x68) [0x571498]
Jul 16 10:20:51 amit smbd[7956]:    #12 /usr/sbin/smbd(init_iconv+0x254) [0x560d84]
Jul 16 10:20:51 amit smbd[7956]:    #13 /usr/sbin/smbd [0x439f84]
Jul 16 10:20:51 amit smbd[7956]:    #14 /usr/sbin/smbd(lp_do_parameter+0x380) [0x43b5e0]
Jul 16 10:20:51 amit smbd[7956]:    #15 /usr/sbin/smbd [0x43de35]
Jul 16 10:20:51 amit smbd[7956]:    #16 /usr/sbin/smbd(pm_process+0xba) [0x43e17a]
Jul 16 10:20:51 amit smbd[7956]:    #17 /usr/sbin/smbd(lp_load+0x929) [0x43cdf9]
Jul 16 10:20:51 amit smbd[7956]:    #18 /usr/sbin/smbd(reload_services+0x43) [0x5cecb3]
Jul 16 10:20:51 amit smbd[7956]:    #19 /usr/sbin/smbd(main+0x1c4) [0x5cfdb4]
Jul 16 10:20:51 amit smbd[7956]:    #20 /lib/libc.so.6(__libc_start_main+0xb0) [0x2aaaab5f2d10]
Jul 16 10:20:51 amit smbd[7956]:    #21 /usr/sbin/smbd [0x43646a]
Jul 16 10:20:51 amit smbd[7956]:
Jul 16 10:20:51 amit nmbd[7958]: [2005/07/16 10:20:51, 0] lib/fault.c:fault_report(36)
Jul 16 10:20:51 amit nmbd[7958]:   ===============================================================
Jul 16 10:20:51 amit nmbd[7958]: [2005/07/16 10:20:51, 0] lib/fault.c:fault_report(37)
Jul 16 10:20:51 amit nmbd[7958]:   INTERNAL ERROR: Signal 11 in pid 7958 (3.0.10)
Jul 16 10:20:51 amit nmbd[7958]:   Please read the appendix Bugs of the Samba HOWTO collection
Jul 16 10:20:51 amit nmbd[7958]: [2005/07/16 10:20:51, 0] lib/fault.c:fault_report(39)
Jul 16 10:20:51 amit nmbd[7958]:   ===============================================================
Jul 16 10:20:51 amit nmbd[7958]: [2005/07/16 10:20:51, 0] lib/util.c:smb_panic2(1482)
Jul 16 10:20:51 amit nmbd[7958]:   PANIC: internal error
Jul 16 10:20:51 amit nmbd[7958]: [2005/07/16 10:20:51, 0] lib/util.c:smb_panic2(1490)
Jul 16 10:20:51 amit nmbd[7958]:   BACKTRACE: 22 stack frames:
Jul 16 10:20:51 amit nmbd[7958]:    #0 /usr/sbin/nmbd(smb_panic2+0x64) [0x481844]
Jul 16 10:20:51 amit nmbd[7958]:    #1 /usr/sbin/nmbd [0x46ff46]
Jul 16 10:20:51 amit nmbd[7958]:    #2 /lib/libc.so.6 [0x2aaaab0495e0]
Jul 16 10:20:51 amit nmbd[7958]:    #3 /usr/lib64/gconv/IBM852.so(gconv+0x1b2) [0x2aaaab3539c2]
Jul 16 10:20:51 amit nmbd[7958]:    #4 /usr/lib64/gconv/UTF-16.so(gconv+0x64c) [0x2aaaab25003c]
Jul 16 10:20:51 amit nmbd[7958]:    #5 /lib/libc.so.6 [0x2aaaab037ee8]
Jul 16 10:20:51 amit nmbd[7958]:    #6 /lib/libc.so.6(iconv+0x6b) [0x2aaaab0374cb]
Jul 16 10:20:51 amit nmbd[7958]:    #7 /usr/sbin/nmbd [0x48cc90]
Jul 16 10:20:51 amit nmbd[7958]:    #8 /usr/sbin/nmbd(smb_iconv+0xe0) [0x48cdc0]
Jul 16 10:20:51 amit nmbd[7958]:    #9 /usr/sbin/nmbd [0x46cf1c]
Jul 16 10:20:51 amit nmbd[7958]:    #10 /usr/sbin/nmbd(convert_string+0x19b) [0x46d4ab]
Jul 16 10:20:51 amit nmbd[7958]:    #11 /usr/sbin/nmbd(init_doschar_table+0x68) [0x47d548]
Jul 16 10:20:51 amit nmbd[7958]:    #12 /usr/sbin/nmbd(init_iconv+0x254) [0x46ce34]
Jul 16 10:20:51 amit nmbd[7958]:    #13 /usr/sbin/nmbd [0x437ce4]
Jul 16 10:20:51 amit nmbd[7958]:    #14 /usr/sbin/nmbd(lp_do_parameter+0x380) [0x439340]
Jul 16 10:20:51 amit nmbd[7958]:    #15 /usr/sbin/nmbd [0x43bb95]
Jul 16 10:20:51 amit nmbd[7958]:    #16 /usr/sbin/nmbd(pm_process+0xba) [0x43beda]
Jul 16 10:20:51 amit nmbd[7958]:    #17 /usr/sbin/nmbd(lp_load+0x929) [0x43ab59]
Jul 16 10:20:51 amit nmbd[7958]:    #18 /usr/sbin/nmbd [0x41c607]
Jul 16 10:20:51 amit nmbd[7958]:    #19 /usr/sbin/nmbd(main+0x19b) [0x41c8db]
Jul 16 10:20:51 amit nmbd[7958]:    #20 /lib/libc.so.6(__libc_start_main+0xb0) [0x2aaaab036d10]
Jul 16 10:20:51 amit nmbd[7958]:    #21 /usr/sbin/nmbd [0x41b82a]


Output of emerge -upv world

[ebuild     U ] sys-libs/zlib-1.2.2-r1 [1.2.2] -build 0 kB 
[ebuild     U ] sys-devel/gcc-config-1.3.11-r4 [1.3.11-r3] 0 kB 
[ebuild     U ] sys-kernel/linux-headers-2.6.11-r2 [2.6.8.1-r4] 0 kB 
[ebuild     U ] sys-libs/glibc-2.3.5 [2.3.4.20041102-r1] -build -debug -erandom -hardened (-multilib) +nls -nptl -nptlonly -pic (-selinux) +userlocales 0 kB 
[ebuild     U ] sys-devel/libtool-1.5.18-r1 [1.5.16] 0 kB 
[ebuild     U ] x11-misc/ttmkfdir-3.0.9-r3 [3.0.9-r2] 0 kB 
[ebuild     U ] x11-base/xorg-x11-6.8.2-r2 [6.8.2-r1] (-3dfx) (-3dnow) +bitmap-fonts -cjk -debug -dlloader -dmx -doc +font-server -insecure-drivers +ipv6 -minimal (-mmx) +nls -nocxx +opengl +pam -sdk (-sse) -static +truetype-fonts +type1-fonts (-uclibc) -xprint +xv 0 kB 
[ebuild     U ] x11-terms/xterm-200-r3 [197] +Xaw3d* -toolbar +truetype +unicode 0 kB 
[ebuild     U ] app-editors/emacs-21.4-r1 [21.4] +X +Xaw3d -gnome +leim -lesstif +motif* +nls -nosendmail 0 kB 
[ebuild     U ] media-gfx/gqview-2.0.1 [1.5.3] 0 kB 
[ebuild     U ] app-shells/bash-3.0-r12 [3.0-r11] -bashlogger -build +nls 0 kB 
[ebuild     U ] sys-libs/cracklib-2.8.3-r1 [2.7-r11] 0 kB 
[ebuild     U ] sys-apps/man-1.6-r1 [1.5p] +nls 0 kB 
[ebuild     U ] sys-devel/gdb-6.3-r4 [6.3-r3] +nls -test -vanilla 0 kB 
[ebuild     U ] sys-devel/autoconf-wrapper-3-r1 [2-r1] 0 kB 
[ebuild     U ] app-arch/bzip2-1.0.3-r4 [1.0.3] -build -static 0 kB 
[ebuild     U ] games-fps/doom3-1.3.1302 [1.1.1286] +alsa -cdinstall -dedicated +opengl 0 kB 
[ebuild  NS   ] sys-kernel/gentoo-sources-2.6.12-r4  -build -doc -symlink (-ultra1) 0 kB 
[ebuild     U ] app-arch/gzip-1.3.5-r8 [1.3.5-r7] -build +nls -pic -static 0 kB 
[ebuild     U ] net-misc/dhcpcd-1.3.22_p4-r11 [1.3.22_p4-r5] -build -static 0 kB 
[ebuild     U ] media-libs/sdl-mixer-1.2.6 [1.2.5-r1] +mikmod +mp3 +vorbis* 0 kB 
[ebuild     U ] games-arcade/supertux-0.1.3 [0.1.2] +opengl 0 kB 
[ebuild     U ] sys-apps/kbd-1.12-r5 [1.12-r4] +nls 0 kB 
[ebuild     U ] www-client/links-2.1_pre17-r1 [2.1_pre17] +X -directfb +fbcon +gpm -javascript +jpeg -livecd +png +ssl (-svga) +tiff +unicode 0 kB 
[ebuild  NS   ] sys-libs/db-4.2.52_p2  -bootstrap -doc -java -nocxx +tcltk 0 kB 
[ebuild     U ] sys-libs/pam-0.78-r2 [0.77-r6] +berkdb -nis -pam_chroot -pam_console -pam_timestamp -pwdb (-selinux) 0 kB 
[ebuild     U ] sys-apps/shadow-4.0.7-r3 [4.0.5-r3] +nls +pam (-selinux) -skey 0 kB 
[ebuild     U ] sys-apps/pam-login-3.17 [3.14] -livecd +nls (-selinux) 0 kB 
[ebuild     U ] app-misc/colordiff-1.0.5 [1.0.4] 0 kB 
[ebuild    fU ] app-emulation/cedega-4.4 [4.3.2] +cups +opengl 0 kB 
[ebuild     U ] sys-fs/udev-058 [056] (-selinux) -static 0 kB 
[ebuild     U ] www-client/mozilla-firefox-1.0.5 [1.0.4] -debug -gnome +ipv6 -java -mozdevelop -moznoxft +mozsvg +truetype -xinerama -xprint 0 kB 
[ebuild     U ] net-analyzer/tcpdump-3.8.3-r4 [3.8.3-r3] +ipv6 +ssl 0 kB 


# emerge --info
Portage 2.0.51.22-r1 (default-linux/amd64/2005.0, gcc-3.4.3, glibc-2.3.5-r0, 2.6.12-gentoo-r4 x86_64)
=================================================================
System uname: 2.6.12-gentoo-r4 x86_64 AMD Athlon(tm) 64 Processor 3200+
Gentoo Base System version 1.6.12
dev-lang/python:     2.3.5
sys-apps/sandbox:    1.2.10
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=athlon64 -fomit-frame-pointer -fweb -ftracer -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=athlon64 -fomit-frame-pointer -fweb -ftracer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/opt/reserve/install/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 3dnowex X Xaw3d a52 aac aalib aim alsa avi bash-completion berkdb bitmap-fonts bluetooth bonobo bzlib cdparanoia cdr crypt cups curl dga dts dv dvd dvdr edl emacs encode ethereal exif fbcon ffmpeg flac flash font-server foomaticdb fortran ftp gdbm gif gimpprint gphoto2 gpm gtk gtk2 gtkhtml guile iconv icq imagemagic imagemagick imap imlib ipv6 jabber jack jbig jpeg junit ladcca lcms leim libcaca libwww live lm_sensors lzw lzw-tiff mad maildir matroska mikmod mime mng motif mozsvg mp3 mpeg msn mule ncurses network nls nvidia ofx ogg oggvorbis opengl oscar pam pda pdflib perl png pnp portaudio ppds python qt quicktime readline real recode rtc samba sdl slang snmp sockets sox speex spell ssl svg tcltk tcpd theora tiff truetype truetype-fonts type1-fonts unicode usb userlocales vcd vorbis wmf wxwindows xface xml xml2 xmms xosd xpm xv xvmc yahoo zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
Comment 1 Róbert Čerňanský 2005-07-16 02:46:29 UTC
Created attachment 63514 [details]
strace -f smbtree output
Comment 2 Róbert Čerňanský 2005-07-16 05:48:54 UTC
Just upgraded samba to latest unstable version 3.0.14a-r1 and it does not work
too. Same crashes as previous stable 3.0.10.
Comment 3 Róbert Čerňanský 2005-07-17 12:19:13 UTC
Maybe this is specific problem of my system (due to -ftracer flag (?)). And it
seems that it is not "bug" in Samba but in glibc. See discusion on gentoo-user
(http://thread.gmane.org/gmane.linux.gentoo.user/135549). You can close this bug
as INVALID or WORKSFORME if you decide. Maybe guys from toolchain will want to
look so I added them to CC.
Comment 4 SpanKY gentoo-dev 2005-07-17 22:35:43 UTC
works for me ... ftracer isnt really supported in gcc-3.4 ...

iirc it's much more stable in gcc-4
Comment 5 Róbert Čerňanský 2005-07-19 06:15:45 UTC
I can reproduce this bug in chrooted environment with fresh gentoo instalation 
from stage3.

The main problem are the environment variables LC_COLLATE and LC_CTYPE which I 
have set to value sk_SK. I did following steps to reproduce the bug (doing from 
current gentoo environment):

1. untar stage3-amd64-2005.0.tar.bz2 and portage snapshot to some empty partion 
(/mnt/gentoo)
2. set USE, CFLAGS, CHOST variables in make.conf (see emerge --info)
3. set variables LC_COLLATE=sk_SK and LC_CTYPE=sk_SK (in new file -
/mnt/gentoo/etc/env.d/000mybasic)
4. chroot to /mnt/gentoo as described in handbook
5. emerge --sync, choose profile, upgrade baselayout as in handbook
6. emerge -u world, emerge samba
7. run some samba command, e.g. smbtree - it should crash

When I remove LC_* variables from 000mybasic and then do:

1. env-update
2. emerge binutils linux-headers glibc

samba works correctly.


emerge --info of chrooted environment:

Portage 2.0.51.22-r1 (default-linux/amd64/2005.0, gcc-3.4.3, glibc-2.3.5-r0, 
2.6.12-gentoo-r4 x86_64)
=================================================================
System uname: 2.6.12-gentoo-r4 x86_64 AMD Athlon(tm) 64 Processor 3200+
Gentoo Base System version 1.6.12
dev-lang/python:     2.3.5
sys-apps/sandbox:    1.2.10
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=athlon64 -fomit-frame-pointer -fweb -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share
/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/shar
e/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=athlon64 -fomit-frame-pointer -fweb -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo 
http://distfiles.gentoo.org 
http://www.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 3dnowex Xaw3d a52 aac aalib aim alsa avi bash-completion berkdb 
bitmap-fonts bluetooth bzlib cdparanoia cdr crypt cups dga dts dv dvd dvdr edl 
encode ethereal exif fbcon ffmpeg flac flash font-server foomaticdb fortran ftp 
gif gimpprint gphoto2 gpm gtk gtk2 iconv icq imagemagic imap imlib ipv6 jabber 
jack jbig jpeg ladcca lcms leim libcaca live lm_sensors lzw lzw-tiff mad 
maildir matroska mikmod mime mng mozsvg mp3 mpeg msn mule ncurses network nls 
nvidia ofx ogg oggvorbis opengl oscar pam pda pdflib perl png pnp portaudio 
ppds python qt quicktime readline real recode rtc samba sdl snmp sockets sox 
speex spell ssl svg tcltk tcpd theora tiff truetype truetype-fonts type1-fonts 
unicode usb userlocales vcd vorbis wmf wxwindows xface xmms xosd xpm xv xvmc 
yahoo zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
Comment 6 Mikko Tanner 2005-07-19 12:07:20 UTC
I can confirm that this bug is indeed real, as I have the exact same problem
here. I recompiled most of my system due to the hassle with com_err and
mit-krb5, and this came up after recompiling samba & glibc. I now suspect that
glibc is the real culprit, but alas I'm no programmer...

CFLAGS="-O2 -pipe -march=k8", gcc-3.4.4, glibc-2.3.5, binutils-2.16.1,
hardened-sources-2.6.11-r15, 2.6.11-headers

In my case the trace ends with /usr/lib64/gconv/IBM850.so, and replacing that
file with one from stage3 tarball FIXES the problem. That is of course just a
temporary fix, but will work for someone in a pinch.
Comment 7 Mikko Tanner 2005-07-19 12:10:53 UTC
Additionally, this bug crops up with every samba version now available in
portage (tested), and also with samba-3.0.20pre2 (latest test release).
Replacing glibc files with older versions to fix a problem like this really
seems, well, I dunno :-)
Comment 8 Martin Schlemmer (RETIRED) gentoo-dev 2005-08-01 08:35:01 UTC
Two questions:

1) How do you make sure IBM85[02].so is used ?
2) Anybody tried to remerge glibc with gcc-3.4.4 ?  Or maybe upgrade to 2.3.5-r1?
Comment 9 Seemant Kulleen (RETIRED) gentoo-dev 2005-08-01 13:11:13 UTC
Mikko, Robert: please see and respond to comment #8
Comment 10 Mikko Tanner 2005-08-01 15:09:22 UTC
From my posts, you see that I'm using glibc-2.3.5 and gcc-3.4.4 (both hardened).
Upgrading to glibc-2.3.5-r1 does not solve the problem, but (in my case)
replacing the IBM850.so solves it. I have both straced and gdb'd samba's
corefiles many times, compiled with different CFLAGS+debug combinations. The
same crash happens every time.

I started a thread in the forums a while ago about this; there's more info about
how I traced this crash: http://forums.gentoo.org/viewtopic-t-361176.html

How should I proceed to exact the most of debugging information about this?
Comment 11 Róbert Čerňanský 2005-08-02 02:04:54 UTC
1. I saw that strace always ends near to

open("/usr/lib64/gconv/IBM852.so", O_RDONLY) = 2

so I've tried to replace it (with the one from live CD) and it works.


2. I did not tried newer versions of glibc/gcc. I've only tried to downgrade to 
glibc-2.3.4.20041102-r1 but it did not work (samba still crashed).
Comment 12 Mikko Tanner 2005-08-02 06:22:38 UTC
Created attachment 64933 [details]
readelf differences between a broen and working (stage3) file

This is a unified diff of "readelf -a" output between the working (original
stage3 tarball IBM850.so) and broken library in glibc-2.3.5-r1. Don't know if
that helps, but just tell me what to do/debug and I'll do it.
Comment 13 Seemant Kulleen (RETIRED) gentoo-dev 2005-08-03 06:37:21 UTC
seems like a hardened toolchain thing, reassigning to hardened, putting
toolchain in cc.
Comment 14 Róbert Čerňanský 2005-08-03 07:52:36 UTC
Note that I have normal instalation, not hardened. See comment #5 and original
report.
Comment 15 Mikko Tanner 2005-08-03 09:16:44 UTC
I prepared a chroot and populated its toolchain + relevant system software with
the exact same versions as are on the host system. I installed from stage3
tarball, but with one exception: I used default-linux/amd64/2004.3 profile. With
that exception the chroot is identical to the host system (same USE and CFLAGS etc).

Compiling glibc-2.3.5 and glibc-2.3.5-r1 in this chroot both produce a working
IBM850.so file. Meaning that samba works if I copy over the file from chroot to
the host system.

This leads me to believe that not everything is yet right with the 2005.0
profile (maybe multilib setup is botched somehow). This, and the inability to
compile glibc-2.3.5-r1 again under itself (long double error during linuxthreads
configure, conftest complains about a corrupted shared library) in my opinion
point to a more fundamental problem (perhaps incorrect 32-bit library handling).
Comment 16 Don Cowie 2005-09-04 04:21:49 UTC
Samba was working fine until I emerged updated to samba-3.0.20-r1 last night,
now I get the same error messages as the original post.
Comment 17 Jean Bréfort 2005-09-11 07:12:51 UTC
Replacing /usr/lib64/gconv/IBM852.so by the one in stage3 does not work for me.
I'm wondering wether this would not come from what causes from misuses of
pointer to integers. For me, it seems to crash in nt_printing.c
(upgrade_to_version_4)? I found in the callback it uses this:
int32 size_new_sec;
...
make_sec_desc(..., &size_new_sec);
This function requires a size_t* argument, not an int32* and on amd64, this is
not the same thing size_t being unsigned long int i.e. uint64 !
Seems that there are other occurences of such a problem.
Comment 18 Jean Bréfort 2005-09-11 07:48:11 UTC
Confirmed. If I replace int32 by size_t at nt-printing.c line 345, it does not
crash anymore.
I filed #3084 at bugzilla.samba.org
Comment 19 Scott Robert Ladd 2005-09-15 09:21:11 UTC
(In reply to comment #16)
> Samba was working fine until I emerged updated to samba-3.0.20-r1 last night,
> now I get the same error messages as the original post.

Are they going to downgrade Samba 3.0.20 in ~amd64 portage?
Comment 20 Jean Bréfort 2005-09-15 22:36:49 UTC
Dowgrading would not help. The bug has been fixed upstream.
Comment 21 helge preuss 2005-09-22 11:37:43 UTC
3.0.20-r1 doesn't work for me either, 3.0.14a-r3 does.
Shouldn't 3.0.20-r1 be masked for amd64?
Comment 22 SpanKY gentoo-dev 2005-09-22 12:08:19 UTC
can you post the URL to the bug and/or patch ?

either way, not a bug in toolchain and seems to be a bug which comes up on 64bit
arches, not just amd64
Comment 23 Jean Bréfort 2005-09-22 13:43:44 UTC
https://bugzilla.samba.org/show_bug.cgi?id=3084
Comment 24 Christian Andreetta (RETIRED) gentoo-dev 2005-10-14 06:43:08 UTC
Thanks: I just bumped samba-3.0.20b, which includes the fix. Could you please
check it?
Comment 25 Mikko Tanner 2005-12-08 22:09:48 UTC
(In reply to comment #24)
> Thanks: I just bumped samba-3.0.20b, which includes the fix. Could you please
> check it?

samba-3.0.20b does NOT fix the problem for me. glibc-2.3.5-r3, gcc-3.4.4,
samba-3.0.20b --> same problem as before. In strace output, as soon as execution
hits "/usr/lib64/gconv/IBM850.so", samba throws a SIGSEGV. As before, replacing
the library with one from stage3 tarball FIXES the crash.

Just let me know what information you need to fix this. I'll help in any way I can.

=======================================
[2005/12/09 07:52:32, 0] lib/util.c:smb_panic2(1548)
  PANIC: internal error
[2005/12/09 07:52:32, 0] lib/util.c:smb_panic2(1556)
  BACKTRACE: 19 stack frames:
   #0 /usr/sbin/smbd(smb_panic2+0x83) [0xfa7abc82253]
   #1 /usr/sbin/smbd(smb_panic+0x1d) [0xfa7abc8244d]
   #2 /usr/sbin/smbd [0xfa7abc6980f]
   #3 /usr/lib64/tls/libc.so.6 [0x39995e50ec10]
   #4 /usr/lib64/gconv/IBM850.so(gconv+0x1b4) [0x39995e9a79c4]
   #5 /usr/lib64/gconv/UTF-16.so(gconv+0x759) [0x39995e8a4149]
   #6 /usr/lib64/tls/libc.so.6 [0x39995e4fd818]
   #7 /usr/lib64/tls/libc.so.6(iconv+0x6b) [0x39995e4fcddb]
   #8 /usr/sbin/smbd [0xfa7abc91b53]
   #9 /usr/sbin/smbd(smb_iconv+0x11b) [0xfa7abc91cdb]
   #10 /usr/sbin/smbd [0xfa7abc65d53]
   #11 /usr/sbin/smbd(convert_string+0x1d8) [0xfa7abc66338]
   #12 /usr/sbin/smbd(init_doschar_table+0x79) [0xfa7abc7c2f9]
   #13 /usr/sbin/smbd(init_iconv+0x2cb) [0xfa7abc65beb]
   #14 /usr/sbin/smbd(lp_load+0xc52) [0xfa7abae31d2]
   #15 /usr/sbin/smbd(reload_services+0x67) [0xfa7abd0d137]
   #16 /usr/sbin/smbd(main+0x21a) [0xfa7abd0e37a]
   #17 /usr/lib64/tls/libc.so.6(__libc_start_main+0xe4) [0x39995e4fc6a4]
   #18 /usr/sbin/smbd [0xfa7abad6c8a]
=========================================
Comment 26 Róbert Čerňanský 2006-08-12 00:23:12 UTC
The bug is still present in samba-3.0.22-r3 and glibc-2.3.6-r4.
Comment 27 Fa Rin 2006-10-19 04:02:18 UTC
(In reply to comment #26)
> The bug is still present in samba-3.0.22-r3 and glibc-2.3.6-r4.
> 

Also have same bug in 3.0.23a

[2006/10/19 12:46:26, 0] lib/util.c:smb_panic(1592)
  PANIC (pid 24409): internal error
[2006/10/19 12:46:26, 0] lib/util.c:log_stack_trace(1699)
  BACKTRACE: 19 stack frames:
   #0 /usr/sbin/smbd(log_stack_trace+0x1c) [0x555555729bec]
   #1 /usr/sbin/smbd(smb_panic+0x43) [0x555555729cd3]
   #2 /usr/sbin/smbd [0x5555557185a2]
   #3 /lib/libc.so.6 [0x2ac8392905d0]
   #4 /usr/lib64/gconv/IBM850.so(gconv+0x1cb) [0x2ac8397b48fb]
   #5 /usr/lib64/gconv/UTF-16.so(gconv+0x30c) [0x2ac8396b0cbc]
   #6 /lib/libc.so.6 [0x2ac83927f078]
   #7 /lib/libc.so.6(iconv+0x6f) [0x2ac83927e68f]
   #8 /usr/sbin/smbd [0x555555736ce0]
   #9 /usr/sbin/smbd(smb_iconv+0x56) [0x555555736316]
   #10 /usr/sbin/smbd [0x555555715c25]
   #11 /usr/sbin/smbd(convert_string+0x1d2) [0x5555557161c2]
   #12 /usr/sbin/smbd(init_doschar_table+0x67) [0x555555725fa7]
   #13 /usr/sbin/smbd(init_iconv+0xe5) [0x555555714e95]
   #14 /usr/sbin/smbd(lp_load+0xca5) [0x5555555b3045]
   #15 /usr/sbin/smbd(reload_services+0x7d) [0x5555557a33ad]
   #16 /usr/sbin/smbd(main+0x49e) [0x5555557a397e]
   #17 /lib/libc.so.6(__libc_start_main+0xf4) [0x2ac83927e134]
   #18 /usr/sbin/smbd [0x5555555aa049]
Comment 28 Jakub Moc (RETIRED) gentoo-dev 2007-06-30 23:39:44 UTC
If you still have the problem w/ 3.0.24-r3, then reopen the bug. Cannot reproduce at all.
Comment 29 Róbert Čerňanský 2007-07-05 11:17:22 UTC
I can not reproduce it either (with samba 3.0.24-r3 and glibc-2.5-r3). It seems fixed.