From owner-freebsd-threads@FreeBSD.ORG Mon Sep 29 09:52:33 2003 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C15D316A4B3 for ; Mon, 29 Sep 2003 09:52:33 -0700 (PDT) Received: from main.evrocom.net (main.evrocom.net [212.39.92.2]) by mx1.FreeBSD.org (Postfix) with SMTP id A7FE043FE0 for ; Mon, 29 Sep 2003 09:52:31 -0700 (PDT) (envelope-from d-bross@evrocom.net) Received: (qmail 38646 invoked from network); 29 Sep 2003 16:52:28 -0000 Received: from unknown (HELO stefan) (217.10.249.49) by main.evrocom.net with SMTP; 29 Sep 2003 16:52:28 -0000 Message-ID: <000501c386aa$10fb1ac0$0100a8c0@stefan> From: "Stefan Chekanov" To: Date: Mon, 29 Sep 2003 19:52:27 +0300 MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Subject: Threads X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Sep 2003 16:52:33 -0000 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 ----------