s4 crash: *** glibc detected *** sbin/samba: malloc(): memory corruption (fast): 0x09b99b6 8 ***

Michael Wood esiotrot at gmail.com
Sun May 2 08:09:49 MDT 2010


Tried S4.  Instructions mostly worked fine but could do with some
minor tweaks.  Samba crashed at the end, but I was not able to
reproduce it.

Long version:
Last night I compiled Samba 4
(485def3b5dae7c77fb0c01ed99b6865b7c5ceeb8) using waf on an Ubuntu 9.04
system.  I followed the Waf and Samba4 HOWTO pages on the wiki.  There
were some things I wasn't sure of but managed to figure out without
too much trouble.

By the way, the HOWTO page recommends running "make quicktest" after
building.  Is "waf test" the equivalent for the waf build?

The install step says to run:

$ make install

which implies installing as a normal user.  I installed to my home
directory for testing, and so did not need to install as root.  This
caused samba not to start later complaining about the ownership of
various directories.  I fixed this by chowning the ones it complained
about to root:root.

The provision step in the HOWTO does not mention the --targetdir
option which I needed to specify before it worked.

I had to try running samba several times while chowning directories
before it was happy as mentioned above.  I ran samba with the -d10
option because I didn't notice what the problem was without that.
It's possible I didn't see the relevant error at -d0 or -d1 even
though it may have been there.  I didn't check later if the lower
debug levels printed the error I was looking for.  So when I got it
running it was running at debug level 10 for the rest of my tests
until it crashed.  i.e. it was running before I fiddled with
DNS/resolv.conf/hosts etc. and only crashed later after I had got
everything working.

The testing with smbclient worked fine.  I did not bother creating a
"test" share.

I initially didn't want to bother with the DNS config so skipped that
to begin with just to see what worked and what didn't.  Of course,
when I tried the "Testing kerberos" section it couldn't find the
domain, so I had to set up the DNS.  I did not want to install it on
my workstation where I installed Samba, so I installed it on an Ubuntu
8.04 VM I had lying around.  This was with bind 9.4.x, so for that
reason and because I didn't want to bother with the dynamic DNS and
Kerberised DNS updates stuff, I skipped that section.  I did still
include the named.conf.update file in the config, though.

The only problem I had with the DNS setup was that bind refused to
start, complaining that it didn't know what "ms-self" meant in the
named.conf.update file.  I wasn't sure what that was supposed to mean
and the named.conf man page wasn't helping, so I tried changing it to
"wildcard" instead, like the other lines and that got named to stop
complaining and start up.

I changed my /etc/resolv.conf to point at the VM and at that point all
the queries for SRV and A records worked fine and since I set up the
reverse zone the PTR records also worked.

I then tried kinit again, but it still didn't work.  After running
strace kinit ... I realised that it was getting tripped up by the thing as mentioned in the DNS section, so I changed my
/etc/hosts file to specify the ethernet interface's IP address instead
and that fixed it.

klist worked fine too, except that my klist (from Heimdal 1.3.x) did
not understand the -e option.

I skipped the filesystem testing section.

I then joined a Windows XP machine to the domain which worked fine.
After rebooting I could log in as the Administrator account in the

I installed the adminpak and SupportTools and was able to view the
users/groups etc. and add a user.

After trying all that out I decided to revert my resolv.conf and hosts
files to their original states.  I noticed shortly after that that
Samba had crashed.  I am not sure if the resolv.conf and/or the hosts
file changes had anything to do with this, but that's the only thing I
could think of that might have caused it.

I did try setting up resolv.conf and hosts as before, restarting samba
and then reverting them again to see what happened, but it did not
crash again.

Here's what was printed to the terminal when it crashed:

*** glibc detected *** sbin/samba: malloc(): memory corruption (fast):
0x09b99b68 ***
======= Backtrace: =========
======= Memory map: ========
08048000-084c7000 r-xp 00000000 fc:05 2362962
084c8000-084cf000 r--p 0047f000 fc:05 2362962
084cf000-084d1000 rw-p 00486000 fc:05 2362962
084d1000-084d3000 rw-p 084d1000 00:00 0
08dad000-09d48000 rw-p 08dad000 00:00 0          [heap]
b3b00000-b3b21000 rw-p b3b00000 00:00 0
b3b21000-b3c00000 ---p b3b21000 00:00 0
b3c27000-b3c4c000 rw-s 00000000 fc:05 2363003
b3c6f000-b3c7c000 r-xp 00000000 fc:00 2967       /lib/libgcc_s.so.1
b3c7c000-b3c7d000 r--p 0000c000 fc:00 2967       /lib/libgcc_s.so.1
b3c7d000-b3c7e000 rw-p 0000d000 fc:00 2967       /lib/libgcc_s.so.1
b3c7e000-b3c88000 r-xp 00000000 fc:00 2514
b3c88000-b3c89000 r--p 00009000 fc:00 2514
b3c89000-b3c8a000 rw-p 0000a000 fc:00 2514
b3c8a000-b3c8c000 r-xp 00000000 fc:01 16372      /usr/lib/gconv/IBM850.so
b3c8c000-b3c8d000 r--p 00001000 fc:01 16372      /usr/lib/gconv/IBM850.so
b3c8d000-b3c8e000 rw-p 00002000 fc:01 16372      /usr/lib/gconv/IBM850.so
b3ca9000-b3cc5000 rw-s 00000000 fc:05 2363000
b3cc5000-b3ce5000 rw-s 00000000 fc:05 2363002
b3ce5000-b5205000 rw-s 00000000 fc:05 2363008
b5205000-b62a5000 rw-s 00000000 fc:05 2363007
b62a5000-b6684000 rw-s 00000000 fc:05 2363006
b6684000-b6985000 rw-s 00000000 fc:05 2363004
b6985000-b6987000 rw-p b6985000 00:00 0
b6987000-b698a000 r-xp 00000000 fc:00 2974       /lib/libgpg-error.so.0.3.0
b698a000-b698b000 rw-p 00002000 fc:00 2974       /lib/libgpg-error.so.0.3.0
b698b000-b699b000 r-xp 00000000 fc:01 6825       /usr/lib/libtasn1.so.3.0.16
b699b000-b699c000 r--p 0000f000 fc:01 6825       /usr/lib/libtasn1.so.3.0.16
b699c000-b699d000 rw-p 00010000 fc:01 6825       /usr/lib/libtasn1.so.3.0.16
b699d000-b699e000 rw-p b699d000 00:00 0
b699e000-b6afa000 r-xp 00000000 fc:00 2517       /lib/tls/i686/cmov/libc-2.9.so
b6afa000-b6afb000 ---p 0015c000 fc:00 2517       /lib/tls/i686/cmov/libc-2.9.so
b6afb000-b6afd000 r--p 0015c000 fc:00 2517       /lib/tls/i686/cmov/libc-2.9.so
b6afd000-b6afe000 rw-p 0015e000 fc:00 2517       /lib/tls/i686/cmov/libc-2.9.so
b6afe000-b6b01000 rw-p b6afe000 00:00 0
b6b01000-b6cfc000 r-xp 00000000 fc:01 17747      /usr/lib/libpython2.6.so.1.0
b6cfc000-b6cfd000 r--p 001fa000 fc:01 17747      /usr/lib/libpython2.6.so.1.0
b6cfd000-b6d4a000 rw-p 001fb000 fc:01 17747      /usr/lib/libpython2.6.so.1.0
b6d4a000-b6d54000 rw-p b6d4a000 00:00 0
b6d54000-b6d69000 r-xp 00000000 fc:00 2545
b6d69000-b6d6a000 r--p 00014000 fc:00 2545
b6d6a000-b6d6b000 rw-p 00015000 fc:00 2545
b6d6b000-b6d6d000 rw-p b6d6b000 00:00 0
b6d6d000-b6d91000 r-xp 00000000 fc:00 2525       /lib/tls/i686/cmov/libm-2.9
INTERNAL ERROR: Signal 6 in pid 8946 (4.0.0alpha12-GIT-485def3)
Please read the file BUGS.txt in the distribution
PANIC: internal error
BACKTRACE: 37 stack frames:
 #0 /home/michael/samba-waf-test/lib/libLIBSAMBA-UTIL-samba4.so.0(call_backtrace+0x2b)
 #1 /home/michael/samba-waf-test/lib/libLIBSAMBA-UTIL-samba4.so.0(smb_panic+0x24c)
 #2 /home/michael/samba-waf-test/lib/libLIBSAMBA-UTIL-samba4.so.0 [0xb70779ee]
 #3 /home/michael/samba-waf-test/lib/libLIBSAMBA-UTIL-samba4.so.0(fault_setup+0)
 #4 [0xb7856400]
 #5 /lib/tls/i686/cmov/libc.so.6(abort+0x188) [0xb69cb098]
 #6 /lib/tls/i686/cmov/libc.so.6 [0xb6a0724d]
 #7 /lib/tls/i686/cmov/libc.so.6 [0xb6a0d604]
 #8 /lib/tls/i686/cmov/libc.so.6 [0xb6a105b6]
 #9 /lib/tls/i686/cmov/libc.so.6(__libc_malloc+0x95) [0xb6a119c5]
 #10 /home/michael/samba-waf-test/lib/libtalloc-samba4.so.2 [0xb6f76cb3]
 #11 /home/michael/samba-waf-test/lib/libtalloc-samba4.so.2 [0xb6f76fee]
 #12 /home/michael/samba-waf-test/lib/libtalloc-samba4.so.2(talloc_named_const+0x1f)
 #13 /home/michael/samba-waf-test/lib/libldb-samba4.so.0 [0xb736d2eb]
 #14 /home/michael/samba-waf-test/lib/libldb-samba4.so.0 [0xb736d624]
 #15 /home/michael/samba-waf-test/lib/libldb-samba4.so.0 [0xb736d6bd]
 #16 /home/michael/samba-waf-test/lib/libldb-samba4.so.0(ldb_parse_tree+0x77)
 #17 /home/michael/samba-waf-test/lib/libldb-samba4.so.0(ldb_build_search_req+0x24)
 #18 /home/michael/samba-waf-test/lib/libldb-samba4.so.0(ldb_search+0x11c)
 #19 /home/michael/samba-waf-test/lib/libldb-samba4.so.0(dsdb_loadreps+0x91)
 #20 sbin/samba [0x8081364]
 #21 sbin/samba [0x8081d26]
 #22 sbin/samba [0x807349f]
 #23 /home/michael/samba-waf-test/lib/libldb-samba4.so.0 [0xb72a485e]
 #24 /home/michael/samba-waf-test/lib/libldb-samba4.so.0 [0xb72a49c5]
 #25 /home/michael/samba-waf-test/lib/libldb-samba4.so.0 [0xb72a279c]
 #26 /home/michael/samba-waf-test/lib/libldb-samba4.so.0 [0xb72a33f1]
 #27 /home/michael/samba-waf-test/lib/libldb-samba4.so.0 [0xb72a346b]
 #28 /home/michael/samba-waf-test/lib/libtevent-samba4.so.0 [0xb701f498]
 #29 /home/michael/samba-waf-test/lib/libtevent-samba4.so.0 [0xb701fb48]
 #30 /home/michael/samba-waf-test/lib/libtevent-samba4.so.0(_tevent_loop_once+0xdf)
 #31 /home/michael/samba-waf-test/lib/libtevent-samba4.so.0(tevent_common_loop_wait+0x26)
 #32 /home/michael/samba-waf-test/lib/libtevent-samba4.so.0(_tevent_loop_wait+0x1d)
 #33 sbin/samba [0x83edcaa]
 #34 sbin/samba [0x83edd0f]
 #35 /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5) [0xb69b4775]
 #36 sbin/samba [0x8072eb1]

I also managed to crash mmc on the XP box, but I don't know if that's
Samba's fault, so will ignore it :)

Michael Wood <esiotrot at gmail.com>

More information about the samba-technical mailing list