Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Nov 2000 14:46:43 +0200 (IST)
From:      Roman Shterenzon <roman@harmonic.co.il>
To:        Ekaterina Ivannikova <kate@gutatelecom.ru>
Cc:        freebsd-stable@FreeBSD.ORG
Subject:   Re: Possible problem in threads lib in -STABLE ?
Message-ID:  <Pine.LNX.4.10.10011061445051.24920-100000@shark.harmonic.co.il>
In-Reply-To: <20001103183733.A3580@hub.all.yans.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 3 Nov 2000, Ekaterina Ivannikova wrote:

> Hi All,
> 
> This is my third attempt at getting help, after trying freebsd-bugs and
> freebsd-hackers mailing lists. Folks, please, do have a look. 
> 
> 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. I cvsup'ed FreeBSD on Nov 2 (after the code freeze 
> I presume). The problem persists. 
> Just tell me, is it normal that an app should be stuck in _thread_sys_poll 
> when clients are trying to connect to it ?
> Please bear with me as I know nothing of threads programming :(.

You can try this:

http://people.freebsd.org/~deischen/libc_r.diffs-stable

Please contact

Daniel Eischen <eischen@vigrid.com>

about this issue.

pthreads were quite broken for our needs before this (huge) patch.
With this patch everything _we_ tried worked fine.

Too bad it won't make it into 4.2-RELEASE

> 
> # uname -a: 
> 
> FreeBSD hub.all.yans.ru 4.2-BETA FreeBSD 4.2-BETA #0: Fri Nov  3 14:15:01 MSK 2000     root@hub.all.yans.ru:/usr/src/sys/compile/HUB  i386
> 
> # ldd mysqld: 
> 
> /usr/local/mysql/libexec/mysqld:
> 	libc_r.so.4 => /usr/lib/libc_r.so.4 (0x281cb000)
> 	libm.so.2 => /usr/lib/libm.so.2 (0x2827a000)
> 	libz.so.2 => /usr/lib/libz.so.2 (0x28295000)
> 	libcrypt.so.2 => /usr/lib/libcrypt.so.2 (0x282a2000)
> 
> # gdb mysqld 41672
> 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.27-beta/sql/41672: No such file or directory.
> Attaching to program: /root/mysql-3.23.27-beta/sql/mysqld, process 41672
> 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.
> 0x2821f000 in _thread_sys_poll () from /usr/lib/libc_r.so.4
> (gdb) info threads
>   3 process 41672, thread 3  0x2821cdc2 in _thread_kern_sched ()
>    from /usr/lib/libc_r.so.4
>   2 process 41672, thread 2  0x2821cdc2 in _thread_kern_sched ()
>    from /usr/lib/libc_r.so.4
> * 1 process 41672, thread 1  0x2821f000 in _thread_sys_poll ()
>    from /usr/lib/libc_r.so.4
> (gdb) thread 1
> [Switching to thread 1 (process 41672, thread 1)]
> #0  0x2821f000 in _thread_sys_poll () from /usr/lib/libc_r.so.4
> (gdb) bt
> #0  0x2821f000 in _thread_sys_poll () from /usr/lib/libc_r.so.4
> #1  0x2821dec7 in _thread_kern_sched_state_unlock () from /usr/lib/libc_r.so.4
> #2  0x2821d5b2 in _thread_kern_sched () from /usr/lib/libc_r.so.4
> #3  0x2821d9d6 in _thread_kern_sched_state () from /usr/lib/libc_r.so.4
> #4  0x281e15df in sigwait () from /usr/lib/libc_r.so.4
> #5  0x807a3dc in signal_hand (arg=0x0) at mysqld.cc:1162
> #6  0x281e3a7f in _thread_start () from /usr/lib/libc_r.so.4
> #7  0x0 in ?? ()
> (gdb) thread 2
> [Switching to thread 2 (process 41672, thread 2)]
> #0  0x2821cdc2 in _thread_kern_sched () from /usr/lib/libc_r.so.4
> (gdb) bt
> #0  0x2821cdc2 in _thread_kern_sched () from /usr/lib/libc_r.so.4
> #1  0x2821da47 in _thread_kern_sched_state_unlock () from /usr/lib/libc_r.so.4
> #2  0x2821b9ee in pthread_mutex_lock () from /usr/lib/libc_r.so.4
> #3  0x2821bcf8 in _mutex_cv_lock () from /usr/lib/libc_r.so.4
> #4  0x28222fe8 in pthread_cond_timedwait () from /usr/lib/libc_r.so.4
> #5  0x2820bac9 in _thread_gc () from /usr/lib/libc_r.so.4
> #6  0x281e3a7f in _thread_start () from /usr/lib/libc_r.so.4
> #7  0x0 in ?? ()
> (gdb) thread 3
> [Switching to thread 3 (process 41672, thread 3)]
> #0  0x2821cdc2 in _thread_kern_sched () from /usr/lib/libc_r.so.4
> (gdb) bt
> #0  0x2821cdc2 in _thread_kern_sched () from /usr/lib/libc_r.so.4
> #1  0x2821d9d6 in _thread_kern_sched_state () from /usr/lib/libc_r.so.4
> #2  0x281e15df in sigwait () from /usr/lib/libc_r.so.4
> #3  0x807a3dc in signal_hand (arg=0x0) at mysqld.cc:1162
> #4  0x281e3a7f in _thread_start () from /usr/lib/libc_r.so.4
> #5  0x0 in ?? ()
> (gdb) 
> 
> Any advice is very much appreciated.
> 
> 
> Ekaterina Ivannikova  
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-stable" in the body of the message
> 

--Roman Shterenzon, UNIX System Administrator and Consultant
[ Xpert UNIX Systems Ltd., Herzlia, Israel. Tel: +972-9-9522361 ]



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.10.10011061445051.24920-100000>