Bug #11047 Crash (signal 11) on startup when using db method for getservbyname()
Submitted: 2 Jun 2005 17:25 Modified: 31 Aug 2006 14:39
Reporter: Joerg Bruehe Email Updates:
Status: Unsupported Impact on me:
None 
Category:MySQL Server: BDB Severity:S3 (Non-critical)
Version:5.0.7-pre and up OS:Linux (Linux Debian 3.1 x86+PPC)
Assigned to: Jim Winstead CPU Architecture:Any

[2 Jun 2005 17:25] Joerg Bruehe
Description:
Snapshot of current 5.0 BK tree, but effect exists for some time already.

Test build + run on the loan Pegasos PPC box I have here.

Builds without problem, but on an attempt to run the tests the server immediately crashes with signal 11. This can be repeated. Happens on both "compile-ppc-max" and "compile-ppc-debug-max" builds. No core dump, no file left anywhere.

It reminds of bugs #3037, 4872, 5301, 9156, and 10154 which are about 4.0 and 4.1.
However, I can run 4.1 successfully on the box, so there must be a difference in 5.0 in this area.

This symptom was never noticed on "pegasos2" which is also Debian 3.1 PPC.
A binary distribution generated there also works on my box!
I do not know what the differences are, both use gcc 3.3.5.

Symptom on screen:
=== quote start ===
Installing Test Databases
Removing Stale Files
Installing Master Databases
running  ../sql/mysqld --no-defaults --bootstrap --skip-grant-tables     --basedir=. --datadir=./var/master-data --skip-innodb --skip-ndbcluster --skip-bdb     --language=../sql/share/english/ --character-sets-dir=../sql/share/charsets/
mysqld got signal 11;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help diagnose
the problem, but since we have already crashed, something is definitely wrong
and this may fail.

key_buffer_size=0
read_buffer_size=131072
max_used_connections=0
max_connections=100
threads_connected=0
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 217599 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Error executing mysqld --bootstrap
Error:  Could not install master test DBs
=== quote end ===

Running it with "strace" yields (command taken from 'mysql-test-run' output):
=== quote start ===
joerg@debian:/M50/work-5.0/mysql-test$ strace ../sql/mysqld --no-defaults --bootstrap --skip-grant-tables     --basedir=. --datadir=./var/master-data --skip-innodb --skip-ndbcluster --skip-bdb     --language=../sql/share/english/ --character-sets-dir=../sql/share/charsets/
execve("../sql/mysqld", ["../sql/mysqld", "--no-defaults", "--bootstrap", "--skip-grant-tables", "--basedir=.", "--datadir=./var/master-data", "--skip-innodb", "--skip-ndbcluster", "--skip-bdb", "--language=../sql/share/english/", "--character-sets-dir=../sql/share/charsets/"], [/* 15 vars */]) = 0
uname({sys="Linux", node="debian", ...}) = 0
brk(0)                                  = 0x1072c000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x30016000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=62029, ...}) = 0
mmap(NULL, 62029, PROT_READ, MAP_PRIVATE, 3, 0) = 0x30027000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/librt.so.1", O_RDONLY)       = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\0\34"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=28460, ...}) = 0
mmap(0xffce000, 137440, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xffce000
mprotect(0xffd5000, 108768, PROT_NONE)  = 0
mmap(0xffde000, 28672, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xffde000
mmap(0xffe5000, 43232, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xffe5000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/usr/lib/libz.so.1", O_RDONLY)    = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\0*t"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=76012, ...}) = 0
mmap(0xff9b000, 140996, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xff9b000
mprotect(0xffae000, 63172, PROT_NONE)   = 0
mmap(0xffbb000, 12288, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0x10000) = 0xffbb000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libdl.so.2", O_RDONLY)       = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\0  "..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=11252, ...}) = 0
mmap(0xff78000, 75756, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xff78000
mprotect(0xff7b000, 63468, PROT_NONE)   = 0
mmap(0xff88000, 12288, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xff88000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/usr/lib/libssl.so.0.9.7", O_RDONLY) = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\0\255"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=233640, ...}) = 0
mmap(0xff26000, 270116, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xff26000
mprotect(0xff55000, 77604, PROT_NONE)   = 0
mmap(0xff56000, 69632, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0x20000) = 0xff56000
mmap(0xff67000, 3876, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xff67000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/usr/lib/libcrypto.so.0.9.7", O_RDONLY) = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\3\233"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=1313429, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x30037000
mmap(0xfdec000, 1218188, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xfdec000
mprotect(0xfef0000, 153228, PROT_NONE)  = 0
mmap(0xfefc000, 90112, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0x100000) = 0xfefc000
mmap(0xff12000, 13964, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xff12000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libpthread.so.0", O_RDONLY)  = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\0BX"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=85254, ...}) = 0
mmap(0xfd7b000, 395692, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xfd7b000
mprotect(0xfd89000, 338348, PROT_NONE)  = 0
mmap(0xfd8b000, 61440, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xfd8b000
mmap(0xfd9a000, 268716, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xfd9a000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libcrypt.so.1", O_RDONLY)    = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\0\v"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=21104, ...}) = 0
mmap(0xfd2f000, 245344, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xfd2f000
mprotect(0xfd34000, 224864, PROT_NONE)  = 0
mmap(0xfd3f000, 20480, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xfd3f000
mmap(0xfd44000, 159328, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xfd44000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libnsl.so.1", O_RDONLY)      = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\0A\260"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=78036, ...}) = 0
mmap(0xfcf9000, 152312, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xfcf9000
mprotect(0xfd0c000, 74488, PROT_NONE)   = 0
mmap(0xfd19000, 12288, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0x10000) = 0xfd19000
mmap(0xfd1c000, 8952, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xfd1c000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libm.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\0\242"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=478124, ...}) = 0
mmap(0xfc64000, 542764, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xfc64000
mprotect(0xfcd6000, 75820, PROT_NONE)   = 0
mmap(0xfce4000, 20480, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0x70000) = 0xfce4000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\1\322"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=1298544, ...}) = 0
mmap(0xfb05000, 1370024, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xfb05000
mprotect(0xfc37000, 116648, PROT_NONE)  = 0
mmap(0xfc45000, 49152, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0x130000) = 0xfc45000
mmap(0xfc51000, 10152, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xfc51000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x30038000
munmap(0x30027000, 62029)               = 0
getpid()                                = 4510
rt_sigaction(SIGRTMIN, {0xfd830ac, [], 0}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0xfd83128, [], 0}, NULL, 8) = 0
rt_sigaction(SIGRT_2, {0xfd83230, [], 0}, NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [RTMIN], NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RT_1], NULL, 8) = 0
_sysctl({{CTL_KERN, KERN_VERSION}, 2, 0x7ffff9b0, 32, (nil), 0}) = 0
brk(0)                                  = 0x1072c000
brk(0x1074d000)                         = 0x1074d000
brk(0)                                  = 0x1074d000
umask(06)                               = 022
open("/usr/share/zoneinfo/MEZ-1MESZ", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/zoneinfo/posixrules", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=1267, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x30027000
read(3, "TZif\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0\0\0\4\0"..., 4096) = 1267
close(3)                                = 0
munmap(0x30027000, 4096)                = 0
time(NULL)                              = 1117707859
sched_get_priority_max(SCHED_OTHER)     = 0
sched_get_priority_min(SCHED_OTHER)     = 0
uname({sys="Linux", node="debian", ...}) = 0
getcwd("/M50/work-5.0/mysql-test", 4096) = 25
getcwd("/M50/work-5.0/mysql-test", 4078) = 25
ugetrlimit(0x7, 0x7ffffb28)             = 0
getpid()                                = 4510
time(NULL)                              = 1117707859
open("/M50/work-5.0/sql/share/english/errmsg.sys", O_RDONLY|O_LARGEFILE) = 3
read(3, "\376\376\2\1\1\0\213T\246\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 32) = 32
read(3, "\0\0\10\0\20\0\23\0\27\0>\0f\0\221\0\301\0\366\0001\1k"..., 844) = 844
read(3, "hashchk\0isamchk\0NO\0YES\0Can\'t cre"..., 21643) = 21643
close(3)                                = 0
stat64("/M50/work-5.0/mysql-test/../sql/share/charsets/Index.xml", {st_mode=S_IFREG|0664, st_size=18175, ...}) = 0
open("/M50/work-5.0/mysql-test/../sql/share/charsets/Index.xml", O_RDONLY|O_LARGEFILE) = 3
read(3, "<?xml version=\'1.0\' encoding=\"ut"..., 18175) = 18175
close(3)                                = 0
rt_sigaction(SIGALRM, {0xfd86a58, [], 0}, {SIG_DFL}, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [ALRM], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigaction(SIGSEGV, {0xfd86a58, [], SA_NOMASK|SA_ONESHOT}, NULL, 8) = 0
rt_sigaction(SIGABRT, {0xfd86a58, [], SA_NOMASK|SA_ONESHOT}, NULL, 8) = 0
rt_sigaction(SIGBUS, {0xfd86a58, [], SA_NOMASK|SA_ONESHOT}, NULL, 8) = 0
rt_sigaction(SIGILL, {0xfd86a58, [], SA_NOMASK|SA_ONESHOT}, NULL, 8) = 0
rt_sigaction(SIGFPE, {0xfd86a58, [], SA_NOMASK|SA_ONESHOT}, NULL, 8) = 0
rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGTERM, {0xfd86a58, [], 0}, NULL, 8) = 0
rt_sigaction(SIGHUP, {0xfd86a58, [], 0}, NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, [HUP INT QUIT PIPE TERM TSTP], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, [HUP INT QUIT PIPE TERM TSTP RTMIN], NULL, 8) = 0
sched_setscheduler(4510, SCHED_OTHER, { 9 }) = -1 EINVAL (Invalid argument)
ugetrlimit(0x3, 0x7ffffbd8)             = 0
unlink("/M50/work-5.0/mysql-test/var/master-data/debian.LOWER-TEST") = -1 ENOENT (No such file or directory)
open("/M50/work-5.0/mysql-test/var/master-data/debian.lower-test", O_RDWR|O_CREAT|O_LARGEFILE, 0666) = 3
close(3)                                = 0
stat64("/M50/work-5.0/mysql-test/var/master-data/debian.LOWER-TEST", 0x7ffffb70) = -1 ENOENT (No such file or directory)
unlink("/M50/work-5.0/mysql-test/var/master-data/debian.lower-test") = 0
chdir("/M50/work-5.0/mysql-test/var/master-data/") = 0
open("/etc/nsswitch.conf", O_RDONLY)    = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=465, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x30027000
read(3, "# /etc/nsswitch.conf\n#\n# Example"..., 4096) = 465
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x30027000, 4096)                = 0
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=62029, ...}) = 0
mmap(NULL, 62029, PROT_READ, MAP_PRIVATE, 3, 0) = 0x30027000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libnss_db.so.2", O_RDONLY)   = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\0\26"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=22340, ...}) = 0
mmap(0xfadf000, 87280, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xfadf000
mprotect(0xfae4000, 66800, PROT_NONE)   = 0
mmap(0xfaef000, 24576, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xfaef000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libnss_files.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\0 \214"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=43060, ...}) = 0
mmap(0xfab4000, 108256, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xfab4000
mprotect(0xfabe000, 67296, PROT_NONE)   = 0
mmap(0xfac4000, 45056, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xfac4000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/usr/lib/libdb3.so.3", O_RDONLY)  = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\1\""..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=878436, ...}) = 0
mmap(0xf9bd000, 944300, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xf9bd000
mprotect(0xfa92000, 71852, PROT_NONE)   = 0
mmap(0xfa9d000, 28672, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0xd0000) = 0xfa9d000
close(3)                                = 0
munmap(0x30027000, 62029)               = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
write(2, "mysqld got signal 11;\nThis could"..., 248mysqld got signal 11;
=== quote end ===
... followed by outputting the above message.

How to repeat:
Build + run on my box.
[13 Sep 2005 15:50] Joerg Bruehe
Yes, it still occurs with today's pull (= close to 5.0.13).

I still hope the "strace" output may shed a light.

The box on which it happens is a loaned Pegasos at home, firewalled.
The company Pegasos boxes have a changing availabilit:
Currently, "pegasos2" is down, but 1 and 3 are up.
[15 Sep 2005 20:19] Jim Winstead
i can't repeat this on pegasos1. given the signal 11 error, i would suspect a problem specific to the machine.

this site has some information that may be relevant:

http://www.bitwizard.nl/sig11/

you might want to try something like http://pyropus.ca/software/memtester/ on your box.
[11 Nov 2005 11:12] Kristian Nielsen
I was able to repeat this on x86 Debian GNU/Linux 3.1.

To repeat, use mysqldev@debx86.mysql.com:

1. Download a 5.0 .tar.gz snapshot
2. untar
3. ./configure --with-berkeley-db --with-debug=full
4. make
5. (cd mysql-test/ && ./mysql-test-run --force)

I left a compiled snapshot there, so a quick way to see the crash is

    ssh mysqldev@debx86
    cd knielsen/mysql-5.0.16-nightly-20051109/mysql-test
    ../sql/mysqld --no-defaults --bootstrap --skip-grant-tables     --basedir=. --datadir=./var/master-data --skip-innodb --skip-ndbcluster --skip-bdb     --language=../sql/share/english/ --character-sets-dir=../sql/share/charsets/

The crash happens in this call in set_ports() in sql/mysqld.cc: getservbyname("mysql", "tcp").

On this system, /etc/nsswitch.conf contains this line, to enable Berkeley DB lookup for getservbyname():

    services:       db files

Changing this line like this (to disable Berkeley DB lookup for getservbyname()) eliminates the problem:

    services:       files

I haven't investigated further, but this makes me certain that the problem is a conflict between the bundled BDB that is linked into mysql, and the system BDB that libc is compiled against.

A number of workarounds:
 1 Compile without --with-bdb
 2 Configure /etc/nsswitch.conf as above to not use Berkeley DB for lookups.
 3 Explicitly set the port for the server with --port (or run with --skip-networking); this avoid the call to getservbyname().

For mysql-test-run, workaround 3 requires to edit mysql-test/install_test_db to add a --port or --skip-networking option.

Not sure how to solve this properly, it might easily occur on other systems it seems to me, though Debian seems to be the only one with db method in /etc/nsswitch.conf as default. Would have to do some research to determine whether the system and the bundled BDB can be somehow kept 'separate' in the binary using linker options or whatever. For later...
[11 Jan 2006 13:30] Joerg Bruehe
Re-verified by Hartmut via bug#16286.
[17 Jan 2006 0:00] Hartmut Holzgraefe
see also bug #4872
[6 Feb 2006 18:34] Stolz
I come here redirected form bug #17135. I can reproduce a very similar error in a different platform (x86) but only on remote conections. 'Localhost' conections works like a charm. 
I've compiled MySQL without Berkeley DB support so the workaround related to /etc/nsswitch.conf did't help and the workaround related to skip-networking makes no sense because I only reproduce the error on remote conections.

BTW, Gentoo also uses 'db' by default in /etc/nsswitch.conf for services.

If it helps, here is the log:
InnoDB: !!!!!!!!!!!!!! UNIV_DEBUG switched on !!!!!!!!!!!!!!!
060205 17:16:40  InnoDB: Started; log sequence number 0 46952
/usr/sbin/mysqld: ready for connections.
Version: '4.1.14-debug-log'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306 
Gentoo Linux mysql-4.1.14
mysqld got signal 11;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help diagnose
the problem, but since we have already crashed, something is definitely wrong
and this may fail.

key_buffer_size=16777216
read_buffer_size=258048
max_used_connections=0
max_connections=100
threads_connected=0
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 92780
K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd=(nil)
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
Cannot determine thread, fp=0xbfb1dc98, backtrace may not be correct.
Stack range sanity check OK, backtrace follows:
0x814e1a6
0xffffe420
New value of fp=0x100 failed sanity check, terminating stack trace!
Please read http://dev.mysql.com/doc/mysql/en/Using_stack_trace.html and follow
instructions on how to resolve the stack tra
stack trace is much more helpful in diagnosing the problem, so please do
resolve it
The manual page at http://www.mysql.com/doc/en/Crashing.html contains
information that should help you find out what is causing the crash.
InnoDB: !!!!!!!!!!!!!! UNIV_DEBUG switched on !!!!!!!!!!!!!!!
InnoDB: Warning: we did not need to do crash recovery, but log scan
InnoDB: progressed past the checkpoint lsn 0 46952 up to lsn 0 46988
060205 17:16:44  InnoDB: Started; log sequence number 0 46952
/usr/sbin/mysqld: ready for connections.
Version: '4.1.14-debug-log'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306 
Gentoo Linux mysql-4.1.14
[14 Mar 2006 11:06] Jim Winstead
Note that the eventual patch for this will not prevent the crash, but simply provide more relevant information in the log to indicate how to work around it.
[18 Jul 2006 17:46] Jim Winstead
We won't even add the special crash message. This happens because of a conflict between the built-in BDB library and the system library pulled in by the system libraries. Because BDB is being made into an external storage engine in 5.1, and won't be shipped by default, this will become an even less frequent problem.