From owner-freebsd-current@FreeBSD.ORG Thu Aug 5 12:40:20 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C157D16A4CF for ; Thu, 5 Aug 2004 12:40:20 +0000 (GMT) Received: from d162.mplik.ru (relay1.mplik.ru [212.23.64.162]) by mx1.FreeBSD.org (Postfix) with SMTP id 5C92F43D2F for ; Thu, 5 Aug 2004 12:40:19 +0000 (GMT) (envelope-from ngl@ur.ru) Received: from d162.mplik.ru (localhost [127.0.0.1]) by localhost (Postfix) with SMTP id 077B699C005 for ; Thu, 5 Aug 2004 18:40:14 +0600 (YEKST) Received: from spirit (wall.mplik.ru [195.58.1.141]) by d162.mplik.ru (Postfix) with SMTP id DDB7799BED8 for ; Thu, 5 Aug 2004 18:40:13 +0600 (YEKST) Message-ID: <0d4801c47ae9$5a9a5950$0202000a@spirit> From: "ngl" To: Date: Thu, 5 Aug 2004 18:40:13 +0600 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.3790.0 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0 X-Spam-Status: No, tests=bogofilter, spamicity=0.822252, version=0.12.3 X-Sagator-Scanner: 0.4.9-0rc1; drop(clamd()) deliver(BogoFilter()) Subject: pthread_cond_wait failed X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Aug 2004 12:40:20 -0000 Hello all I'm using pcap and c_r libraries under FreeBSD 5.2.1-p9. I have faced a problem, when one thread call pthread_cond_wait function, i get 'Segmentation fault (core dumped)' message. Here is the dump: GNU gdb 5.2.1 (FreeBSD) Copyright 2002 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"... (gdb) core test.core Core was generated by `test'. Program terminated with signal 11, Segmentation fault. Reading symbols from /lib/libc.so.5...done. Loaded symbols for /lib/libc.so.5 Reading symbols from /usr/lib/libc_r.so.5...done. Loaded symbols for /usr/lib/libc_r.so.5 Reading symbols from /usr/lib/libpcap.so.2...done. Loaded symbols for /usr/lib/libpcap.so.2 Reading symbols from /usr/libexec/ld-elf.so.1...done. Loaded symbols for /usr/libexec/ld-elf.so.1 #0 0x28159ef9 in _atomic_lock () from /usr/lib/libc_r.so.5 (gdb) bt #0 0x28159ef9 in _atomic_lock () from /usr/lib/libc_r.so.5 #1 0x28159da9 in _spinlock () from /usr/lib/libc_r.so.5 #2 0x2815fbd2 in _mutex_cv_lock () from /usr/lib/libc_r.so.5 #3 0x2815fa79 in _mutex_cv_unlock () from /usr/lib/libc_r.so.5 #4 0x2816488f in _pthread_cond_wait () from /usr/lib/libc_r.so.5 #5 0x281649ee in pthread_cond_wait () from /usr/lib/libc_r.so.5 #6 0x280bcf35 in pthread_cond_wait () from /lib/libc.so.5 #7 0x08049486 in printThread (pv=0x0) at test.c:67 #8 0x2815842e in _thread_start () from /usr/lib/libc_r.so.5 regards, Nik