Bug #6445 | Binaries build on 2.6 do not work on 2.4 kernels (bdb mutex/thread/NPTL issue) | ||
---|---|---|---|
Submitted: | 4 Nov 2004 22:26 | Modified: | 11 Jan 2005 17:27 |
Reporter: | Christian Hammers (Silver Quality Contributor) (OCA) | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | MySQL Server: Compiling | Severity: | S3 (Non-critical) |
Version: | 4.1.7 | OS: | Linux (Debian/GNU Linux) |
Assigned to: | CPU Architecture: | Any |
[4 Nov 2004 22:26]
Christian Hammers
[5 Nov 2004 0:37]
Christian Hammers
A fix that helps me is below. It's for x86 architecture only, of course... --- old/configure.orig 2004-11-05 00:33:26.000000000 +0100 +++ new/configure 2004-11-04 23:47:07.000000000 +0100 @@ -36578,7 +36578,7 @@ echo "CONFIGURING FOR BERKELEY DB" - bdb_conf_flags="--disable-shared" + bdb_conf_flags="--disable-shared --with-mutex=x86/gcc-assembly" if test $with_debug = "yes" then bdb_conf_flags="$bdb_conf_flags --enable-debug --enable-diagnostic"
[11 Jan 2005 17:27]
Aleksey Kishkin
Checked on slackware, compiled with kernel 2.6.7 and run with kernel 2.4.26. Created a bdb table and insert one record. All works without problem. if you have ideas (or even better testcase) what can be a cause of errors you noticed, please post it here and we'll check them.
[11 Jan 2005 17:49]
Christian Hammers
Can you provide a) uname -rm b) getconf GNU_LIBPTHREAD_VERSION to see, which Threads version you kernel is using c) your build or at least configure log file? Esp. the line with "checking for mutex" to see which variant your build actually contains. d) ldd /usr/sbin/mysql | grep thread For me it's: Kernel 2.6: a) 2.6.9-1-k7 i686 b) NPTL 0.60" c) checking for mutexes... x86/gcc-assembly (patched) checking for mutexes... POSIX/pthreads/library (unpatched) d) libpthread.so.0 => /lib/tls/libpthread.so.0 (symlink to libpthread-0.60.so) Kernel 2.4: a) 2.4.27-1-k7 i686 b) linuxthreads-0.10 c) checking for mutexes... x86/gcc-assembly d) libpthread.so.0 => /lib/libpthread.so.0 (symlink to libpthread-0.10.so) thanks, -christian-
[11 Jan 2005 18:03]
Christian Hammers
ltrace
Attachment: t.ltrace.bz2 (application/octet-stream, text), 40.47 KiB.
[11 Jan 2005 18:04]
Christian Hammers
strace
Attachment: t.strace.bz2 (application/octet-stream, text), 5.26 KiB.
[11 Jan 2005 18:06]
Christian Hammers
I've just added an strace and ltrace from a crashing mysqld produced with ltrace -f -s255 -o t.ltrace /usr/sbin/mysqld strace -f -s255 -o t.strace /usr/sbin/mysqld In the ltrace you see this interesting part: 2428 strlen("process-private") = 15 2428 malloc(16) = 0x867a1c8 2428 memcpy(0x867a1c8, "process-private", 16) = 0x867a1c8 2428 memset(0xbffff550, '\000', 132) = 0xbffff550 2428 malloc(16384) = 0x8680490 2428 memset(0x8680490, '\000', 100) = 0x8680490 2428 pthread_mutexattr_init(0xbffff4a8, 0, 100, 0x828bfff, 0) = 0 2428 pthread_mutexattr_setpshared(0xbffff4a8, 1, 100, 0x828bfff, 0) = 38 2428 pthread_mutexattr_destroy(0xbffff4a8, 1, 100, 0x828bfff, 0) = 0 2428 sysconf(84, 38, 0xbffff4b8, 0x82a32ab, 0x8680240) = 1 2428 strerror(38) = "Function not implemented" bye, -christian-