Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Sep 2003 19:52:27 +0300
From:      "Stefan Chekanov" <d-bross@evrocom.net>
To:        <freebsd-threads@freebsd.org>
Subject:   Threads
Message-ID:  <000501c386aa$10fb1ac0$0100a8c0@stefan>

next in thread | raw e-mail | index | archive | help
Hi,

Sorry for bothering you.

I am developing an application for FreeBSD that utilizes multiple threads.
It works fine, except that after some minutes of work most of the threads
suddenly stop.

I have examined the stack and found that most of the threads have this stack
#0 ... in _thread_kern_sched() from /usr/lib/libc_r.so.4
#1 ... in _thread_kern_sched_state() from /usr/lib/libc_r.so.4
#2 ... in _thread_fd_lock_debug() from /usr/lib/libc_r.so.4
#3 ... in _close() from /usr/lib/libc_r.so.4
#4 ... in _res_close() from /usr/lib/libc_r.so.4
#5 ... in res_send() from /usr/lib/libc_r.so.4
#6 ... in res_query() from /usr/lib/libc_r.so.4
#7 ... in res_querydomain() from /usr/lib/libc_r.so.4
#8 ... in res_search() from /usr/lib/libc_r.so.4
#9 ... in _gethostbydnsname() from /usr/lib/libc_r.so.4
#10 ... in gethostbyname2() from /usr/lib/libc_r.so.4
#11 ... in gethostbyname() from /usr/lib/libc_r.so.4

and one trhead with this stack

#0 ... in _thread_sys_poll() from /usr/lib/libc_r.so.4
#1 ... in _thread_kern_sched_state_unlock() from /usr/lib/libc_r.so.4
#2 ... in _thread_kern_scheduler() from /usr/lib/libc_r.so.4
#3 0x0 in ??()

Does anybody have an idea what might cause threads to stop?
Is it possible that sockets library is not threads safe?
Especially the part that is used to resolve hostnames?

Any help/idea is welcome.

Thank you in advance.

Best regards,
Stefan
----------



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?000501c386aa$10fb1ac0$0100a8c0>