From owner-freebsd-threads@FreeBSD.ORG Thu Apr 29 10:39:29 2004 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 51EDC16A4CE for ; Thu, 29 Apr 2004 10:39:29 -0700 (PDT) Received: from rwcrmhc13.comcast.net (rwcrmhc13.comcast.net [204.127.198.39]) by mx1.FreeBSD.org (Postfix) with ESMTP id CFCDD43D46 for ; Thu, 29 Apr 2004 10:39:28 -0700 (PDT) (envelope-from julian@elischer.org) Received: from interjet.elischer.org ([24.7.73.28]) by comcast.net (rwcrmhc13) with ESMTP id <2004042917392801500i0q48e>; Thu, 29 Apr 2004 17:39:28 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id KAA87566 for ; Thu, 29 Apr 2004 10:39:27 -0700 (PDT) X-Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id IAA86487 for ; Thu, 29 Apr 2004 08:50:40 -0700 (PDT) X-Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id CE4D955672 for ; Thu, 29 Apr 2004 08:50:39 -0700 (PDT) (envelope-from owner-freebsd-current@freebsd.org) X-Received: by hub.freebsd.org (Postfix) id CFD1D16A50B; Thu, 29 Apr 2004 08:50:08 -0700 (PDT) Delivered-To: julian@freebsd.org X-Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id B296B16A4FF; Thu, 29 Apr 2004 08:50:08 -0700 (PDT) Delivered-To: freebsd-current@freebsd.org X-Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5E56E16A4CE for ; Thu, 29 Apr 2004 08:49:55 -0700 (PDT) X-Received: from mail.a-quadrat.at (mail.a-quadrat.at [81.223.141.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id E2C6F43D5C for ; Thu, 29 Apr 2004 08:49:54 -0700 (PDT) (envelope-from mbretter@a-quadrat.at) X-Received: from localhost (localhost.a-quadrat.at [127.0.0.1]) by mail.a-quadrat.at (Postfix) with ESMTP id 0E11C5D025 for ; Thu, 29 Apr 2004 17:49:54 +0200 (CEST) X-Received: from mail.a-quadrat.at ([127.0.0.1]) by localhost (files.a-quadrat.at [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 37379-09 for ; Thu, 29 Apr 2004 17:49:52 +0200 (CEST) X-Received: from a-quadrat.at (files.a-quadrat.at [192.168.90.9]) by mail.a-quadrat.at (Postfix) with ESMTP id 909C75C3CA for ; Thu, 29 Apr 2004 17:49:52 +0200 (CEST) Message-ID: <4091241D.7020501@a-quadrat.at> Date: Thu, 29 Apr 2004 17:49:49 +0200 From: Michael Bretterklieber User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.6) Gecko/20040113 X-Accept-Language: de-at, de, en-us, en MIME-Version: 1.0 To: current@FreeBSD.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at a-quadrat.at X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Sender: owner-freebsd-current@freebsd.org Errors-To: owner-freebsd-current@freebsd.org ReSent-Date: Thu, 29 Apr 2004 10:39:18 -0700 (PDT) Resent-From: Julian Elischer Resent-To: threads@freebsd.org ReSent-Subject: libthr, libpthread problems ReSent-Message-ID: Subject: libthr, libpthread problems X-BeenThere: freebsd-threads@freebsd.org List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Apr 2004 17:39:29 -0000 Hi, currently I'm testing Mpd-4 on -current and It ran into deadlock, therefore I changed the lib mapping via libmap.conf. When using libc_r everything is ok, when using libpthread a deadlock occurs under some circumstances, when using libthr, then: elvis:/home/mbretter/mpd/src# ./mpd Multi-link PPP for FreeBSD, by Archie L. Cobbs. Based on iij-ppp, by Toshiharu OHNO. The mutex recurse count cannot be less than zero Abnormal termination, file: /usr/src/lib/libthr/thread/thr_mutex.c, line: 677 Abort trap (core dumped) #0 0x282dd48b in thr_kill () from /lib/libc.so.5 (gdb) bt #0 0x282dd48b in thr_kill () from /lib/libc.so.5 #1 0x28287e9f in _pthread_kill (pthread=0x808e000, sig=6) at /usr/src/lib/libthr/thread/thr_sig.c:94 #2 0x28287aab in _raise (sig=6) at /usr/src/lib/libthr/thread/thr_syscalls.c:282 #3 0x2833ff4f in abort () from /lib/libc.so.5 #4 0x2828a9bf in mutex_unlock_common (mutex=0x281460b0, add_reference=0) at /usr/src/lib/libthr/thread/thr_mutex.c:712 #5 0x2828a664 in __pthread_mutex_unlock (mutex=0x281460b0) at /usr/src/lib/libthr/thread/thr_mutex.c:587 #6 0x28127251 in typed_mem_realloc () from /usr/local/lib/libpdel.so.0 #7 0x281275b2 in typed_mem_strdup () from /usr/local/lib/libpdel.so.0 #8 0x28127672 in typed_mem_vasprintf () from /usr/local/lib/libpdel.so.0 #9 0x2812b4b1 in valog () from /usr/local/lib/libpdel.so.0 #10 0x0806b610 in vlogprintf (fmt=0x0, ap=0x0) at log.c:516 #11 0x0806af9e in LogPrintf (fmt=0x80824c0 "mpd: pid %lu, version %s") at log.c:273 #12 0x0806ba56 in Greetings () at main.c:249 #13 0x0806b71a in main (ac=-1077941372, av=0xbfbfecf0) at main.c:159 #14 0x0804b23e in _start () any ideas, is this a bug in the application itself or libthr specific? If I'm using libpthread, then it works, but sometimes Mpd gets deadlocked (after terminating a thread and acquiring Mpd's internal "giant mutex"). elvis:/home/mbretter/mpd/src# ps -p 7558 -H PID TT STAT TIME COMMAND 7558 p0 SL 0:00.12 ./mpd 7558 p0 SL 0:00.12 ./mpd 7558 p0 SL 0:00.12 ./mpd and state of the process is "kserel". When Using libc_r everything works fine. I also tried to attach gdb to the running process (when Mpd was deadlocked), but this didn't worked, gdb als gets locked then. The machine has installed a -current dated of yesterday, using a non-smp kernel. bye, -- ------------------------------- ---------------------------------- Michael Bretterklieber - http://www.bretterklieber.com A-Quadrat Automation GmbH - http://www.a-quadrat.at Tel: ++43-(0)3172-41679 - GSM: ++43-(0)699 12861847 ------------------------------- ---------------------------------- "...the number of UNIX installations has grown to 10, with more expected..." - Dennis Ritchie and Ken Thompson, June 1972 _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"