Date: Thu, 19 Oct 2000 18:07:04 +0400 From: Ekaterina Ivannikova <kate@gutatelecom.ru> To: freebsd-bugs@freebsd.org Subject: possible problem with threads lib in FreeBSD 4.1 Message-ID: <20001019180703.A3176@hub.all.yans.ru>
next in thread | raw e-mail | index | archive | help
Hi All, I was pursuing a strange bug which causes mysqld to hang (that is not to accept any new connections) on FreeBSD 4.1 after working for some time properly and MySQL folks suggested that there may be some pecularity in FreeBSD threads library. Here is the relevant information. >Release: mysql-3.23.25-beta (Source distribution) >Environment: <machine, os, target, libraries (multiple lines)> System: FreeBSD hub.all.yans.ru 4.1-RELEASE FreeBSD 4.1-RELEASE #2: Mon Oct 9 14:22:57 MSD 2000 root@hub.all.yans.ru:/usr/src/sys/compile/HUB i386 Some paths: /usr/bin/perl /usr/bin/make /usr/local/bin/gmake /usr/bin/gcc /usr/bin/cc GCC: Using builtin specs. gcc version 2.95.2 19991024 (release) Compilation info: CC='cc' CFLAGS='-Wall -pipe' CXX='cc' CXXFLAGS='-Wall -pipe -fno-rtti -fno-exceptions -felide-constructors' LDFLAGS='' LIBC: -r--r--r-- 1 root wheel 1156960 Jul 28 17:05 /usr/lib/libc.a lrwxrwxrwx 1 root wheel 9 Aug 30 21:17 /usr/lib/libc.so -> libc.so.4 -r--r--r-- 1 root wheel 553460 Jul 28 17:05 /usr/lib/libc.so.4 Configure command: ./configure --prefix=/usr/local/mysql --with-debug=full --without-readline --enable-assembler --localstatedir=/var/db/mysql --enable-thread-safe-client Perl: This is perl, version 5.005_03 built for i386-freebsd Attaching with gdb to mysqld process produced the following output: bash-2.04# gdb mysqld 47659 GNU gdb 4.18 Copyright 1998 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-unknown-freebsd"... /root/mysql-3.23.25-beta/sql/47659: No such file or directory. Attaching to program: /root/mysql-3.23.25-beta/sql/mysqld, process 47659 Reading symbols from /usr/lib/libc_r.so.4...done. Reading symbols from /usr/lib/libm.so.2...done. Reading symbols from /usr/lib/libz.so.2...done. Reading symbols from /usr/lib/libcrypt.so.2...done. Reading symbols from /usr/libexec/ld-elf.so.1...done. 0x2821ff64 in _thread_sys_poll () from /usr/lib/libc_r.so.4 (gdb) info threads 4 process 47659, thread 4 0x2821780e in _thread_kern_sched () from /usr/lib/libc_r.so.4 3 process 47659, thread 3 0x2821780e in _thread_kern_sched () from /usr/lib/libc_r.so.4 2 process 47659, thread 2 0x2821780e in _thread_kern_sched () from /usr/lib/libc_r.so.4 * 1 process 47659, thread 1 0x2821ff64 in _thread_sys_poll () from /usr/lib/libc_r.so.4 (gdb) thread 1 [Switching to thread 1 (process 47659, thread 1)] #0 0x2821ff64 in _thread_sys_poll () from /usr/lib/libc_r.so.4 (gdb) bt #0 0x2821ff64 in _thread_sys_poll () from /usr/lib/libc_r.so.4 #1 0x28218913 in _thread_kern_sched_state_unlock () from /usr/lib/libc_r.so.4 #2 0x28217ffe in _thread_kern_sched () from /usr/lib/libc_r.so.4 #3 0x28218493 in _thread_kern_sched_state_unlock () from /usr/lib/libc_r.so.4 #4 0x2821643a in pthread_mutex_lock () from /usr/lib/libc_r.so.4 #5 0x2821d329 in pthread_exit () from /usr/lib/libc_r.so.4 #6 0x8079ca1 in end_thread (thd=0x8a3d000, put_in_cache=true) at mysqld.cc:928 #7 0x807ef15 in handle_one_connection (arg=0x8a3d000) at sql_parse.cc:421 #8 0x281df65b in _thread_start () from /usr/lib/libc_r.so.4 #9 0x0 in ?? () (gdb) thread 2 [Switching to thread 2 (process 47659, thread 2)] #0 0x2821780e in _thread_kern_sched () from /usr/lib/libc_r.so.4 (gdb) bt #0 0x2821780e in _thread_kern_sched () from /usr/lib/libc_r.so.4 #1 0x28218493 in _thread_kern_sched_state_unlock () from /usr/lib/libc_r.so.4 #2 0x2821643a in pthread_mutex_lock () from /usr/lib/libc_r.so.4 #3 0x2821d329 in pthread_exit () from /usr/lib/libc_r.so.4 #4 0x8079ca1 in end_thread (thd=0x8a3d000, put_in_cache=true) at mysqld.cc:928 #5 0x807ef15 in handle_one_connection (arg=0x8a3d000) at sql_parse.cc:421 #6 0x281df65b in _thread_start () from /usr/lib/libc_r.so.4 #7 0x0 in ?? () (gdb) thread 3 [Switching to thread 3 (process 47659, thread 3)] #0 0x2821780e in _thread_kern_sched () from /usr/lib/libc_r.so.4 (gdb) bt #0 0x2821780e in _thread_kern_sched () from /usr/lib/libc_r.so.4 #1 0x28218493 in _thread_kern_sched_state_unlock () from /usr/lib/libc_r.so.4 #2 0x2821643a in pthread_mutex_lock () from /usr/lib/libc_r.so.4 #3 0x28216744 in _mutex_cv_lock () from /usr/lib/libc_r.so.4 #4 0x2821da14 in pthread_cond_timedwait () from /usr/lib/libc_r.so.4 #5 0x28205389 in _thread_gc () from /usr/lib/libc_r.so.4 #6 0x281df65b in _thread_start () from /usr/lib/libc_r.so.4 #7 0x0 in ?? () (gdb) thread 4 [Switching to thread 4 (process 47659, thread 4)] #0 0x2821780e in _thread_kern_sched () from /usr/lib/libc_r.so.4 (gdb) bt #0 0x2821780e in _thread_kern_sched () from /usr/lib/libc_r.so.4 #1 0x28218422 in _thread_kern_sched_state () from /usr/lib/libc_r.so.4 #2 0x281dd39b in sigwait () from /usr/lib/libc_r.so.4 #3 0x807a244 in signal_hand (arg=0x0) at mysqld.cc:1153 #4 0x281df65b in _thread_start () from /usr/lib/libc_r.so.4 #5 0x0 in ?? () (gdb) Clients left connected were still able to communicate thru the existing connections. mysqld process is shown by ps as idle. FreeBSD is a vanilla 4.1-RELEASE with only tcp-iss patch installed, though mysqld hung without the patch as well. I looked in the stable branch on ftp, it seems that sources for libc_r were last changed in April, so no reason for upgrade ? Any advice is very much appreciated. Ekaterina Ivannikova To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001019180703.A3176>