From owner-freebsd-threads@FreeBSD.ORG Sun Oct 3 23:11:04 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 9671D16A4CE for ; Sun, 3 Oct 2004 23:11:04 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8969843D54; Sun, 3 Oct 2004 23:11:04 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from [127.0.0.1] (davidxu@localhost [127.0.0.1]) i93NB213027589; Sun, 3 Oct 2004 23:11:03 GMT (envelope-from davidxu@freebsd.org) Message-ID: <4160873F.7080702@freebsd.org> Date: Mon, 04 Oct 2004 07:11:59 +0800 From: David Xu User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.7.1) Gecko/20040730 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Andrew Gallatin References: <16728.37731.540143.307772@grasshopper.cs.duke.edu> <41589B4A.9080508@elischer.org> <415AB791.10809@freebsd.org> <16730.48642.4481.841374@grasshopper.cs.duke.edu> <415B13E8.2090205@elischer.org> <16731.6010.446877.347190@grasshopper.cs.duke.edu> <415B1ED6.8010809@elischer.org> <16731.11515.504636.53058@grasshopper.cs.duke.edu> <415CCD79.3030401@freebsd.org> <16733.44926.348617.722562@grasshopper.cs.duke.edu> In-Reply-To: <16733.44926.348617.722562@grasshopper.cs.duke.edu> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: Julian Elischer cc: freebsd-threads@freebsd.org Subject: Re: easy to reproduce unkillable 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: Sun, 03 Oct 2004 23:11:04 -0000 FYI, I had committed a fix, it was expected to fix the problem. David Xu wrote: >davidxu 2004-10-03 13:23:49 UTC > > FreeBSD src repository > > Modified files: > sys/kern kern_sig.c > Log: > Don't bother to turn off other P_STOPPED bits for SIGKILL, doing > so would cause kernel to produce an unkillable process in some cases, > especially, P_STOPPED_SINGLE has a singling thread, turning off the > bit would mess the state. > > Revision Changes Path > 1.292 +1 -1 src/sys/kern/kern_sig.c > > > > From owner-freebsd-threads@FreeBSD.ORG Mon Oct 4 11:02:19 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 C73A116A4E3 for ; Mon, 4 Oct 2004 11:02:19 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9FE6143D5A for ; Mon, 4 Oct 2004 11:02:19 +0000 (GMT) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (peter@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id i94B2JWW031537 for ; Mon, 4 Oct 2004 11:02:19 GMT (envelope-from owner-bugmaster@freebsd.org) Received: (from peter@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i94B2IQr031531 for freebsd-threads@freebsd.org; Mon, 4 Oct 2004 11:02:18 GMT (envelope-from owner-bugmaster@freebsd.org) Date: Mon, 4 Oct 2004 11:02:18 GMT Message-Id: <200410041102.i94B2IQr031531@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: peter set sender to owner-bugmaster@freebsd.org using -f From: FreeBSD bugmaster To: freebsd-threads@FreeBSD.org Subject: Current problem reports assigned to you 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, 04 Oct 2004 11:02:19 -0000 Current FreeBSD problem reports Critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2004/04/22] threads/65883threads libkse's sigwait does not work after fork 1 problem total. Serious problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2000/07/18] kern/20016 threads pthreads: Cannot set scheduling timer/Can o [2000/08/26] kern/20861 threads libc_r does not honor socket timeouts o [2001/01/20] threads/24472threads libc_r does not honor SO_SNDTIMEO/SO_RCVT o [2001/01/25] threads/24632threads libc_r delicate deviation from libc in ha o [2001/01/25] kern/24641 threads pthread_rwlock_rdlock can deadlock o [2001/11/26] bin/32295 threads pthread dont dequeue signals o [2002/02/01] threads/34536threads accept() blocks other threads o [2002/05/25] kern/38549 threads the procces compiled whith pthread stoppe o [2002/06/27] threads/39922threads [PATCH?] Threaded applications executed w o [2002/08/04] kern/41331 threads Pthread library open sets O_NONBLOCK flag o [2003/03/02] threads/48856threads Setting SIGCHLD to SIG_IGN still leaves z o [2003/03/10] threads/49087threads Signals lost in programs linked with libc o [2003/05/08] threads/51949threads thread in accept cannot be cancelled s [2004/03/15] kern/64313 threads FreeBSD (OpenBSD) pthread implicit set/un o [2004/08/26] threads/70975threads unexpected and unreliable behaviour when o [2004/09/14] threads/71725threads Mysql Crashes frequently giving Sock Erro 16 problems total. Non-critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2000/05/26] kern/18824 threads gethostbyname is not thread safe o [2000/06/13] kern/19247 threads uthread_sigaction.c does not do anything o [2000/10/21] kern/22190 threads A threaded read(2) from a socketpair(2) f o [2001/09/09] threads/30464threads pthread mutex attributes -- pshared o [2002/05/02] threads/37676threads libc_r: msgsnd(), msgrcv(), pread(), pwri s [2002/07/16] threads/40671threads pthread_cancel doesn't remove thread from o [2004/07/13] threads/69020threads pthreads library leaks _gc_mutex o [2004/09/21] threads/71966threads Mlnet Core Dumped : Fatal error '_pq_inse 8 problems total. From owner-freebsd-threads@FreeBSD.ORG Tue Oct 5 13:00:21 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 7820A16A4CE; Tue, 5 Oct 2004 13:00:21 +0000 (GMT) Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0529843D1D; Tue, 5 Oct 2004 13:00:21 +0000 (GMT) (envelope-from gallatin@cs.duke.edu) Received: from grasshopper.cs.duke.edu (grasshopper.cs.duke.edu [152.3.145.30]) by duke.cs.duke.edu (8.12.10/8.12.10) with ESMTP id i95D0IJt017080 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 5 Oct 2004 09:00:18 -0400 (EDT) Received: (from gallatin@localhost) by grasshopper.cs.duke.edu (8.12.9p2/8.12.9/Submit) id i95D0DVL017228; Tue, 5 Oct 2004 09:00:13 -0400 (EDT) (envelope-from gallatin) From: Andrew Gallatin MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16738.39645.362300.995395@grasshopper.cs.duke.edu> Date: Tue, 5 Oct 2004 09:00:13 -0400 (EDT) To: David Xu In-Reply-To: <4160873F.7080702@freebsd.org> References: <16728.37731.540143.307772@grasshopper.cs.duke.edu> <41589B4A.9080508@elischer.org> <415AB791.10809@freebsd.org> <16730.48642.4481.841374@grasshopper.cs.duke.edu> <415B13E8.2090205@elischer.org> <16731.6010.446877.347190@grasshopper.cs.duke.edu> <415B1ED6.8010809@elischer.org> <16731.11515.504636.53058@grasshopper.cs.duke.edu> <415CCD79.3030401@freebsd.org> <16733.44926.348617.722562@grasshopper.cs.duke.edu> <4160873F.7080702@freebsd.org> X-Mailer: VM 6.75 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid cc: Julian Elischer cc: freebsd-threads@freebsd.org Subject: Re: easy to reproduce unkillable 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: Tue, 05 Oct 2004 13:00:21 -0000 David Xu writes: > FYI, I had committed a fix, it was expected to fix the problem. I've verified that this fixes the problem for me. I hope it will be merged into RELENG_5. Thank you!!! Drew From owner-freebsd-threads@FreeBSD.ORG Tue Oct 5 13:40:25 2004 Return-Path: Delivered-To: freebsd-threads@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E71A416A4CE for ; Tue, 5 Oct 2004 13:40:25 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id B7ED243D5A for ; Tue, 5 Oct 2004 13:40:25 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i95DePJs068066 for ; Tue, 5 Oct 2004 13:40:25 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i95DePU7068065; Tue, 5 Oct 2004 13:40:25 GMT (envelope-from gnats) Resent-Date: Tue, 5 Oct 2004 13:40:25 GMT Resent-Message-Id: <200410051340.i95DePU7068065@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-threads@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Ivan Voras Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1DB9416A4CE for ; Tue, 5 Oct 2004 13:37:27 +0000 (GMT) Received: from lara.cc.fer.hr (lara.cc.fer.hr [161.53.72.113]) by mx1.FreeBSD.org (Postfix) with ESMTP id 71B3243D1F for ; Tue, 5 Oct 2004 13:37:26 +0000 (GMT) (envelope-from ivoras@lara.cc.fer.hr) Received: from lara.cc.fer.hr (localhost.cc.fer.hr [127.0.0.1]) by lara.cc.fer.hr (8.13.1/8.13.1) with ESMTP id i95DaeJK040016 for ; Tue, 5 Oct 2004 15:36:40 +0200 (CEST) (envelope-from ivoras@lara.cc.fer.hr) Received: (from ivoras@localhost) by lara.cc.fer.hr (8.13.1/8.13.1/Submit) id i95DaeHP040015; Tue, 5 Oct 2004 15:36:40 +0200 (CEST) (envelope-from ivoras) Message-Id: <200410051336.i95DaeHP040015@lara.cc.fer.hr> Date: Tue, 5 Oct 2004 15:36:40 +0200 (CEST) From: Ivan Voras To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: threads/72353: Assertion fails in /usr/src/lib/libpthread/sys/lock.c, line 171, when compilingmonodoc X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Ivan Voras List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Oct 2004 13:40:26 -0000 >Number: 72353 >Category: threads >Synopsis: Assertion fails in /usr/src/lib/libpthread/sys/lock.c, line 171, when compiling monodoc >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-threads >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Oct 05 13:40:25 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Ivan Voras >Release: FreeBSD 5.3-BETA5 i386 >Organization: >Environment: System: FreeBSD lara.cc.fer.hr 5.3-BETA5 FreeBSD 5.3-BETA5 #3: Mon Oct 4 12:44:04 CEST 2004 ivoras@lara.cc.fer.hr:/usr/obj/usr/src/sys/LARA i386 >Description: Compiling monodoc (Mono documentation browsers) fails with error: Assertion failed: (lu->lu_myreq->lr_owner == lu), function _lock_acquire, file /usr/src/lib/libpthread/sys/lock.c, line 171. Abort trap (core dumped) *** Error code 134 >How-To-Repeat: $ wget http://www.go-mono.com/archive/1.0.2/monodoc-1.0.2.tar.gz $ tar xzf monodoc-1.0.2.tar.gz $ cd monodoc-1.0.2 $ ./configure $ make >Fix: none, but http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/70430 works (old version). More info here: http://lists.freebsd.org/pipermail/freebsd-gnome/2004-August/007781.html >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-threads@FreeBSD.ORG Tue Oct 5 17:07:30 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 C9FC616A4CE; Tue, 5 Oct 2004 17:07:30 +0000 (GMT) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6067543D2F; Tue, 5 Oct 2004 17:07:30 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) i95H7Sr6029885; Tue, 5 Oct 2004 13:07:29 -0400 (EDT) Date: Tue, 5 Oct 2004 13:07:28 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Ivan Voras In-Reply-To: <200410051336.i95DaeHP040015@lara.cc.fer.hr> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) cc: FreeBSD-gnats-submit@freebsd.org cc: freebsd-threads@freebsd.org Subject: Re: threads/72353: Assertion fails in/usr/src/lib/libpthread/sys/lock.c, line 171, when compilingmonodoc X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Daniel Eischen List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Oct 2004 17:07:30 -0000 On Tue, 5 Oct 2004, Ivan Voras wrote: > Compiling monodoc (Mono documentation browsers) fails with error: > Assertion failed: (lu->lu_myreq->lr_owner == lu), function _lock_acquire, file /usr/src/lib/libpthread/sys/lock.c, line 171. > Abort trap (core dumped) > *** Error code 134 > > >How-To-Repeat: > $ wget http://www.go-mono.com/archive/1.0.2/monodoc-1.0.2.tar.gz > $ tar xzf monodoc-1.0.2.tar.gz > $ cd monodoc-1.0.2 > $ ./configure > $ make > > >Fix: > none, but http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/70430 works (old version). > More info here: http://lists.freebsd.org/pipermail/freebsd-gnome/2004-August/007781.html This suggests you are using /etc/libmap.conf to map everything to libc_r. Is this still true? If you have any binaries or libraries that link to libc_r and are trying to build something to work with libpthread, you need to use libmap.conf to map libc_r to libpthread (the opposite of what you had done before). Please try to repeat the problem with an /etc/libmap.conf containing the following entries: libc_r.so.5 libpthread.so.1 libc_r.so libpthread.so -- Dan Eischen From owner-freebsd-threads@FreeBSD.ORG Tue Oct 5 17:10:29 2004 Return-Path: Delivered-To: freebsd-threads@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6FC0716A4CE for ; Tue, 5 Oct 2004 17:10:29 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5F6CA43D2D for ; Tue, 5 Oct 2004 17:10:29 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i95HATIn093786 for ; Tue, 5 Oct 2004 17:10:29 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i95HATwj093785; Tue, 5 Oct 2004 17:10:29 GMT (envelope-from gnats) Date: Tue, 5 Oct 2004 17:10:29 GMT Message-Id: <200410051710.i95HATwj093785@freefall.freebsd.org> To: freebsd-threads@FreeBSD.org From: Daniel Eischen Subject: Re: threads/72353: Assertion fails in/usr/src/lib/libpthread/sys/lock.c, line 171, when compilingmonodoc X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Daniel Eischen List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Oct 2004 17:10:29 -0000 The following reply was made to PR threads/72353; it has been noted by GNATS. From: Daniel Eischen To: Ivan Voras Cc: FreeBSD-gnats-submit@freebsd.org, Subject: Re: threads/72353: Assertion fails in /usr/src/lib/libpthread/sys/lock.c, line 171, when compilingmonodoc Date: Tue, 5 Oct 2004 13:07:28 -0400 (EDT) On Tue, 5 Oct 2004, Ivan Voras wrote: > Compiling monodoc (Mono documentation browsers) fails with error: > Assertion failed: (lu->lu_myreq->lr_owner == lu), function _lock_acquire, file /usr/src/lib/libpthread/sys/lock.c, line 171. > Abort trap (core dumped) > *** Error code 134 > > >How-To-Repeat: > $ wget http://www.go-mono.com/archive/1.0.2/monodoc-1.0.2.tar.gz > $ tar xzf monodoc-1.0.2.tar.gz > $ cd monodoc-1.0.2 > $ ./configure > $ make > > >Fix: > none, but http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/70430 works (old version). > More info here: http://lists.freebsd.org/pipermail/freebsd-gnome/2004-August/007781.html This suggests you are using /etc/libmap.conf to map everything to libc_r. Is this still true? If you have any binaries or libraries that link to libc_r and are trying to build something to work with libpthread, you need to use libmap.conf to map libc_r to libpthread (the opposite of what you had done before). Please try to repeat the problem with an /etc/libmap.conf containing the following entries: libc_r.so.5 libpthread.so.1 libc_r.so libpthread.so -- Dan Eischen From owner-freebsd-threads@FreeBSD.ORG Tue Oct 5 17:18:57 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 1BECB16A4CE; Tue, 5 Oct 2004 17:18:57 +0000 (GMT) Received: from lara.cc.fer.hr (lara.cc.fer.hr [161.53.72.113]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5545F43D48; Tue, 5 Oct 2004 17:18:56 +0000 (GMT) (envelope-from ivoras@fer.hr) Received: from [127.0.0.1] (localhost.cc.fer.hr [127.0.0.1]) by lara.cc.fer.hr (8.13.1/8.13.1) with ESMTP id i95HI7DN026690; Tue, 5 Oct 2004 19:18:07 +0200 (CEST) (envelope-from ivoras@fer.hr) Message-ID: <4162D74F.7030607@fer.hr> Date: Tue, 05 Oct 2004 19:18:07 +0200 From: Ivan Voras User-Agent: Mozilla Thunderbird 0.7.3 (X11/20040923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Daniel Eischen References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: FreeBSD-gnats-submit@freebsd.org cc: freebsd-threads@freebsd.org Subject: Re: threads/72353: Assertion failsin/usr/src/lib/libpthread/sys/lock.c, line 171, when compilingmonodoc 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: Tue, 05 Oct 2004 17:18:57 -0000 Daniel Eischen wrote: > > This suggests you are using /etc/libmap.conf to map everything to libc_r. > Is this still true? If you have any binaries or libraries that link to No, my libmap.conf maps everything to libpthread (has been since RELENG_5, and not a single problem there). As I said in the pr, the thing that the port skeleton (the first URL) does works to build version 1.0 without errors, only the newer version, 1.0.2, for which I don't have the port skeleton, dies. From owner-freebsd-threads@FreeBSD.ORG Tue Oct 5 17:20:20 2004 Return-Path: Delivered-To: freebsd-threads@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6FDB616A4CF for ; Tue, 5 Oct 2004 17:20:20 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 64C3643D5A for ; Tue, 5 Oct 2004 17:20:20 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i95HKKbk094024 for ; Tue, 5 Oct 2004 17:20:20 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i95HKKSY094023; Tue, 5 Oct 2004 17:20:20 GMT (envelope-from gnats) Date: Tue, 5 Oct 2004 17:20:20 GMT Message-Id: <200410051720.i95HKKSY094023@freefall.freebsd.org> To: freebsd-threads@FreeBSD.org From: Ivan Voras Subject: Re: threads/72353: Assertion failsin/usr/src/lib/libpthread/sys/lock.c, line 171, when compilingmonodoc X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Ivan Voras List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Oct 2004 17:20:20 -0000 The following reply was made to PR threads/72353; it has been noted by GNATS. From: Ivan Voras To: Daniel Eischen Cc: FreeBSD-gnats-submit@freebsd.org, freebsd-threads@freebsd.org Subject: Re: threads/72353: Assertion fails in/usr/src/lib/libpthread/sys/lock.c, line 171, when compilingmonodoc Date: Tue, 05 Oct 2004 19:18:07 +0200 Daniel Eischen wrote: > > This suggests you are using /etc/libmap.conf to map everything to libc_r. > Is this still true? If you have any binaries or libraries that link to No, my libmap.conf maps everything to libpthread (has been since RELENG_5, and not a single problem there). As I said in the pr, the thing that the port skeleton (the first URL) does works to build version 1.0 without errors, only the newer version, 1.0.2, for which I don't have the port skeleton, dies. From owner-freebsd-threads@FreeBSD.ORG Tue Oct 5 19:15:10 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 E311316A4D1; Tue, 5 Oct 2004 19:15:10 +0000 (GMT) Received: from transport.cksoft.de (transport.cksoft.de [62.111.66.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id E813543D41; Tue, 5 Oct 2004 19:15:09 +0000 (GMT) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from transport.cksoft.de (localhost [127.0.0.1]) by transport.cksoft.de (Postfix) with ESMTP id D287A1FFDD7; Tue, 5 Oct 2004 21:15:07 +0200 (CEST) Received: by transport.cksoft.de (Postfix, from userid 66) id C66161FF9A8; Tue, 5 Oct 2004 21:15:05 +0200 (CEST) Received: by mail.int.zabbadoz.net (Postfix, from userid 1060) id 29742156ED; Tue, 5 Oct 2004 19:13:06 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.int.zabbadoz.net (Postfix) with ESMTP id 1E25915606; Tue, 5 Oct 2004 19:13:07 +0000 (UTC) Date: Tue, 5 Oct 2004 19:13:07 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@e0-0.zab2.int.zabbadoz.net To: Daniel Eischen , Ivan Voras In-Reply-To: <200410051710.i95HATwj093785@freefall.freebsd.org> Message-ID: References: <200410051710.i95HATwj093785@freefall.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS cksoft-s20020300-20031204bz on transport.cksoft.de cc: freebsd-threads@FreeBSD.org Subject: Re: threads/72353: Assertion failsin/usr/src/lib/libpthread/sys/lock.c, line 171, when compilingmonodoc 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: Tue, 05 Oct 2004 19:15:11 -0000 On Tue, 5 Oct 2004, Daniel Eischen wrote: threads@ only, not gants. > On Tue, 5 Oct 2004, Ivan Voras wrote: > > Compiling monodoc (Mono documentation browsers) fails with error: > > Assertion failed: (lu->lu_myreq->lr_owner == lu), function _lock_acquire, file /usr/src/lib/libpthread/sys/lock.c, line 171. > > Abort trap (core dumped) > > *** Error code 134 this is about the same place I have seen my crashes with the invalid kse_mailbox in the bt: #0 _lock_acquire (lck=0x38, lu=0x80c6234, prio=56) at /u1/src/src/RELENG_5/compile-20041004-1746/lib/libpthread/sys/lock.c:168 168 if ((lck->l_type & LCK_PRIORITY) != 0) { (gdb) bt full #0 _lock_acquire (lck=0x38, lu=0x80c6234, prio=56) at /u1/src/src/RELENG_5/compile-20041004-1746/lib/libpthread/sys/lock.c:168 i = 135029300 lval = 15 __func__ = "_lock_acquire" #1 0x280c1d8b in mutex_handoff (curthread=0x80da000, mutex=0x80c4980) at /u1/src/src/RELENG_5/compile-20041004-1746/lib/libpthread/thread/thr_mutex.c:1586 kmbx = (struct kse_mailbox *) 0x1 pthread = (struct pthread *) 0x80c3be0 #2 0x280c0cb2 in mutex_unlock_common (m=0x8082c8c, add_reference=0) at /u1/src/src/RELENG_5/compile-20041004-1746/lib/libpthread/thread/thr_mutex.c:1026 curthread = (struct pthread *) 0x80da000 kmbx = (struct kse_mailbox *) 0x0 ret = 0 #3 0x280c0738 in _pthread_mutex_unlock (m=0x8082c8c) at /u1/src/src/RELENG_5/compile-20041004-1746/lib/libpthread/thread/thr_mutex.c:879 No locals. .... -- Bjoern A. Zeeb bzeeb at Zabbadoz dot NeT From owner-freebsd-threads@FreeBSD.ORG Tue Oct 5 19:30:35 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 25D0F16A4CE for ; Tue, 5 Oct 2004 19:30:35 +0000 (GMT) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id CB3B643D2F for ; Tue, 5 Oct 2004 19:30:34 +0000 (GMT) (envelope-from eischen@vigrid.com) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) i95JUKxk002193; Tue, 5 Oct 2004 15:30:20 -0400 (EDT) Date: Tue, 5 Oct 2004 15:30:19 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: "Bjoern A. Zeeb" In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) cc: freebsd-threads@freebsd.org Subject: Re: threads/72353: Assertion failsin/usr/src/lib/libpthread/sys/lock.c, line 171, when compilingmonodoc 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: Tue, 05 Oct 2004 19:30:35 -0000 On Tue, 5 Oct 2004, Bjoern A. Zeeb wrote: > On Tue, 5 Oct 2004, Daniel Eischen wrote: > > threads@ only, not gants. > > > On Tue, 5 Oct 2004, Ivan Voras wrote: > > > Compiling monodoc (Mono documentation browsers) fails with error: > > > Assertion failed: (lu->lu_myreq->lr_owner == lu), function _lock_acquire, file /usr/src/lib/libpthread/sys/lock.c, line 171. > > > Abort trap (core dumped) > > > *** Error code 134 > > this is about the same place I have seen my crashes with the > invalid kse_mailbox in the bt: Ivan mentioned in one of the referenced postings he was using nvidia drivers and libraries (openGL). Libpthread is not compatible with these (at least older drivers and libraries -- it really is the nvidia openGL library I believe that is causing the problem). No matter what you put in /etc/libmap.conf, there is no work-around other than to try the latest nvidia drivers (which aren't thread-safe) or to use Xorg/XFree86 drivers (and be sure to remove nvidia's openGL). As I believe I asked you before, are you getting any warnings from the kernel about static LDT allocations? -- Dan Eischen From owner-freebsd-threads@FreeBSD.ORG Tue Oct 5 19:45:09 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 6D5F516A4CE for ; Tue, 5 Oct 2004 19:45:09 +0000 (GMT) Received: from transport.cksoft.de (transport.cksoft.de [62.111.66.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id EEC2043D41 for ; Tue, 5 Oct 2004 19:45:08 +0000 (GMT) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from transport.cksoft.de (localhost [127.0.0.1]) by transport.cksoft.de (Postfix) with ESMTP id DF0F71FF9A6; Tue, 5 Oct 2004 21:45:07 +0200 (CEST) Received: by transport.cksoft.de (Postfix, from userid 66) id C41761FF91D; Tue, 5 Oct 2004 21:45:05 +0200 (CEST) Received: by mail.int.zabbadoz.net (Postfix, from userid 1060) id C14ED156ED; Tue, 5 Oct 2004 19:43:30 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.int.zabbadoz.net (Postfix) with ESMTP id B624315606; Tue, 5 Oct 2004 19:43:31 +0000 (UTC) Date: Tue, 5 Oct 2004 19:43:31 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@e0-0.zab2.int.zabbadoz.net To: Daniel Eischen In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS cksoft-s20020300-20031204bz on transport.cksoft.de cc: freebsd-threads@freebsd.org Subject: Re: [..] Assertion fails in libpthread/sys/lock.c 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: Tue, 05 Oct 2004 19:45:09 -0000 On Tue, 5 Oct 2004, Daniel Eischen wrote: Hi, > > this is about the same place I have seen my crashes with the > > invalid kse_mailbox in the bt: > > Ivan mentioned in one of the referenced postings he was using nvidia > drivers and libraries (openGL). Libpthread is not compatible with these > (at least older drivers and libraries -- it really is the nvidia openGL > library I believe that is causing the problem). No matter what you no such thing here. no X; only serial console and ssh on one PIV/HT enabled. > put in /etc/libmap.conf, there is no work-around other than to try the > latest nvidia drivers (which aren't thread-safe) or to use Xorg/XFree86 > drivers (and be sure to remove nvidia's openGL). > > As I believe I asked you before, are you getting any warnings from the kernel > about static LDT allocations? *upps* sorry. No, no such things - at least none in dmesg and not in out or err log of the process. --- dmesg --- ... em0: Link is up 100 Mbps Full D u p lex pid 4057 (foo), uid 0: exited on signal 11 (core dumped) pid 4126: corrected slot count (2->1) pid 5810 (foo), uid 0: exited on signal 11 (core dumped) --- dmesg --- -- Bjoern A. Zeeb bzeeb at Zabbadoz dot NeT From owner-freebsd-threads@FreeBSD.ORG Tue Oct 5 20:44: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 A6F7816A4F6; Tue, 5 Oct 2004 20:44:29 +0000 (GMT) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 46BE343D41; Tue, 5 Oct 2004 20:44:29 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) i95KiEC9004034; Tue, 5 Oct 2004 16:44:18 -0400 (EDT) Date: Tue, 5 Oct 2004 16:44:14 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Ivan Voras In-Reply-To: <4162D74F.7030607@fer.hr> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) cc: FreeBSD-gnats-submit@freebsd.org cc: freebsd-threads@freebsd.org Subject: Re: threads/72353: Assertion failsin/usr/src/lib/libpthread/sys/lock.c, line 171, when compilingmonodoc X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Daniel Eischen List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Oct 2004 20:44:29 -0000 On Tue, 5 Oct 2004, Ivan Voras wrote: > Daniel Eischen wrote: > > > > This suggests you are using /etc/libmap.conf to map everything to libc_r. > > Is this still true? If you have any binaries or libraries that link to > > No, my libmap.conf maps everything to libpthread (has been since > RELENG_5, and not a single problem there). > > As I said in the pr, the thing that the port skeleton (the first URL) > does works to build version 1.0 without errors, only the newer version, > 1.0.2, for which I don't have the port skeleton, dies. -bash-2.05b$ ./configure checking build system type... i386-unknown-freebsd6.0 checking host system type... i386-unknown-freebsd6.0 checking target system type... i386-unknown-freebsd6.0 checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... no checking for mawk... no checking for nawk... nawk checking whether make sets $(MAKE)... yes checking whether to enable maintainer-specific portions of Makefiles... no checking for a BSD-compatible install... /usr/bin/install -c checking for gacutil... no configure: error: No gacutil tool found What is gacutil? -- Dan Eischen From owner-freebsd-threads@FreeBSD.ORG Tue Oct 5 20:50:29 2004 Return-Path: Delivered-To: freebsd-threads@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3026916A4CE for ; Tue, 5 Oct 2004 20:50:29 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1E9EF43D41 for ; Tue, 5 Oct 2004 20:50:29 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i95KoS9c020859 for ; Tue, 5 Oct 2004 20:50:29 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i95KoSRc020858; Tue, 5 Oct 2004 20:50:28 GMT (envelope-from gnats) Date: Tue, 5 Oct 2004 20:50:28 GMT Message-Id: <200410052050.i95KoSRc020858@freefall.freebsd.org> To: freebsd-threads@FreeBSD.org From: Daniel Eischen Subject: Re: threads/72353: Assertion failsin/usr/src/lib/libpthread/sys/lock.c, line 171, when compilingmonodoc X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Daniel Eischen List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Oct 2004 20:50:29 -0000 The following reply was made to PR threads/72353; it has been noted by GNATS. From: Daniel Eischen To: Ivan Voras Cc: FreeBSD-gnats-submit@freebsd.org, Subject: Re: threads/72353: Assertion fails in/usr/src/lib/libpthread/sys/lock.c, line 171, when compilingmonodoc Date: Tue, 5 Oct 2004 16:44:14 -0400 (EDT) On Tue, 5 Oct 2004, Ivan Voras wrote: > Daniel Eischen wrote: > > > > This suggests you are using /etc/libmap.conf to map everything to libc_r. > > Is this still true? If you have any binaries or libraries that link to > > No, my libmap.conf maps everything to libpthread (has been since > RELENG_5, and not a single problem there). > > As I said in the pr, the thing that the port skeleton (the first URL) > does works to build version 1.0 without errors, only the newer version, > 1.0.2, for which I don't have the port skeleton, dies. -bash-2.05b$ ./configure checking build system type... i386-unknown-freebsd6.0 checking host system type... i386-unknown-freebsd6.0 checking target system type... i386-unknown-freebsd6.0 checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... no checking for mawk... no checking for nawk... nawk checking whether make sets $(MAKE)... yes checking whether to enable maintainer-specific portions of Makefiles... no checking for a BSD-compatible install... /usr/bin/install -c checking for gacutil... no configure: error: No gacutil tool found What is gacutil? -- Dan Eischen From owner-freebsd-threads@FreeBSD.ORG Wed Oct 6 03:14:10 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 3250D16A4CE; Wed, 6 Oct 2004 03:14:10 +0000 (GMT) Received: from electra.cse.Buffalo.EDU (electra.cse.Buffalo.EDU [128.205.32.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id D6C3143D5A; Wed, 6 Oct 2004 03:14:09 +0000 (GMT) (envelope-from kensmith@cse.Buffalo.EDU) Received: from electra.cse.Buffalo.EDU (kensmith@localhost [127.0.0.1]) i963E9Io026713; Tue, 5 Oct 2004 23:14:09 -0400 (EDT) Received: (from kensmith@localhost) by electra.cse.Buffalo.EDU (8.12.10/8.12.9/Submit) id i963E6T4026712; Tue, 5 Oct 2004 23:14:06 -0400 (EDT) Date: Tue, 5 Oct 2004 23:14:06 -0400 From: Ken Smith To: Andrew Belashov Message-ID: <20041006031406.GB26037@electra.cse.Buffalo.EDU> References: <41518130.3000704@orel.ru> <4152A383.3090901@orel.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4152A383.3090901@orel.ru> User-Agent: Mutt/1.4.1i cc: freebsd-sparc64@freebsd.org cc: freebsd-threads@freebsd.org Subject: Re: Bug in kse_switchin()? 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: Wed, 06 Oct 2004 03:14:10 -0000 On Thu, Sep 23, 2004 at 02:20:51PM +0400, Andrew Belashov wrote: > Where bug? > - In sparc64 specific core? > - In kern/kern_kse.c and kern/kern_thr.c code? Can you humor me and test this patch please? Index: sys/conf/kern.pre.mk =================================================================== RCS file: /home/ncvs/src/sys/conf/kern.pre.mk,v retrieving revision 1.57 diff -u -r1.57 kern.pre.mk --- sys/conf/kern.pre.mk 23 Sep 2004 22:53:22 -0000 1.57 +++ sys/conf/kern.pre.mk 6 Oct 2004 03:09:09 -0000 @@ -24,7 +24,7 @@ . elif ${MACHINE_ARCH} == "ia64" COPTFLAGS?=-O2 -pipe . elif ${MACHINE_ARCH} == "sparc64" -COPTFLAGS?=-O2 -pipe +COPTFLAGS?=-O -pipe . elif ${MACHINE_ARCH} == "arm" COPTFLAGS?=-O2 -pipe . else You'll need to go through a complete kernel build cycle after applying it (starting with 'config'). Thanks. -- Ken Smith - From there to here, from here to | kensmith@cse.buffalo.edu there, funny things are everywhere. | - Theodore Geisel | From owner-freebsd-threads@FreeBSD.ORG Wed Oct 6 09:26:02 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 9725916A4CF for ; Wed, 6 Oct 2004 09:26:02 +0000 (GMT) Received: from lara.cc.fer.hr (lara.cc.fer.hr [161.53.72.113]) by mx1.FreeBSD.org (Postfix) with ESMTP id D12D343D39 for ; Wed, 6 Oct 2004 09:26:01 +0000 (GMT) (envelope-from ivoras@fer.hr) Received: from [127.0.0.1] (localhost.cc.fer.hr [127.0.0.1]) by lara.cc.fer.hr (8.13.1/8.13.1) with ESMTP id i969PDvi029360; Wed, 6 Oct 2004 11:25:13 +0200 (CEST) (envelope-from ivoras@fer.hr) Message-ID: <4163B9F9.4050204@fer.hr> Date: Wed, 06 Oct 2004 11:25:13 +0200 From: Ivan Voras User-Agent: Mozilla Thunderbird 0.7.3 (X11/20040923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Daniel Eischen References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-threads@freebsd.org Subject: Re: threads/72353: Assertion failsin/usr/src/lib/libpthread/sys/lock.c, line 171, when compilingmonodoc 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: Wed, 06 Oct 2004 09:26:02 -0000 Daniel Eischen wrote: >>threads@ only, not gants. >> >> >>> On Tue, 5 Oct 2004, Ivan Voras wrote: >>> > Compiling monodoc (Mono documentation browsers) fails with error: >>> > Assertion failed: (lu->lu_myreq->lr_owner == lu), function _lock_acquire, file /usr/src/lib/libpthread/sys/lock.c, line 171. >>> > Abort trap (core dumped) >>> > *** Error code 134 >> >>this is about the same place I have seen my crashes with the >>invalid kse_mailbox in the bt: > > > Ivan mentioned in one of the referenced postings he was using nvidia Which Ivan? Not me :) I use X11 in 2d only, and with stock drivers on another type of card. (the "assertion failed" is reproducible just fine without X11) From owner-freebsd-threads@FreeBSD.ORG Wed Oct 6 09:27:55 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 7F04A16A4CE; Wed, 6 Oct 2004 09:27:55 +0000 (GMT) Received: from lara.cc.fer.hr (lara.cc.fer.hr [161.53.72.113]) by mx1.FreeBSD.org (Postfix) with ESMTP id A2DA543D39; Wed, 6 Oct 2004 09:27:54 +0000 (GMT) (envelope-from ivoras@fer.hr) Received: from [127.0.0.1] (localhost.cc.fer.hr [127.0.0.1]) by lara.cc.fer.hr (8.13.1/8.13.1) with ESMTP id i969R7vF029364; Wed, 6 Oct 2004 11:27:07 +0200 (CEST) (envelope-from ivoras@fer.hr) Message-ID: <4163BA6B.8080000@fer.hr> Date: Wed, 06 Oct 2004 11:27:07 +0200 From: Ivan Voras User-Agent: Mozilla Thunderbird 0.7.3 (X11/20040923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Daniel Eischen References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: FreeBSD-gnats-submit@freebsd.org cc: freebsd-threads@freebsd.org Subject: Re: threads/72353: Assertion failsin/usr/src/lib/libpthread/sys/lock.c, line 171, when compiling monodoc 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: Wed, 06 Oct 2004 09:27:55 -0000 Daniel Eischen wrote: > -bash-2.05b$ ./configure > checking build system type... i386-unknown-freebsd6.0 > checking host system type... i386-unknown-freebsd6.0 > checking target system type... i386-unknown-freebsd6.0 > checking for a BSD-compatible install... /usr/bin/install -c > checking whether build environment is sane... yes > checking for gawk... no > checking for mawk... no > checking for nawk... nawk > checking whether make sets $(MAKE)... yes > checking whether to enable maintainer-specific portions of Makefiles... no > checking for a BSD-compatible install... /usr/bin/install -c > checking for gacutil... no > configure: error: No gacutil tool found > > What is gacutil? Oh, sorry, I should have mantioned you need lang/mono port installed to build monodoc, and probably x11-toolkits/gtk-sharp also. From owner-freebsd-threads@FreeBSD.ORG Wed Oct 6 09:30:32 2004 Return-Path: Delivered-To: freebsd-threads@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B891416A4F0 for ; Wed, 6 Oct 2004 09:30:32 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id AD21543D1D for ; Wed, 6 Oct 2004 09:30:32 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i969UW8A029478 for ; Wed, 6 Oct 2004 09:30:32 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i969UWbD029477; Wed, 6 Oct 2004 09:30:32 GMT (envelope-from gnats) Date: Wed, 6 Oct 2004 09:30:32 GMT Message-Id: <200410060930.i969UWbD029477@freefall.freebsd.org> To: freebsd-threads@FreeBSD.org From: Ivan Voras Subject: Re: threads/72353: Assertion failsin/usr/src/lib/libpthread/sys/lock.c, line 171, when compiling monodoc X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Ivan Voras List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Oct 2004 09:30:32 -0000 The following reply was made to PR threads/72353; it has been noted by GNATS. From: Ivan Voras To: Daniel Eischen Cc: FreeBSD-gnats-submit@freebsd.org, freebsd-threads@freebsd.org Subject: Re: threads/72353: Assertion fails in/usr/src/lib/libpthread/sys/lock.c, line 171, when compiling monodoc Date: Wed, 06 Oct 2004 11:27:07 +0200 Daniel Eischen wrote: > -bash-2.05b$ ./configure > checking build system type... i386-unknown-freebsd6.0 > checking host system type... i386-unknown-freebsd6.0 > checking target system type... i386-unknown-freebsd6.0 > checking for a BSD-compatible install... /usr/bin/install -c > checking whether build environment is sane... yes > checking for gawk... no > checking for mawk... no > checking for nawk... nawk > checking whether make sets $(MAKE)... yes > checking whether to enable maintainer-specific portions of Makefiles... no > checking for a BSD-compatible install... /usr/bin/install -c > checking for gacutil... no > configure: error: No gacutil tool found > > What is gacutil? Oh, sorry, I should have mantioned you need lang/mono port installed to build monodoc, and probably x11-toolkits/gtk-sharp also. From owner-freebsd-threads@FreeBSD.ORG Wed Oct 6 13:46:22 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 9F3F516A4CE; Wed, 6 Oct 2004 13:46:22 +0000 (GMT) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 518D043D45; Wed, 6 Oct 2004 13:46:22 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) i96DkGdp023747; Wed, 6 Oct 2004 09:46:19 -0400 (EDT) Date: Wed, 6 Oct 2004 09:46:16 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Ivan Voras In-Reply-To: <4163BA6B.8080000@fer.hr> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) cc: FreeBSD-gnats-submit@freebsd.org cc: freebsd-threads@freebsd.org Subject: Re: threads/72353: Assertion failsin/usr/src/lib/libpthread/sys/lock.c, line 171, when compiling monodoc X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Daniel Eischen List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Oct 2004 13:46:22 -0000 On Wed, 6 Oct 2004, Ivan Voras wrote: > Daniel Eischen wrote: > > > -bash-2.05b$ ./configure > > checking build system type... i386-unknown-freebsd6.0 > > checking host system type... i386-unknown-freebsd6.0 > > checking target system type... i386-unknown-freebsd6.0 > > checking for a BSD-compatible install... /usr/bin/install -c > > checking whether build environment is sane... yes > > checking for gawk... no > > checking for mawk... no > > checking for nawk... nawk > > checking whether make sets $(MAKE)... yes > > checking whether to enable maintainer-specific portions of Makefiles... no > > checking for a BSD-compatible install... /usr/bin/install -c > > checking for gacutil... no > > configure: error: No gacutil tool found > > > > What is gacutil? > > Oh, sorry, I should have mantioned you need lang/mono port installed to > build monodoc, and probably x11-toolkits/gtk-sharp also. I installed monodoc, not gtk-sharp. What does 'pkg_which gacutil' show? -- Dan Eischen From owner-freebsd-threads@FreeBSD.ORG Wed Oct 6 13:50:19 2004 Return-Path: Delivered-To: freebsd-threads@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0473016A4CE for ; Wed, 6 Oct 2004 13:50:19 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id E95EA43D45 for ; Wed, 6 Oct 2004 13:50:18 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i96DoIkU056387 for ; Wed, 6 Oct 2004 13:50:18 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i96DoIse056386; Wed, 6 Oct 2004 13:50:18 GMT (envelope-from gnats) Date: Wed, 6 Oct 2004 13:50:18 GMT Message-Id: <200410061350.i96DoIse056386@freefall.freebsd.org> To: freebsd-threads@FreeBSD.org From: Daniel Eischen Subject: Re: threads/72353: Assertion failsin/usr/src/lib/libpthread/sys/lock.c, line 171, when compiling monodoc X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Daniel Eischen List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Oct 2004 13:50:19 -0000 The following reply was made to PR threads/72353; it has been noted by GNATS. From: Daniel Eischen To: Ivan Voras Cc: FreeBSD-gnats-submit@freebsd.org, Subject: Re: threads/72353: Assertion fails in/usr/src/lib/libpthread/sys/lock.c, line 171, when compiling monodoc Date: Wed, 6 Oct 2004 09:46:16 -0400 (EDT) On Wed, 6 Oct 2004, Ivan Voras wrote: > Daniel Eischen wrote: > > > -bash-2.05b$ ./configure > > checking build system type... i386-unknown-freebsd6.0 > > checking host system type... i386-unknown-freebsd6.0 > > checking target system type... i386-unknown-freebsd6.0 > > checking for a BSD-compatible install... /usr/bin/install -c > > checking whether build environment is sane... yes > > checking for gawk... no > > checking for mawk... no > > checking for nawk... nawk > > checking whether make sets $(MAKE)... yes > > checking whether to enable maintainer-specific portions of Makefiles... no > > checking for a BSD-compatible install... /usr/bin/install -c > > checking for gacutil... no > > configure: error: No gacutil tool found > > > > What is gacutil? > > Oh, sorry, I should have mantioned you need lang/mono port installed to > build monodoc, and probably x11-toolkits/gtk-sharp also. I installed monodoc, not gtk-sharp. What does 'pkg_which gacutil' show? -- Dan Eischen From owner-freebsd-threads@FreeBSD.ORG Wed Oct 6 13:56:41 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 CFD2B16A4CE; Wed, 6 Oct 2004 13:56:41 +0000 (GMT) Received: from lara.cc.fer.hr (lara.cc.fer.hr [161.53.72.113]) by mx1.FreeBSD.org (Postfix) with ESMTP id DA9AB43D49; Wed, 6 Oct 2004 13:56:36 +0000 (GMT) (envelope-from ivoras@fer.hr) Received: from [127.0.0.1] (localhost.cc.fer.hr [127.0.0.1]) by lara.cc.fer.hr (8.13.1/8.13.1) with ESMTP id i96Dtm3i030367; Wed, 6 Oct 2004 15:55:48 +0200 (CEST) (envelope-from ivoras@fer.hr) Message-ID: <4163F964.6040704@fer.hr> Date: Wed, 06 Oct 2004 15:55:48 +0200 From: Ivan Voras User-Agent: Mozilla Thunderbird 0.7.3 (X11/20040923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Daniel Eischen References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: FreeBSD-gnats-submit@freebsd.org cc: freebsd-threads@freebsd.org Subject: Re: threads/72353: Assertion failsin/usr/src/lib/libpthread/sys/lock.c, line 171, when compiling monodoc 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: Wed, 06 Oct 2004 13:56:42 -0000 Daniel Eischen wrote: >>>What is gacutil? >> >>Oh, sorry, I should have mantioned you need lang/mono port installed to >>build monodoc, and probably x11-toolkits/gtk-sharp also. > > > I installed monodoc, not gtk-sharp. What does 'pkg_which gacutil' > show? > ~> pkg_which gacutil mono-1.0_1 From owner-freebsd-threads@FreeBSD.ORG Wed Oct 6 14:00:35 2004 Return-Path: Delivered-To: freebsd-threads@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E8A2F16A4CF for ; Wed, 6 Oct 2004 14:00:35 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id DC7AF43D3F for ; Wed, 6 Oct 2004 14:00:35 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i96E0Zuk056924 for ; Wed, 6 Oct 2004 14:00:35 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i96E0Z7T056923; Wed, 6 Oct 2004 14:00:35 GMT (envelope-from gnats) Date: Wed, 6 Oct 2004 14:00:35 GMT Message-Id: <200410061400.i96E0Z7T056923@freefall.freebsd.org> To: freebsd-threads@FreeBSD.org From: Ivan Voras Subject: Re: threads/72353: Assertion failsin/usr/src/lib/libpthread/sys/lock.c, line 171, when compiling monodoc X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Ivan Voras List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Oct 2004 14:00:36 -0000 The following reply was made to PR threads/72353; it has been noted by GNATS. From: Ivan Voras To: Daniel Eischen Cc: FreeBSD-gnats-submit@freebsd.org, freebsd-threads@freebsd.org Subject: Re: threads/72353: Assertion fails in/usr/src/lib/libpthread/sys/lock.c, line 171, when compiling monodoc Date: Wed, 06 Oct 2004 15:55:48 +0200 Daniel Eischen wrote: >>>What is gacutil? >> >>Oh, sorry, I should have mantioned you need lang/mono port installed to >>build monodoc, and probably x11-toolkits/gtk-sharp also. > > > I installed monodoc, not gtk-sharp. What does 'pkg_which gacutil' > show? > ~> pkg_which gacutil mono-1.0_1 From owner-freebsd-threads@FreeBSD.ORG Wed Oct 6 17:17:53 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 4478316A4CE for ; Wed, 6 Oct 2004 17:17:53 +0000 (GMT) Received: from fed1rmmtao12.cox.net (fed1rmmtao12.cox.net [68.230.241.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0E56F43D46 for ; Wed, 6 Oct 2004 17:17:53 +0000 (GMT) (envelope-from mezz7@cox.net) Received: from mezz.mezzweb.com ([68.103.32.140]) by fed1rmmtao12.cox.net (InterMail vM.6.01.03.04 201-2131-111-106-20040729) with ESMTP id <20041006171752.EJOA7321.fed1rmmtao12.cox.net@mezz.mezzweb.com>; Wed, 6 Oct 2004 13:17:52 -0400 Date: Wed, 06 Oct 2004 12:17:57 -0500 To: "Ivan Voras" References: <200410051336.i95DaeHP040015@lara.cc.fer.hr> From: "Jeremy Messenger" Content-Type: text/plain; format=flowed; delsp=yes; charset=us-ascii MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID: In-Reply-To: <200410051336.i95DaeHP040015@lara.cc.fer.hr> User-Agent: Opera M2/7.54 (Linux, build 751) cc: freebsd-threads@freebsd.org Subject: Re: threads/72353: Assertion fails in /usr/src/lib/libpthread/sys/lock.c, line 171, when compilingmonodoc 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: Wed, 06 Oct 2004 17:17:53 -0000 On Tue, 5 Oct 2004 15:36:40 +0200 (CEST), Ivan Voras wrote: >> Description: > > Compiling monodoc (Mono documentation browsers) fails with error: > Assertion failed: (lu->lu_myreq->lr_owner == lu), function > _lock_acquire, file /usr/src/lib/libpthread/sys/lock.c, line 171. > Abort trap (core dumped) > *** Error code 134 > >> How-To-Repeat: > $ wget http://www.go-mono.com/archive/1.0.2/monodoc-1.0.2.tar.gz > $ tar xzf monodoc-1.0.2.tar.gz > $ cd monodoc-1.0.2 > $ ./configure > $ make > >> Fix: > none, but http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/70430 works > (old version). > More info here: > http://lists.freebsd.org/pipermail/freebsd-gnome/2004-August/007781.html Have you tried Tom McLaughlin 's Mono project[1]? Tom has ported 1.0.2, 1.1.1, newer gtk-sharp and few Mono apps. He's kind of taking care of Mono on FreeBSD for now, which the maintainer of Mono is kind of too busy or has disappeared. Tom has said that it works with FreeBSD 5.3 only, because of better thread, TLS and etc. You can check few threads that Tom has sent to freebsd-gnome. You should chat and help with Tom if you are insteresting with Mono stuff. [1] http://forge.novell.com/modules/xfmod/project/?bsd-sharp Cheers, Mezz -- mezz7@cox.net - mezz@FreeBSD.org FreeBSD GNOME Team http://www.FreeBSD.org/gnome/ - gnome@FreeBSD.org From owner-freebsd-threads@FreeBSD.ORG Wed Oct 6 17:40:13 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 B474B16A4CE for ; Wed, 6 Oct 2004 17:40:13 +0000 (GMT) Received: from lara.cc.fer.hr (lara.cc.fer.hr [161.53.72.113]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1430343D39 for ; Wed, 6 Oct 2004 17:40:13 +0000 (GMT) (envelope-from ivoras@fer.hr) Received: from [127.0.0.1] (localhost.cc.fer.hr [127.0.0.1]) by lara.cc.fer.hr (8.13.1/8.13.1) with ESMTP id i96HdKT6004382; Wed, 6 Oct 2004 19:39:20 +0200 (CEST) (envelope-from ivoras@fer.hr) Message-ID: <41642DC8.6070908@fer.hr> Date: Wed, 06 Oct 2004 19:39:20 +0200 From: Ivan Voras User-Agent: Mozilla Thunderbird 0.7.3 (X11/20040923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jeremy Messenger References: <200410051336.i95DaeHP040015@lara.cc.fer.hr> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: Ivan Voras cc: freebsd-threads@freebsd.org Subject: Re: threads/72353: Assertion fails in/usr/src/lib/libpthread/sys/lock.c, line 171, when compilingmonodoc 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: Wed, 06 Oct 2004 17:40:13 -0000 Jeremy Messenger wrote: > Have you tried Tom McLaughlin 's Mono > project[1]? Tom has ported 1.0.2, 1.1.1, newer gtk-sharp and few Mono > apps. He's kind of taking care of Mono on FreeBSD for now, which the > maintainer of Mono is kind of too busy or has disappeared. Tom has said > that it works with FreeBSD 5.3 only, because of better thread, TLS and etc. Ok, I'll try it. Meanwhile, if anybody wants to look at it, it's really simple to reproduce once you have mono installed (which isn't a problem). Make an empty file (touch empty.cs) and run 'mcs empty.cs -pkg:dummypkg'. From owner-freebsd-threads@FreeBSD.ORG Wed Oct 6 20:18:51 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 2040816A4CE; Wed, 6 Oct 2004 20:18:51 +0000 (GMT) Received: from electra.cse.Buffalo.EDU (electra.cse.Buffalo.EDU [128.205.32.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9DA8943D41; Wed, 6 Oct 2004 20:18:50 +0000 (GMT) (envelope-from kensmith@cse.Buffalo.EDU) Received: from electra.cse.Buffalo.EDU (kensmith@localhost [127.0.0.1]) i96KInIo024362; Wed, 6 Oct 2004 16:18:49 -0400 (EDT) Received: (from kensmith@localhost) by electra.cse.Buffalo.EDU (8.12.10/8.12.9/Submit) id i96KIn6n024361; Wed, 6 Oct 2004 16:18:49 -0400 (EDT) Date: Wed, 6 Oct 2004 16:18:49 -0400 From: Ken Smith To: Ken Smith Message-ID: <20041006201849.GC21875@electra.cse.Buffalo.EDU> References: <41518130.3000704@orel.ru> <4152A383.3090901@orel.ru> <20041006031406.GB26037@electra.cse.Buffalo.EDU> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041006031406.GB26037@electra.cse.Buffalo.EDU> User-Agent: Mutt/1.4.1i cc: freebsd-threads@freebsd.org cc: freebsd-sparc64@freebsd.org Subject: Re: Bug in kse_switchin()? 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: Wed, 06 Oct 2004 20:18:51 -0000 On Tue, Oct 05, 2004 at 11:14:06PM -0400, Ken Smith wrote: > On Thu, Sep 23, 2004 at 02:20:51PM +0400, Andrew Belashov wrote: > > > Where bug? > > - In sparc64 specific core? > > - In kern/kern_kse.c and kern/kern_thr.c code? > > Can you humor me and test this patch please? > > Index: sys/conf/kern.pre.mk > =================================================================== > RCS file: /home/ncvs/src/sys/conf/kern.pre.mk,v > retrieving revision 1.57 > diff -u -r1.57 kern.pre.mk > --- sys/conf/kern.pre.mk 23 Sep 2004 22:53:22 -0000 1.57 > +++ sys/conf/kern.pre.mk 6 Oct 2004 03:09:09 -0000 > @@ -24,7 +24,7 @@ > . elif ${MACHINE_ARCH} == "ia64" > COPTFLAGS?=-O2 -pipe > . elif ${MACHINE_ARCH} == "sparc64" > -COPTFLAGS?=-O2 -pipe > +COPTFLAGS?=-O -pipe > . elif ${MACHINE_ARCH} == "arm" > COPTFLAGS?=-O2 -pipe > . else > > You'll need to go through a complete kernel build cycle after applying > it (starting with 'config'). > FYI... While working on adding a KASSERT() to some other code last week I had tripped across what appeared to be a section of code where the addition of the KASSERT() was "position sensitive". It was in the sparc64/sparc64/rwindow.c file, in code that's mucking around with register windows so admittedly that's somewhat special code. But a few people I asked including jake and jhb didn't see any obvious reason for where the KASSERT() went being position sensitive. In the "bad case" the result was corruption of processes, most of what the system tried to run during boot-up died. And if I shifted the kernel compile to use -O instead of -O2 with no other changes at all the resulting kernel didn't have the process corruption issues. Between Andrew's report above and a few other things (John reports his kernels built from custom config files instead of GENERIC fail to run) I decided to go ahead with shifting to -O instead of -O2 in HEAD now. Under normal circumstances I would have been more patient and asked for more input/testing here before making that sort of change but I want to be in a position I would be allowed to MFC this change for RC1 if it does turn out this fixes even just a few of the problems that seem to be floating around. If it turns out to be a false alarm I won't MFC it. Andrew, I'm particularly interested in whether or not it has an effect on what you reported given the symptoms you were seeing seem to be very similar - no explanation for what was going wrong given the code that's involved. -- Ken Smith - From there to here, from here to | kensmith@cse.buffalo.edu there, funny things are everywhere. | - Theodore Geisel | From owner-freebsd-threads@FreeBSD.ORG Thu Oct 7 00:26: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 8727516A4CE for ; Thu, 7 Oct 2004 00:26:29 +0000 (GMT) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1E00F43D1F for ; Thu, 7 Oct 2004 00:26:29 +0000 (GMT) (envelope-from eischen@vigrid.com) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) i970QFUZ019289; Wed, 6 Oct 2004 20:26:15 -0400 (EDT) Date: Wed, 6 Oct 2004 20:26:15 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Ivan Voras In-Reply-To: <41642DC8.6070908@fer.hr> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) cc: Ivan Voras cc: freebsd-threads@freebsd.org Subject: Re: threads/72353: Assertion failsin/usr/src/lib/libpthread/sys/lock.c, line 171, when compilingmonodoc 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: Thu, 07 Oct 2004 00:26:29 -0000 On Wed, 6 Oct 2004, Ivan Voras wrote: > Jeremy Messenger wrote: > > Have you tried Tom McLaughlin 's Mono > > project[1]? Tom has ported 1.0.2, 1.1.1, newer gtk-sharp and few Mono > > apps. He's kind of taking care of Mono on FreeBSD for now, which the > > maintainer of Mono is kind of too busy or has disappeared. Tom has said > > that it works with FreeBSD 5.3 only, because of better thread, TLS and etc. > > Ok, I'll try it. Meanwhile, if anybody wants to look at it, it's really > simple to reproduce once you have mono installed (which isn't a > problem). Make an empty file (touch empty.cs) and run 'mcs empty.cs > -pkg:dummypkg'. It looks like something is overruning or corrupting the stack of one of the threads. The default stack size for threads is 64K in libpthread. -- Dan Eischen From owner-freebsd-threads@FreeBSD.ORG Thu Oct 7 03:05:21 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 8F65C16A4CF for ; Thu, 7 Oct 2004 03:05:21 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5D58F43D2D; Thu, 7 Oct 2004 03:05:21 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from [127.0.0.1] (davidxu@localhost [127.0.0.1]) i9735Je9042975; Thu, 7 Oct 2004 03:05:19 GMT (envelope-from davidxu@freebsd.org) Message-ID: <4164B275.8080700@freebsd.org> Date: Thu, 07 Oct 2004 11:05:25 +0800 From: David Xu User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.7.2) Gecko/20041004 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Daniel Eischen References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: Ivan Voras cc: freebsd-threads@freebsd.org Subject: Re: threads/72353: Assertionfailsin/usr/src/lib/libpthread/sys/lock.c, line 171, when compilingmonodoc 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: Thu, 07 Oct 2004 03:05:21 -0000 Daniel Eischen wrote: >On Wed, 6 Oct 2004, Ivan Voras wrote: > > > >>Jeremy Messenger wrote: >> >> >>>Have you tried Tom McLaughlin 's Mono >>>project[1]? Tom has ported 1.0.2, 1.1.1, newer gtk-sharp and few Mono >>>apps. He's kind of taking care of Mono on FreeBSD for now, which the >>>maintainer of Mono is kind of too busy or has disappeared. Tom has said >>>that it works with FreeBSD 5.3 only, because of better thread, TLS and etc. >>> >>> >>Ok, I'll try it. Meanwhile, if anybody wants to look at it, it's really >>simple to reproduce once you have mono installed (which isn't a >>problem). Make an empty file (touch empty.cs) and run 'mcs empty.cs >>-pkg:dummypkg'. >> >> > >It looks like something is overruning or corrupting the stack of >one of the threads. The default stack size for threads is 64K in >libpthread. > > > I tried, increasing stack size to 2M still does not help. Here is the backtrace from .core file: Loaded symbols for /libexec/ld-elf.so.1 #0 0x2837bf07 in pthread_testcancel () from /usr/lib/libpthread.so.1 (gdb) bt #0 0x2837bf07 in pthread_testcancel () from /usr/lib/libpthread.so.1 #1 0x2836d099 in sigaction () from /usr/lib/libpthread.so.1 #2 0x283671c5 in pthread_kill () from /usr/lib/libpthread.so.1 #3 0x28366b94 in raise () from /usr/lib/libpthread.so.1 #4 0x28451653 in abort () from /lib/libc.so.5 #5 0x2842c733 in __assert () from /lib/libc.so.5 #6 0x2837cd37 in __error () from /usr/lib/libpthread.so.1 #7 0x2837005b in _pthread_mutex_trylock () from /usr/lib/libpthread.so.1 #8 0x283715c7 in pthread_mutex_lock () from /usr/lib/libpthread.so.1 #9 0x28171cc6 in WaitForSingleObjectEx (handle=0xe, timeout=500, alertable=0) at handles-private.h:97 #10 0x2816b116 in CreateProcess (appname=0xd, cmdline=0x8093ac4, process_attrs=0x0, thread_attrs=0x0, inherit_handles=1, create_flags=1024, new_environ=0x0, cwd=0x0, startup=0xbf8ec78c, process_info=0xbf8ec77c) at processes.c:427 #11 0x2813ef4f in ves_icall_System_Diagnostics_Process_Start_internal (appname=0x80f89d8, cmd=0x8093ab8, dirname=0x8091f30, stdin_handle=0x17e, stdout_handle=0x17e, stderr_handle=0x17e, process_info=0xbf8ec964) at process.c:870 #12 0x28f568ff in ?? () #13 0x080f89d8 in ?? () #14 0x08093ab8 in ?? () #15 0x08091f30 in ?? () #16 0x00000009 in ?? () #17 0x0000000d in ?? () #18 0x0000000b in ?? () #19 0xbf8ec964 in ?? () #20 0x0813a4e0 in ?? () #21 0x0813a4c8 in ?? () #22 0x081f17c0 in ?? () #23 0x08091f30 in ?? () #24 0x08093ab8 in ?? () #25 0x080f89d8 in ?? () #26 0xbf8ec838 in ?? () #27 0x28f568cc in ?? () #28 0xbf8ec98c in ?? () #29 0x28f562aa in ?? () #30 0x080f89d8 in ?? () #31 0x08093ab8 in ?? () #32 0x08091f30 in ?? () #33 0x00000009 in ?? () #34 0x0000000d in ?? () #35 0x0000000b in ?? () #36 0xbf8ec964 in ?? () ---Type to continue, or q to quit--- #37 0x28371b4e in pthread_mutex_unlock () from /usr/lib/libpthread.so.1 Previous frame inner to this frame (corrupt stack?) (gdb) From owner-freebsd-threads@FreeBSD.ORG Thu Oct 7 06:56:15 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 5486416A4CE; Thu, 7 Oct 2004 06:56:15 +0000 (GMT) Received: from tts.orel.ru (tts.orel.ru [213.59.64.67]) by mx1.FreeBSD.org (Postfix) with ESMTP id 893B043D45; Thu, 7 Oct 2004 06:56:14 +0000 (GMT) (envelope-from bel@orel.ru) Received: from orel.ru (pf1.net.orel.ru [213.59.64.75]) by tts.orel.ru (8.12.10/8.12.10/bel) with ESMTP id i976u6Bm031759; Thu, 7 Oct 2004 10:56:07 +0400 Message-ID: <4164E87E.2080705@orel.ru> Date: Thu, 07 Oct 2004 10:55:58 +0400 From: Andrew Belashov Organization: ORIS User-Agent: Mozilla/5.0 (X11; U; FreeBSD sparc64; en-US; rv:1.6) Gecko/20040407 X-Accept-Language: ru, en-us, en MIME-Version: 1.0 To: Ken Smith References: <41518130.3000704@orel.ru> <4152A383.3090901@orel.ru> <20041006031406.GB26037@electra.cse.Buffalo.EDU> In-Reply-To: <20041006031406.GB26037@electra.cse.Buffalo.EDU> X-Enigmail-Version: 0.83.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/mixed; boundary="------------060401020702050502030009" X-Zombi-Check: on netra2.orel.ru cc: freebsd-sparc64@freebsd.org cc: freebsd-threads@freebsd.org Subject: Re: Bug in kse_switchin()? 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: Thu, 07 Oct 2004 06:56:15 -0000 This is a multi-part message in MIME format. --------------060401020702050502030009 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Ken Smith wrote: > On Thu, Sep 23, 2004 at 02:20:51PM +0400, Andrew Belashov wrote: > > >>Where bug? >>- In sparc64 specific core? >>- In kern/kern_kse.c and kern/kern_thr.c code? > > > Can you humor me and test this patch please? > > Index: sys/conf/kern.pre.mk > =================================================================== > RCS file: /home/ncvs/src/sys/conf/kern.pre.mk,v > retrieving revision 1.57 > diff -u -r1.57 kern.pre.mk > --- sys/conf/kern.pre.mk 23 Sep 2004 22:53:22 -0000 1.57 > +++ sys/conf/kern.pre.mk 6 Oct 2004 03:09:09 -0000 > @@ -24,7 +24,7 @@ > . elif ${MACHINE_ARCH} == "ia64" > COPTFLAGS?=-O2 -pipe > . elif ${MACHINE_ARCH} == "sparc64" > -COPTFLAGS?=-O2 -pipe > +COPTFLAGS?=-O -pipe > . elif ${MACHINE_ARCH} == "arm" > COPTFLAGS?=-O2 -pipe > . else > > You'll need to go through a complete kernel build cycle after applying > it (starting with 'config'). Option -O does not solve a problem. But I have magic patch. It work with -O and -O2 options. -- Best regards, Andrew Belashov. --------------060401020702050502030009 Content-Type: text/plain; name="set_mcontext.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="set_mcontext.patch" --- sys/sparc64/sparc64/machdep.c.orig Thu Aug 5 09:42:40 2004 +++ sys/sparc64/sparc64/machdep.c Tue Sep 28 15:11:08 2004 @@ -623,6 +623,11 @@ set_mcontext(struct thread *td, const mc tf = td->td_frame; pcb = td->td_pcb; wstate = tf->tf_wstate; + /* XXXKSE Make sure the windows are spilled. + * This is needed for kse_switchin(2) for correct switching between + * threads stacks. + */ + flushw(); bcopy(mc, tf, sizeof(*tf)); tf->tf_wstate = wstate; if ((mc->mc_fprs & FPRS_FEF) != 0) { --------------060401020702050502030009-- From owner-freebsd-threads@FreeBSD.ORG Thu Oct 7 13:13:59 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 DB68316A4CE; Thu, 7 Oct 2004 13:13:59 +0000 (GMT) Received: from electra.cse.Buffalo.EDU (electra.cse.Buffalo.EDU [128.205.32.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8404743D1D; Thu, 7 Oct 2004 13:13:59 +0000 (GMT) (envelope-from kensmith@cse.Buffalo.EDU) Received: from electra.cse.Buffalo.EDU (kensmith@localhost [127.0.0.1]) i97DDvIo018645; Thu, 7 Oct 2004 09:13:57 -0400 (EDT) Received: (from kensmith@localhost) by electra.cse.Buffalo.EDU (8.12.10/8.12.9/Submit) id i97DDv49018644; Thu, 7 Oct 2004 09:13:57 -0400 (EDT) Date: Thu, 7 Oct 2004 09:13:57 -0400 From: Ken Smith To: Andrew Belashov Message-ID: <20041007131357.GA17153@electra.cse.Buffalo.EDU> References: <41518130.3000704@orel.ru> <4152A383.3090901@orel.ru> <20041006031406.GB26037@electra.cse.Buffalo.EDU> <4164E87E.2080705@orel.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4164E87E.2080705@orel.ru> User-Agent: Mutt/1.4.1i cc: Ken Smith cc: freebsd-sparc64@freebsd.org cc: freebsd-threads@freebsd.org Subject: Re: Bug in kse_switchin()? 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: Thu, 07 Oct 2004 13:14:00 -0000 On Thu, Oct 07, 2004 at 10:55:58AM +0400, Andrew Belashov wrote: > Option -O does not solve a problem. > > But I have magic patch. It work with -O and -O2 options. Thanks for testing. I'm not sure what I'll do about the -O stuff yet. Given it seems to solve one problem that other people I respect couldn't explain I'll probably revert to -O for the 5.3-RELEASE and do some more testing to see how widespread a problem it is. > --- sys/sparc64/sparc64/machdep.c.orig Thu Aug 5 09:42:40 2004 > +++ sys/sparc64/sparc64/machdep.c Tue Sep 28 15:11:08 2004 > @@ -623,6 +623,11 @@ set_mcontext(struct thread *td, const mc > tf = td->td_frame; > pcb = td->td_pcb; > wstate = tf->tf_wstate; > + /* XXXKSE Make sure the windows are spilled. > + * This is needed for kse_switchin(2) for correct switching between > + * threads stacks. > + */ > + flushw(); > bcopy(mc, tf, sizeof(*tf)); > tf->tf_wstate = wstate; > if ((mc->mc_fprs & FPRS_FEF) != 0) { And thank you very much for that! I'm testing it now, and will commit it if nothing unexpected happens. -- Ken Smith - From there to here, from here to | kensmith@cse.buffalo.edu there, funny things are everywhere. | - Theodore Geisel | From owner-freebsd-threads@FreeBSD.ORG Thu Oct 7 13:30:38 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 7541016A4CE; Thu, 7 Oct 2004 13:30:38 +0000 (GMT) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 13A8843D1D; Thu, 7 Oct 2004 13:30:38 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) i97DUW4i029242; Thu, 7 Oct 2004 09:30:32 -0400 (EDT) Date: Thu, 7 Oct 2004 09:30:32 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: David Xu In-Reply-To: <4164B275.8080700@freebsd.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) cc: Ivan Voras cc: freebsd-threads@freebsd.org Subject: Re: threads/72353: Assertionfailsin/usr/src/lib/libpthread/sys/lock.c, line 171, when compilingmonodoc X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Daniel Eischen List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Oct 2004 13:30:38 -0000 On Thu, 7 Oct 2004, David Xu wrote: > Daniel Eischen wrote: > > >On Wed, 6 Oct 2004, Ivan Voras wrote: > > > > > > > >>Jeremy Messenger wrote: > >> > >> > >>>Have you tried Tom McLaughlin 's Mono > >>>project[1]? Tom has ported 1.0.2, 1.1.1, newer gtk-sharp and few Mono > >>>apps. He's kind of taking care of Mono on FreeBSD for now, which the > >>>maintainer of Mono is kind of too busy or has disappeared. Tom has said > >>>that it works with FreeBSD 5.3 only, because of better thread, TLS and etc. > >>> > >>> > >>Ok, I'll try it. Meanwhile, if anybody wants to look at it, it's really > >>simple to reproduce once you have mono installed (which isn't a > >>problem). Make an empty file (touch empty.cs) and run 'mcs empty.cs > >>-pkg:dummypkg'. > >> > >> > > > >It looks like something is overruning or corrupting the stack of > >one of the threads. The default stack size for threads is 64K in > >libpthread. > > > > > > > I tried, increasing stack size to 2M still does not help. > Here is the backtrace from .core file: > > Loaded symbols for /libexec/ld-elf.so.1 > #0 0x2837bf07 in pthread_testcancel () from /usr/lib/libpthread.so.1 > (gdb) bt > #0 0x2837bf07 in pthread_testcancel () from /usr/lib/libpthread.so.1 > #1 0x2836d099 in sigaction () from /usr/lib/libpthread.so.1 > #2 0x283671c5 in pthread_kill () from /usr/lib/libpthread.so.1 > #3 0x28366b94 in raise () from /usr/lib/libpthread.so.1 > #4 0x28451653 in abort () from /lib/libc.so.5 > #5 0x2842c733 in __assert () from /lib/libc.so.5 > #6 0x2837cd37 in __error () from /usr/lib/libpthread.so.1 > #7 0x2837005b in _pthread_mutex_trylock () from /usr/lib/libpthread.so.1 The stack is already corrupt here. pthread_mutex_lock() doesn't call pthread_mutex_trylock(). > #8 0x283715c7 in pthread_mutex_lock () from /usr/lib/libpthread.so.1 > #9 0x28171cc6 in WaitForSingleObjectEx (handle=0xe, timeout=500, > alertable=0) at handles-private.h:97 > #10 0x2816b116 in CreateProcess (appname=0xd, cmdline=0x8093ac4, > process_attrs=0x0, thread_attrs=0x0, inherit_handles=1, > create_flags=1024, new_environ=0x0, cwd=0x0, startup=0xbf8ec78c, > process_info=0xbf8ec77c) at processes.c:427 > #11 0x2813ef4f in ves_icall_System_Diagnostics_Process_Start_internal > (appname=0x80f89d8, cmd=0x8093ab8, dirname=0x8091f30, > stdin_handle=0x17e, stdout_handle=0x17e, stderr_handle=0x17e, > process_info=0xbf8ec964) at process.c:870 > #12 0x28f568ff in ?? () > #13 0x080f89d8 in ?? () > #14 0x08093ab8 in ?? () > #15 0x08091f30 in ?? () > #16 0x00000009 in ?? () > #17 0x0000000d in ?? () > #18 0x0000000b in ?? () > #19 0xbf8ec964 in ?? () > #20 0x0813a4e0 in ?? () > #21 0x0813a4c8 in ?? () > #22 0x081f17c0 in ?? () > #23 0x08091f30 in ?? () > #24 0x08093ab8 in ?? () > #25 0x080f89d8 in ?? () > #26 0xbf8ec838 in ?? () > #27 0x28f568cc in ?? () > #28 0xbf8ec98c in ?? () > #29 0x28f562aa in ?? () > #30 0x080f89d8 in ?? () > #31 0x08093ab8 in ?? () > #32 0x08091f30 in ?? () > #33 0x00000009 in ?? () > #34 0x0000000d in ?? () > #35 0x0000000b in ?? () > #36 0xbf8ec964 in ?? () > ---Type to continue, or q to quit--- > #37 0x28371b4e in pthread_mutex_unlock () from /usr/lib/libpthread.so.1 > Previous frame inner to this frame (corrupt stack?) > (gdb) > > > -- Dan Eischen From owner-freebsd-threads@FreeBSD.ORG Thu Oct 7 17:06:44 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 D3B0216A4CE for ; Thu, 7 Oct 2004 17:06:44 +0000 (GMT) Received: from mail5.speakeasy.net (mail5.speakeasy.net [216.254.0.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id A9B2443D1D for ; Thu, 7 Oct 2004 17:06:44 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: (qmail 26149 invoked from network); 7 Oct 2004 17:06:44 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 7 Oct 2004 17:06:43 -0000 Received: from [10.50.40.210] (gw1.twc.weather.com [216.133.140.1]) (authenticated bits=0) by server.baldwin.cx (8.12.11/8.12.11) with ESMTP id i97H6cs8081762; Thu, 7 Oct 2004 13:06:41 -0400 (EDT) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: freebsd-sparc64@FreeBSD.org Date: Thu, 7 Oct 2004 11:26:02 -0400 User-Agent: KMail/1.6.2 References: <20041006031406.GB26037@electra.cse.Buffalo.EDU> <20041006201849.GC21875@electra.cse.Buffalo.EDU> In-Reply-To: <20041006201849.GC21875@electra.cse.Buffalo.EDU> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200410071126.02612.jhb@FreeBSD.org> X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on server.baldwin.cx cc: Ken Smith cc: freebsd-threads@FreeBSD.org Subject: Re: Bug in kse_switchin()? 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: Thu, 07 Oct 2004 17:06:45 -0000 On Wednesday 06 October 2004 04:18 pm, Ken Smith wrote: > On Tue, Oct 05, 2004 at 11:14:06PM -0400, Ken Smith wrote: > > On Thu, Sep 23, 2004 at 02:20:51PM +0400, Andrew Belashov wrote: > > > Where bug? > > > - In sparc64 specific core? > > > - In kern/kern_kse.c and kern/kern_thr.c code? > > > > Can you humor me and test this patch please? > > > > Index: sys/conf/kern.pre.mk > > =================================================================== > > RCS file: /home/ncvs/src/sys/conf/kern.pre.mk,v > > retrieving revision 1.57 > > diff -u -r1.57 kern.pre.mk > > --- sys/conf/kern.pre.mk 23 Sep 2004 22:53:22 -0000 1.57 > > +++ sys/conf/kern.pre.mk 6 Oct 2004 03:09:09 -0000 > > @@ -24,7 +24,7 @@ > > . elif ${MACHINE_ARCH} == "ia64" > > COPTFLAGS?=-O2 -pipe > > . elif ${MACHINE_ARCH} == "sparc64" > > -COPTFLAGS?=-O2 -pipe > > +COPTFLAGS?=-O -pipe > > . elif ${MACHINE_ARCH} == "arm" > > COPTFLAGS?=-O2 -pipe > > . else > > > > You'll need to go through a complete kernel build cycle after applying > > it (starting with 'config'). > > FYI... > > While working on adding a KASSERT() to some other code last week I > had tripped across what appeared to be a section of code where the > addition of the KASSERT() was "position sensitive". It was in the > sparc64/sparc64/rwindow.c file, in code that's mucking around with > register windows so admittedly that's somewhat special code. But > a few people I asked including jake and jhb didn't see any obvious > reason for where the KASSERT() went being position sensitive. In > the "bad case" the result was corruption of processes, most of > what the system tried to run during boot-up died. And if I shifted > the kernel compile to use -O instead of -O2 with no other changes > at all the resulting kernel didn't have the process corruption issues. > > Between Andrew's report above and a few other things (John reports > his kernels built from custom config files instead of GENERIC fail > to run) I decided to go ahead with shifting to -O instead of -O2 > in HEAD now. Under normal circumstances I would have been more > patient and asked for more input/testing here before making that > sort of change but I want to be in a position I would be allowed > to MFC this change for RC1 if it does turn out this fixes even > just a few of the problems that seem to be floating around. If > it turns out to be a false alarm I won't MFC it. FWIW, -O didn't help me to compile a custom kernel. I get a page fault very early due to running out of UMA preallocated pages I think. I have no idea why though. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-threads@FreeBSD.ORG Thu Oct 7 18:07:00 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 AEAB516A4CE; Thu, 7 Oct 2004 18:07:00 +0000 (GMT) Received: from electra.cse.Buffalo.EDU (electra.cse.Buffalo.EDU [128.205.32.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5C56C43D54; Thu, 7 Oct 2004 18:07:00 +0000 (GMT) (envelope-from kensmith@cse.Buffalo.EDU) Received: from electra.cse.Buffalo.EDU (kensmith@localhost [127.0.0.1]) i97I6wIo026779; Thu, 7 Oct 2004 14:06:58 -0400 (EDT) Received: (from kensmith@localhost) by electra.cse.Buffalo.EDU (8.12.10/8.12.9/Submit) id i97I6wDR026778; Thu, 7 Oct 2004 14:06:58 -0400 (EDT) Date: Thu, 7 Oct 2004 14:06:58 -0400 From: Ken Smith To: John Baldwin Message-ID: <20041007180658.GA26119@electra.cse.Buffalo.EDU> References: <20041006031406.GB26037@electra.cse.Buffalo.EDU> <20041006201849.GC21875@electra.cse.Buffalo.EDU> <200410071126.02612.jhb@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200410071126.02612.jhb@FreeBSD.org> User-Agent: Mutt/1.4.1i cc: Ken Smith cc: freebsd-sparc64@FreeBSD.org cc: freebsd-threads@FreeBSD.org Subject: Re: Bug in kse_switchin()? 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: Thu, 07 Oct 2004 18:07:00 -0000 On Thu, Oct 07, 2004 at 11:26:02AM -0400, John Baldwin wrote: > FWIW, -O didn't help me to compile a custom kernel. I get a page fault very > early due to running out of UMA preallocated pages I think. I have no idea > why though. Ok, so this makes it official: -O only seems to fix the problem I tripped across and that is in arguably special code given it's monkeying around with register windows. Sigh. So what do you get if you already earned a pointy hat for something and you do something dumb while still wearing it? -- Ken Smith - From there to here, from here to | kensmith@cse.buffalo.edu there, funny things are everywhere. | - Theodore Geisel | From owner-freebsd-threads@FreeBSD.ORG Thu Oct 7 18:58:19 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 68F3616A4CE; Thu, 7 Oct 2004 18:58:19 +0000 (GMT) Received: from mail.vicor-nb.com (bigwoop.vicor-nb.com [208.206.78.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4483E43D53; Thu, 7 Oct 2004 18:58:19 +0000 (GMT) (envelope-from julian@elischer.org) Received: from elischer.org (julian.vicor-nb.com [208.206.78.97]) by mail.vicor-nb.com (Postfix) with ESMTP id 0C6657A403; Thu, 7 Oct 2004 11:58:19 -0700 (PDT) Message-ID: <416591CA.10407@elischer.org> Date: Thu, 07 Oct 2004 11:58:18 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.3.1) Gecko/20030516 X-Accept-Language: en, hu MIME-Version: 1.0 To: Ken Smith References: <20041006031406.GB26037@electra.cse.Buffalo.EDU> <20041006201849.GC21875@electra.cse.Buffalo.EDU> <200410071126.02612.jhb@FreeBSD.org> <20041007180658.GA26119@electra.cse.Buffalo.EDU> In-Reply-To: <20041007180658.GA26119@electra.cse.Buffalo.EDU> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-sparc64@freebsd.org cc: John Baldwin cc: freebsd-threads@freebsd.org Subject: Re: Bug in kse_switchin()? 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: Thu, 07 Oct 2004 18:58:19 -0000 Ken Smith wrote: >On Thu, Oct 07, 2004 at 11:26:02AM -0400, John Baldwin wrote: > > > >>FWIW, -O didn't help me to compile a custom kernel. I get a page fault very >>early due to running out of UMA preallocated pages I think. I have no idea >>why though. >> >> > >Ok, so this makes it official: -O only seems to fix the problem I tripped >across and that is in arguably special code given it's monkeying around >with register windows. > >Sigh. So what do you get if you already earned a pointy hat for something >and you do something dumb while still wearing it? > pointy hats nest.. > > > From owner-freebsd-threads@FreeBSD.ORG Thu Oct 7 19:10:49 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 6B91C16A4CF; Thu, 7 Oct 2004 19:10:49 +0000 (GMT) Received: from ns1.xcllnt.net (209-128-86-226.bayarea.net [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2966643D4C; Thu, 7 Oct 2004 19:10:49 +0000 (GMT) (envelope-from marcel@xcllnt.net) Received: from ns1.xcllnt.net (localhost [127.0.0.1]) by ns1.xcllnt.net (8.13.1/8.13.1) with ESMTP id i97JAgqq082912; Thu, 7 Oct 2004 12:10:42 -0700 (PDT) (envelope-from marcel@ns1.xcllnt.net) Received: (from marcel@localhost) by ns1.xcllnt.net (8.13.1/8.13.1/Submit) id i97JAgT0082911; Thu, 7 Oct 2004 12:10:42 -0700 (PDT) (envelope-from marcel) Date: Thu, 7 Oct 2004 12:10:42 -0700 From: Marcel Moolenaar To: Ken Smith Message-ID: <20041007191042.GB82804@ns1.xcllnt.net> References: <20041006031406.GB26037@electra.cse.Buffalo.EDU> <20041006201849.GC21875@electra.cse.Buffalo.EDU> <200410071126.02612.jhb@FreeBSD.org> <20041007180658.GA26119@electra.cse.Buffalo.EDU> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041007180658.GA26119@electra.cse.Buffalo.EDU> User-Agent: Mutt/1.4.2.1i cc: freebsd-sparc64@freebsd.org cc: John Baldwin cc: freebsd-threads@freebsd.org Subject: Re: Bug in kse_switchin()? 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: Thu, 07 Oct 2004 19:10:49 -0000 On Thu, Oct 07, 2004 at 02:06:58PM -0400, Ken Smith wrote: > > Sigh. So what do you get if you already earned a pointy hat for something > and you do something dumb while still wearing it? A discount :-) -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net From owner-freebsd-threads@FreeBSD.ORG Thu Oct 7 19:50:33 2004 Return-Path: Delivered-To: freebsd-threads@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D32BD16A4E0 for ; Thu, 7 Oct 2004 19:50:33 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id B453C43D5E for ; Thu, 7 Oct 2004 19:50:27 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i97JoRYX079646 for ; Thu, 7 Oct 2004 19:50:27 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i97JoR03079645; Thu, 7 Oct 2004 19:50:27 GMT (envelope-from gnats) Resent-Date: Thu, 7 Oct 2004 19:50:27 GMT Resent-Message-Id: <200410071950.i97JoR03079645@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-threads@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Mark Gooderum Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4A9D016A4CE for ; Thu, 7 Oct 2004 19:49:39 +0000 (GMT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3E61943D49 for ; Thu, 7 Oct 2004 19:49:39 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.12.11/8.12.11) with ESMTP id i97Jnd6g004042 for ; Thu, 7 Oct 2004 19:49:39 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.12.11/8.12.11/Submit) id i97Jndpw004041; Thu, 7 Oct 2004 19:49:39 GMT (envelope-from nobody) Message-Id: <200410071949.i97Jndpw004041@www.freebsd.org> Date: Thu, 7 Oct 2004 19:49:39 GMT From: Mark Gooderum To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Subject: threads/72429: threads blocked in stdio (fgets, etc) are not cancellable in 5.3 (works in 4.x) 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: Thu, 07 Oct 2004 19:50:34 -0000 >Number: 72429 >Category: threads >Synopsis: threads blocked in stdio (fgets, etc) are not cancellable in 5.3 (works in 4.x) >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-threads >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Oct 07 19:50:27 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Mark Gooderum >Release: 5.3 Beta 6 >Organization: Vernier Networks, Inc. >Environment: FreeBSD 172.20.1.199 5.3-BETA6 FreeBSD 5.3-BETA6 #0: Thu Oct 7 09:35:49 PDT 2004 root@eagle.jumpadmin.net:/usr/build/ambit2/freebsd5/sys/i386/compile/VNISMP i386 >Description: With libc_r in 4.9 a function blocked in stdio (say fgets()) is cancellable. The call from fgets() to the I/O in FreeBSD 4.9 with libc/libc_r: fgets() __srefill() __sread() (via fp->_read()) _read() (now in libc_r) calls thread_enter_cancellation_point() calls __read() __read() does the uthread I/O voodoo thread can be cancelled... With FreeBSD 5.3 libc/libpthread: fgets() __srefill() __sread() (via fp->_read()) _read() - weak symbol for __sys_read() in libc (libpthread only defines __read and a weak reference from read to __read) thread can't be cancelled - it's blocked in real system call and thread_enter_cancellation_point() was never called With FreeBSD 5.3 libc/libpthread: fgets() __srefill() __sread() (via fp->_read()) _read() (now in libc_r) _read() does the uthread I/O voodoo thread can't be cancelled as thread_enter_cancellation_point() was never called, that is in __read()... >How-To-Repeat: Try to pthread_cancel() a thread blocked in any stdio operation (fgets, fread, etc), it will never cancel. >Fix: Given the current conventions for _foo, __foo and foo it seems like __sread et. al. should be calling the foo() versions of the functions so they get wrapped as cancellation points. >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-threads@FreeBSD.ORG Thu Oct 7 20:14:30 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 53C1116A4CE; Thu, 7 Oct 2004 20:14:30 +0000 (GMT) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id B022843D5A; Thu, 7 Oct 2004 20:14:29 +0000 (GMT) (envelope-from deischen@gdeb.com) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) i97KESZR019868; Thu, 7 Oct 2004 16:14:28 -0400 (EDT) Date: Thu, 7 Oct 2004 16:14:28 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Mark Gooderum In-Reply-To: <200410071949.i97Jndpw004041@www.freebsd.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) cc: freebsd-gnats-submit@freebsd.org cc: freebsd-threads@freebsd.org Subject: Re: threads/72429: threads blocked in stdio (fgets, etc) are not cancellable in 5.3 (works in 4.x) X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Daniel Eischen List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Oct 2004 20:14:30 -0000 fgets is not a required cancellation point. See the POSIX standard. The standard says it, along with many other functions, _may_ be a cancellation point, but the only required cancellation points are: accept() mq_timedsend() putpmsg() sigtimedwait() aio_suspend() msgrcv() pwrite() sigwait() clock_nanosleep() msgsnd() read() sigwaitinfo() close() msync() readv() sleep() connect() nanosleep() recv() system() creat() open() recvfrom() tcdrain() fcntl()2 pause() recvmsg() usleep() fdatasync() poll() select() wait() fsync() pread() sem_timedwait() waitid() getmsg() pselect() sem_wait() waitpid() getpmsg() pthread_cond_timedwait() send() write() lockf() pthread_cond_wait() sendmsg() writev() mq_receive() pthread_join() sendto() mq_send() pthread_testcancel() sigpause() mq_timedreceive() putmsg() sigsuspend() -- Dan Eischen From owner-freebsd-threads@FreeBSD.ORG Thu Oct 7 20:20:24 2004 Return-Path: Delivered-To: freebsd-threads@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7265A16A4CE for ; Thu, 7 Oct 2004 20:20:24 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 636DF43D39 for ; Thu, 7 Oct 2004 20:20:24 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i97KKOQx084253 for ; Thu, 7 Oct 2004 20:20:24 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i97KKOrO084252; Thu, 7 Oct 2004 20:20:24 GMT (envelope-from gnats) Date: Thu, 7 Oct 2004 20:20:24 GMT Message-Id: <200410072020.i97KKOrO084252@freefall.freebsd.org> To: freebsd-threads@FreeBSD.org From: Daniel Eischen Subject: Re: threads/72429: threads blocked in stdio (fgets, etc) are not cancellable in 5.3 (works in 4.x) X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Daniel Eischen List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Oct 2004 20:20:24 -0000 The following reply was made to PR threads/72429; it has been noted by GNATS. From: Daniel Eischen To: Mark Gooderum Cc: freebsd-gnats-submit@freebsd.org, Subject: Re: threads/72429: threads blocked in stdio (fgets, etc) are not cancellable in 5.3 (works in 4.x) Date: Thu, 7 Oct 2004 16:14:28 -0400 (EDT) fgets is not a required cancellation point. See the POSIX standard. The standard says it, along with many other functions, _may_ be a cancellation point, but the only required cancellation points are: accept() mq_timedsend() putpmsg() sigtimedwait() aio_suspend() msgrcv() pwrite() sigwait() clock_nanosleep() msgsnd() read() sigwaitinfo() close() msync() readv() sleep() connect() nanosleep() recv() system() creat() open() recvfrom() tcdrain() fcntl()2 pause() recvmsg() usleep() fdatasync() poll() select() wait() fsync() pread() sem_timedwait() waitid() getmsg() pselect() sem_wait() waitpid() getpmsg() pthread_cond_timedwait() send() write() lockf() pthread_cond_wait() sendmsg() writev() mq_receive() pthread_join() sendto() mq_send() pthread_testcancel() sigpause() mq_timedreceive() putmsg() sigsuspend() -- Dan Eischen From owner-freebsd-threads@FreeBSD.ORG Thu Oct 7 21:14:47 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 D534416A4CE; Thu, 7 Oct 2004 21:14:47 +0000 (GMT) Received: from exch2.verniernetworks.com (dns.verniernetworks.com [65.200.185.165]) by mx1.FreeBSD.org (Postfix) with ESMTP id 529D743D45; Thu, 7 Oct 2004 21:14:46 +0000 (GMT) (envelope-from mark@verniernetworks.com) Received: from verniernetworks.com ([192.168.2.254]) by exch2.verniernetworks.com with Microsoft SMTPSVC(6.0.3790.0); Thu, 7 Oct 2004 14:14:44 -0700 Message-ID: <4165B1C2.40200@verniernetworks.com> Date: Thu, 07 Oct 2004 16:14:42 -0500 From: Mark Gooderum User-Agent: Mozilla/5.0 (X11; U; Linux i386; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Daniel Eischen References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 07 Oct 2004 21:14:45.0140 (UTC) FILETIME=[AB4E2D40:01C4ACB2] cc: freebsd-gnats-submit@freebsd.org cc: archie@dellroad.org cc: freebsd-threads@freebsd.org Subject: Re: threads/72429: threads blocked in stdio (fgets, etc) are not cancellable in 5.3 (works in 4.x) 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: Thu, 07 Oct 2004 21:14:48 -0000 But this is a major change in behavior from FreeBSD 4 and also a difference from Linux. I'm not a Linux bigot at all but there is a recurring theme that XX threaded apps works on Linux but is unstable on FreeBSD and these sort of major behavior deltas contribute to the perception of FreeBSD threading as unstable by some. In fact it means that any thread doing blocking stdio is uncancellable - the standard may not require it but many applications might expect it. Given that the functionality was there in 4.x and lost in 5.x I'd call it a regression. I've no goal of being a "johnny come lately" and criticize choices made earlier but I am part of a company using FreeBSD as part of it's core technology and we're in the midst of migrating our product code base from FreeBSD 4.9 (most recent, been trucking along since 4.3) to FreeBSD 5.3 and these are the sort of changes that break things and cause pain for developers. Parts of our code have been threaded from the start - originally with PTH and then we made the transition to libc_r pthreads about a year ago and now we're jumping to libpthread to stick with what is "supported". Just my polite $.02 worth. -=- Mark >fgets is not a required cancellation point. See the POSIX standard. >The standard says it, along with many other functions, _may_ be a >cancellation point, but the only required cancellation points are: > > accept() mq_timedsend() putpmsg() sigtimedwait() > aio_suspend() msgrcv() pwrite() sigwait() > clock_nanosleep() msgsnd() read() sigwaitinfo() > close() msync() readv() sleep() > connect() nanosleep() recv() system() > creat() open() recvfrom() tcdrain() > fcntl()2 pause() recvmsg() usleep() > fdatasync() poll() select() wait() > fsync() pread() sem_timedwait() waitid() > getmsg() pselect() sem_wait() waitpid() > getpmsg() pthread_cond_timedwait() send() write() > lockf() pthread_cond_wait() sendmsg() writev() > mq_receive() pthread_join() sendto() > mq_send() pthread_testcancel() sigpause() > mq_timedreceive() putmsg() sigsuspend() > > > From owner-freebsd-threads@FreeBSD.ORG Thu Oct 7 21:20:18 2004 Return-Path: Delivered-To: freebsd-threads@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5933116A4CE for ; Thu, 7 Oct 2004 21:20:18 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2E6FB43D49 for ; Thu, 7 Oct 2004 21:20:18 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i97LKIGe090834 for ; Thu, 7 Oct 2004 21:20:18 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i97LKIFT090833; Thu, 7 Oct 2004 21:20:18 GMT (envelope-from gnats) Date: Thu, 7 Oct 2004 21:20:18 GMT Message-Id: <200410072120.i97LKIFT090833@freefall.freebsd.org> To: freebsd-threads@FreeBSD.org From: Mark Gooderum Subject: Re: threads/72429: threads blocked in stdio (fgets, etc) are not cancellable in 5.3 (works in 4.x) X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Mark Gooderum List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Oct 2004 21:20:18 -0000 The following reply was made to PR threads/72429; it has been noted by GNATS. From: Mark Gooderum To: Daniel Eischen Cc: freebsd-gnats-submit@freebsd.org, freebsd-threads@freebsd.org, archie@dellroad.org Subject: Re: threads/72429: threads blocked in stdio (fgets, etc) are not cancellable in 5.3 (works in 4.x) Date: Thu, 07 Oct 2004 16:14:42 -0500 But this is a major change in behavior from FreeBSD 4 and also a difference from Linux. I'm not a Linux bigot at all but there is a recurring theme that XX threaded apps works on Linux but is unstable on FreeBSD and these sort of major behavior deltas contribute to the perception of FreeBSD threading as unstable by some. In fact it means that any thread doing blocking stdio is uncancellable - the standard may not require it but many applications might expect it. Given that the functionality was there in 4.x and lost in 5.x I'd call it a regression. I've no goal of being a "johnny come lately" and criticize choices made earlier but I am part of a company using FreeBSD as part of it's core technology and we're in the midst of migrating our product code base from FreeBSD 4.9 (most recent, been trucking along since 4.3) to FreeBSD 5.3 and these are the sort of changes that break things and cause pain for developers. Parts of our code have been threaded from the start - originally with PTH and then we made the transition to libc_r pthreads about a year ago and now we're jumping to libpthread to stick with what is "supported". Just my polite $.02 worth. -=- Mark >fgets is not a required cancellation point. See the POSIX standard. >The standard says it, along with many other functions, _may_ be a >cancellation point, but the only required cancellation points are: > > accept() mq_timedsend() putpmsg() sigtimedwait() > aio_suspend() msgrcv() pwrite() sigwait() > clock_nanosleep() msgsnd() read() sigwaitinfo() > close() msync() readv() sleep() > connect() nanosleep() recv() system() > creat() open() recvfrom() tcdrain() > fcntl()2 pause() recvmsg() usleep() > fdatasync() poll() select() wait() > fsync() pread() sem_timedwait() waitid() > getmsg() pselect() sem_wait() waitpid() > getpmsg() pthread_cond_timedwait() send() write() > lockf() pthread_cond_wait() sendmsg() writev() > mq_receive() pthread_join() sendto() > mq_send() pthread_testcancel() sigpause() > mq_timedreceive() putmsg() sigsuspend() > > > From owner-freebsd-threads@FreeBSD.ORG Thu Oct 7 21:59:45 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 273D916A4CE; Thu, 7 Oct 2004 21:59:45 +0000 (GMT) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 832BF43D31; Thu, 7 Oct 2004 21:59:44 +0000 (GMT) (envelope-from deischen@gdeb.com) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) i97LxflO027332; Thu, 7 Oct 2004 17:59:42 -0400 (EDT) Date: Thu, 7 Oct 2004 17:59:41 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Mark Gooderum In-Reply-To: <4165B1C2.40200@verniernetworks.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) cc: freebsd-gnats-submit@freebsd.org cc: archie@dellroad.org cc: freebsd-threads@freebsd.org Subject: Re: threads/72429: threads blocked in stdio (fgets, etc) are not cancellable in 5.3 (works in 4.x) X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Daniel Eischen List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Oct 2004 21:59:45 -0000 On Thu, 7 Oct 2004, Mark Gooderum wrote: > But this is a major change in behavior from FreeBSD 4 and also a > difference from Linux. I'm not a Linux bigot at all but there is a > recurring theme that XX threaded apps works on Linux but is unstable on > FreeBSD and these sort of major behavior deltas contribute to the > perception of FreeBSD threading as unstable by some. If you want to be portable, you should be using select() or poll(). It's not like there is no portable way of doing what you want, and in fact relying on fgets() to be cancellable is not portable. > In fact it means that any thread doing blocking stdio is uncancellable - > the standard may not require it but many applications might expect it. > Given that the functionality was there in 4.x and lost in 5.x I'd call > it a regression. fgets() was not supposed to be cancellable in 4.x. If it is, it is not by intention. Anything that calls _foo (single underscore versions of system calls) is intentionally doing it that way to avoid entering undesired cancellation points (and blocking points in the case of libc_r). There are other uses of _read() within libc and those may not want to be cancellation points. The overall design of libc is that all internal uses of system calls use the single underscore versions and let the threads library override them if it wants. _foo() is not supposed to be cancellable, and, in the case of libc_r, is also not supposed to allow the process to block when hit (libc_r converts _read() and _write() to poll(), then switches to another thread). I don't know why fgets() ends up as a cancellation point in libc_r, but it shouldn't be by design -- it is a bug. -- Dan Eischen From owner-freebsd-threads@FreeBSD.ORG Thu Oct 7 22:00:43 2004 Return-Path: Delivered-To: freebsd-threads@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C04B916A4CE for ; Thu, 7 Oct 2004 22:00:43 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 977DF43D2F for ; Thu, 7 Oct 2004 22:00:43 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i97M0hSS093222 for ; Thu, 7 Oct 2004 22:00:43 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i97M0htr093221; Thu, 7 Oct 2004 22:00:43 GMT (envelope-from gnats) Date: Thu, 7 Oct 2004 22:00:43 GMT Message-Id: <200410072200.i97M0htr093221@freefall.freebsd.org> To: freebsd-threads@FreeBSD.org From: Daniel Eischen Subject: Re: threads/72429: threads blocked in stdio (fgets, etc) are not cancellable in 5.3 (works in 4.x) X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Daniel Eischen List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Oct 2004 22:00:43 -0000 The following reply was made to PR threads/72429; it has been noted by GNATS. From: Daniel Eischen To: Mark Gooderum Cc: freebsd-gnats-submit@freebsd.org, , Subject: Re: threads/72429: threads blocked in stdio (fgets, etc) are not cancellable in 5.3 (works in 4.x) Date: Thu, 7 Oct 2004 17:59:41 -0400 (EDT) On Thu, 7 Oct 2004, Mark Gooderum wrote: > But this is a major change in behavior from FreeBSD 4 and also a > difference from Linux. I'm not a Linux bigot at all but there is a > recurring theme that XX threaded apps works on Linux but is unstable on > FreeBSD and these sort of major behavior deltas contribute to the > perception of FreeBSD threading as unstable by some. If you want to be portable, you should be using select() or poll(). It's not like there is no portable way of doing what you want, and in fact relying on fgets() to be cancellable is not portable. > In fact it means that any thread doing blocking stdio is uncancellable - > the standard may not require it but many applications might expect it. > Given that the functionality was there in 4.x and lost in 5.x I'd call > it a regression. fgets() was not supposed to be cancellable in 4.x. If it is, it is not by intention. Anything that calls _foo (single underscore versions of system calls) is intentionally doing it that way to avoid entering undesired cancellation points (and blocking points in the case of libc_r). There are other uses of _read() within libc and those may not want to be cancellation points. The overall design of libc is that all internal uses of system calls use the single underscore versions and let the threads library override them if it wants. _foo() is not supposed to be cancellable, and, in the case of libc_r, is also not supposed to allow the process to block when hit (libc_r converts _read() and _write() to poll(), then switches to another thread). I don't know why fgets() ends up as a cancellation point in libc_r, but it shouldn't be by design -- it is a bug. -- Dan Eischen From owner-freebsd-threads@FreeBSD.ORG Thu Oct 7 22:26:21 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 B3D7016A4CE for ; Thu, 7 Oct 2004 22:26:21 +0000 (GMT) Received: from av1-1-sn1.fre.skanova.net (av1-1-sn1.fre.skanova.net [81.228.11.107]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6C43B43D1D for ; Thu, 7 Oct 2004 22:26:19 +0000 (GMT) (envelope-from pawel.worach@telia.com) Received: by av1-1-sn1.fre.skanova.net (Postfix, from userid 502) id C022938012; Fri, 8 Oct 2004 00:26:18 +0200 (CEST) Received: from smtp3-2-sn1.fre.skanova.net (smtp3-2-sn1.fre.skanova.net [81.228.11.164]) by av1-1-sn1.fre.skanova.net (Postfix) with ESMTP id B37CD37ED6 for ; Fri, 8 Oct 2004 00:26:18 +0200 (CEST) Received: from corona.sajd.net (h47n2fls31o265.telia.com [217.208.189.47]) by smtp3-2-sn1.fre.skanova.net (Postfix) with ESMTP id 9D29037E4A for ; Fri, 8 Oct 2004 00:26:18 +0200 (CEST) Received: from [127.0.0.1] (sajd@localhost [127.0.0.1]) by corona.sajd.net (8.13.1/8.13.1) with ESMTP id i97MQGse005885 for ; Fri, 8 Oct 2004 00:26:16 +0200 (CEST) (envelope-from pawel.worach@telia.com) Message-ID: <4165C285.9050909@telia.com> Date: Fri, 08 Oct 2004 00:26:13 +0200 From: Pawel Worach User-Agent: Mozilla Thunderbird 0.7.3 (X11/20040815) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-threads@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: BIND9 and libpthread performance 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: Thu, 07 Oct 2004 22:26:21 -0000 Hi, I did some simple benchmarking with libpthread vs. libc_r and BIND. The numbers puzzle me. Are pthreads supposed to this much slower? Tests done using BIND9 with a authoritative root zone. The queryperf tool from bind-9.3.0/contrib/queryperf was used to get the numbers. Queries where done for ". SOA". (queryperf -s 127.0.0.1 -l 30) This is on -CURRENT from Oct 6th, WITNESS, INVARIANTS off and libpthread built without _LOCK_DEBUG and _PTHREADS_INVARIANTS. Hardware is a dual IBM x345 2.8ghz Xeon box with HTT on. SCHED_4BSD, PREEMPTION and ADAPTIVE_GIANT are in the kernel config, malloc.conf symlinked to 'aj'. Results (queries per second according to queryperf): x libpthread-system-scope + libc_r +--------------------------------------------------------------------------+ |x +++ + +| |A |__M__A______| | +--------------------------------------------------------------------------+ N Min Max Median Avg Stddev x 5 2074.3131 2094.7966 2087.3796 2086.4217 7.579802 + 5 8179.1707 9535.1741 8448.1802 8763.1869 619.70126 Difference at 95.0% confidence 6676.77 +/- 639.13 320.01% +/- 30.6328% (Student's t, pooled s = 438.228) Any ideas why the difference is so big, is there anything else to tune? -- Pawel From owner-freebsd-threads@FreeBSD.ORG Thu Oct 7 22:36:45 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 D485C16A4CE; Thu, 7 Oct 2004 22:36:45 +0000 (GMT) Received: from exch2.verniernetworks.com (dns.verniernetworks.com [65.200.185.165]) by mx1.FreeBSD.org (Postfix) with ESMTP id 990B843D2F; Thu, 7 Oct 2004 22:36:45 +0000 (GMT) (envelope-from mark@verniernetworks.com) Received: from verniernetworks.com ([192.168.2.254]) by exch2.verniernetworks.com with Microsoft SMTPSVC(6.0.3790.0); Thu, 7 Oct 2004 15:36:45 -0700 Message-ID: <4165C4FC.2010607@verniernetworks.com> Date: Thu, 07 Oct 2004 17:36:44 -0500 From: Mark Gooderum User-Agent: Mozilla/5.0 (X11; U; Linux i386; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Daniel Eischen References: In-Reply-To: X-OriginalArrivalTime: 07 Oct 2004 22:36:45.0359 (UTC) FILETIME=[1FFC03F0:01C4ACBE] Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.1 cc: freebsd-gnats-submit@freebsd.org cc: archie@dellroad.org cc: freebsd-threads@freebsd.org Subject: Re: threads/72429: threads blocked in stdio (fgets, etc) are not cancellable in 5.3 (works in 4.x) 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: Thu, 07 Oct 2004 22:36:46 -0000 Uncle. Okay - you're right, sigh. It's not so much that we're using fgets() as many/most C based parsing libraries use stdio, bleh. As for why libc_r is cancellable... In 4.x _foo() sets the cancellation state and calls __foo() (for read, write, et.al), in 5.3 it's reversed. -- Mark >On Thu, 7 Oct 2004, Mark Gooderum wrote: > > > >>But this is a major change in behavior from FreeBSD 4 and also a >>difference from Linux. I'm not a Linux bigot at all but there is a >>recurring theme that XX threaded apps works on Linux but is unstable on >>FreeBSD and these sort of major behavior deltas contribute to the >>perception of FreeBSD threading as unstable by some. >> >> > >If you want to be portable, you should be using select() or >poll(). It's not like there is no portable way of doing >what you want, and in fact relying on fgets() to be cancellable >is not portable. > > > >>In fact it means that any thread doing blocking stdio is uncancellable - >>the standard may not require it but many applications might expect it. >>Given that the functionality was there in 4.x and lost in 5.x I'd call >>it a regression. >> >> > >fgets() was not supposed to be cancellable in 4.x. If it >is, it is not by intention. Anything that calls _foo (single >underscore versions of system calls) is intentionally doing >it that way to avoid entering undesired cancellation points >(and blocking points in the case of libc_r). There are other >uses of _read() within libc and those may not want to be >cancellation points. > >The overall design of libc is that all internal uses of system >calls use the single underscore versions and let the threads >library override them if it wants. _foo() is not supposed to >be cancellable, and, in the case of libc_r, is also not supposed >to allow the process to block when hit (libc_r converts _read() >and _write() to poll(), then switches to another thread). I >don't know why fgets() ends up as a cancellation point in libc_r, >but it shouldn't be by design -- it is a bug. > > > From owner-freebsd-threads@FreeBSD.ORG Thu Oct 7 22:40:40 2004 Return-Path: Delivered-To: freebsd-threads@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EDA3916A4D1 for ; Thu, 7 Oct 2004 22:40:40 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1512B43D55 for ; Thu, 7 Oct 2004 22:40:40 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i97MeW0w098970 for ; Thu, 7 Oct 2004 22:40:32 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i97MeWLj098967; Thu, 7 Oct 2004 22:40:32 GMT (envelope-from gnats) Date: Thu, 7 Oct 2004 22:40:32 GMT Message-Id: <200410072240.i97MeWLj098967@freefall.freebsd.org> To: freebsd-threads@FreeBSD.org From: Mark Gooderum Subject: Re: threads/72429: threads blocked in stdio (fgets, etc) are not cancellable in 5.3 (works in 4.x) X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Mark Gooderum List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Oct 2004 22:40:41 -0000 The following reply was made to PR threads/72429; it has been noted by GNATS. From: Mark Gooderum To: Daniel Eischen Cc: freebsd-gnats-submit@freebsd.org, freebsd-threads@freebsd.org, archie@dellroad.org Subject: Re: threads/72429: threads blocked in stdio (fgets, etc) are not cancellable in 5.3 (works in 4.x) Date: Thu, 07 Oct 2004 17:36:44 -0500 This is a multi-part message in MIME format. --------------080409080603080600050704 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Uncle. Okay - you're right, sigh. It's not so much that we're using fgets() as many/most C based parsing libraries use stdio, bleh. As for why libc_r is cancellable... In 4.x _foo() sets the cancellation state and calls __foo() (for read, write, et.al), in 5.3 it's reversed. -- Mark >On Thu, 7 Oct 2004, Mark Gooderum wrote: > > > >>But this is a major change in behavior from FreeBSD 4 and also a >>difference from Linux. I'm not a Linux bigot at all but there is a >>recurring theme that XX threaded apps works on Linux but is unstable on >>FreeBSD and these sort of major behavior deltas contribute to the >>perception of FreeBSD threading as unstable by some. >> >> > >If you want to be portable, you should be using select() or >poll(). It's not like there is no portable way of doing >what you want, and in fact relying on fgets() to be cancellable >is not portable. > > > >>In fact it means that any thread doing blocking stdio is uncancellable - >>the standard may not require it but many applications might expect it. >>Given that the functionality was there in 4.x and lost in 5.x I'd call >>it a regression. >> >> > >fgets() was not supposed to be cancellable in 4.x. If it >is, it is not by intention. Anything that calls _foo (single >underscore versions of system calls) is intentionally doing >it that way to avoid entering undesired cancellation points >(and blocking points in the case of libc_r). There are other >uses of _read() within libc and those may not want to be >cancellation points. > >The overall design of libc is that all internal uses of system >calls use the single underscore versions and let the threads >library override them if it wants. _foo() is not supposed to >be cancellable, and, in the case of libc_r, is also not supposed >to allow the process to block when hit (libc_r converts _read() >and _write() to poll(), then switches to another thread). I >don't know why fgets() ends up as a cancellation point in libc_r, >but it shouldn't be by design -- it is a bug. > > > --------------080409080603080600050704 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit Uncle.  Okay - you're right, sigh.

It's not so much that we're using fgets() as many/most C based parsing libraries use stdio, bleh.

As for why libc_r is cancellable...

In 4.x  _foo() sets the cancellation state and calls __foo() (for read, write, et.al), in 5.3 it's reversed. 
--
Mark

On Thu, 7 Oct 2004, Mark Gooderum wrote:
 
   
But this is a major change in behavior from FreeBSD 4 and also a
 difference from Linux.  I'm not a Linux bigot at all but there is a
 recurring theme that XX threaded apps works on Linux but is unstable on
 FreeBSD and these sort of major behavior deltas contribute to the
 perception of FreeBSD threading as unstable by some.
     

 If you want to be portable, you should be using select() or
 poll().  It's not like there is no portable way of doing
 what you want, and in fact relying on fgets() to be cancellable
 is not portable.
 
   
In fact it means that any thread doing blocking stdio is uncancellable -
 the standard may not require it but many applications might expect it.
 Given that the functionality was there in 4.x and lost in 5.x I'd call
 it a regression.
     

 fgets() was not supposed to be cancellable in 4.x.  If it
 is, it is not by intention.  Anything that calls _foo (single
 underscore versions of system calls) is intentionally doing
 it that way to avoid entering undesired cancellation points
 (and blocking points in the case of libc_r).  There are other
 uses of _read() within libc and those may not want to be
 cancellation points.
 
 The overall design of libc is that all internal uses of system
 calls use the single underscore versions and let the threads
 library override them if it wants.  _foo() is not supposed to
 be cancellable, and, in the case of libc_r, is also not supposed
 to allow the process to block when hit (libc_r converts _read()
 and _write() to poll(), then switches to another thread).  I
 don't know why fgets() ends up as a cancellation point in libc_r,
 but it shouldn't be by design -- it is a bug.
 
   
--------------080409080603080600050704-- From owner-freebsd-threads@FreeBSD.ORG Thu Oct 7 23:44:48 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 F372F16A4CE; Thu, 7 Oct 2004 23:44:47 +0000 (GMT) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5D1D243D1D; Thu, 7 Oct 2004 23:44:47 +0000 (GMT) (envelope-from deischen@gdeb.com) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) i97Nijkq024645; Thu, 7 Oct 2004 19:44:45 -0400 (EDT) Date: Thu, 7 Oct 2004 19:44:45 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Mark Gooderum In-Reply-To: <4165C4FC.2010607@verniernetworks.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) cc: freebsd-gnats-submit@freebsd.org cc: archie@dellroad.org cc: freebsd-threads@freebsd.org Subject: Re: threads/72429: threads blocked in stdio (fgets, etc) are not cancellable in 5.3 (works in 4.x) X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Daniel Eischen List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Oct 2004 23:44:48 -0000 On Thu, 7 Oct 2004, Mark Gooderum wrote: > Uncle. Okay - you're right, sigh. > > It's not so much that we're using fgets() as many/most C based parsing > libraries use stdio, bleh. > > As for why libc_r is cancellable... > > In 4.x _foo() sets the cancellation state and calls __foo() (for read, > write, et.al), in 5.3 it's reversed. Hmm, that's not what it looks like for read. In 4.x, read() sets the cancellation state and calls _read(). It looks like fgets() ends up calling __sread() which calls _read(), so I'm not sure how cancellation is getting set. Only read() in libc_r sets the cancellation point, not _read(). I'm looking at revision 1.11.2.4 of uthread/uthread.c; are we looking at the same version? -- Dan Eischen From owner-freebsd-threads@FreeBSD.ORG Thu Oct 7 23:50:20 2004 Return-Path: Delivered-To: freebsd-threads@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E451716A4CE for ; Thu, 7 Oct 2004 23:50:20 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id D7C8F43D1D for ; Thu, 7 Oct 2004 23:50:20 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i97NoKhD006202 for ; Thu, 7 Oct 2004 23:50:20 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i97NoKaJ006201; Thu, 7 Oct 2004 23:50:20 GMT (envelope-from gnats) Date: Thu, 7 Oct 2004 23:50:20 GMT Message-Id: <200410072350.i97NoKaJ006201@freefall.freebsd.org> To: freebsd-threads@FreeBSD.org From: Daniel Eischen Subject: Re: threads/72429: threads blocked in stdio (fgets, etc) are not cancellable in 5.3 (works in 4.x) X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Daniel Eischen List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Oct 2004 23:50:21 -0000 The following reply was made to PR threads/72429; it has been noted by GNATS. From: Daniel Eischen To: Mark Gooderum Cc: freebsd-gnats-submit@freebsd.org, , Subject: Re: threads/72429: threads blocked in stdio (fgets, etc) are not cancellable in 5.3 (works in 4.x) Date: Thu, 7 Oct 2004 19:44:45 -0400 (EDT) On Thu, 7 Oct 2004, Mark Gooderum wrote: > Uncle. Okay - you're right, sigh. > > It's not so much that we're using fgets() as many/most C based parsing > libraries use stdio, bleh. > > As for why libc_r is cancellable... > > In 4.x _foo() sets the cancellation state and calls __foo() (for read, > write, et.al), in 5.3 it's reversed. Hmm, that's not what it looks like for read. In 4.x, read() sets the cancellation state and calls _read(). It looks like fgets() ends up calling __sread() which calls _read(), so I'm not sure how cancellation is getting set. Only read() in libc_r sets the cancellation point, not _read(). I'm looking at revision 1.11.2.4 of uthread/uthread.c; are we looking at the same version? -- Dan Eischen From owner-freebsd-threads@FreeBSD.ORG Thu Oct 7 23:52:35 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 163C316A4DC for ; Thu, 7 Oct 2004 23:52:35 +0000 (GMT) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id BB44A43D41 for ; Thu, 7 Oct 2004 23:52:34 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) i97NqYmU002655; Thu, 7 Oct 2004 19:52:34 -0400 (EDT) Date: Thu, 7 Oct 2004 19:52:34 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Pawel Worach In-Reply-To: <4165C285.9050909@telia.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) cc: freebsd-threads@freebsd.org Subject: Re: BIND9 and libpthread performance X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Daniel Eischen List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Oct 2004 23:52:35 -0000 On Fri, 8 Oct 2004, Pawel Worach wrote: > Hi, > > I did some simple benchmarking with libpthread vs. libc_r and BIND. > The numbers puzzle me. Are pthreads supposed to this much slower? > > Tests done using BIND9 with a authoritative root zone. The queryperf > tool from bind-9.3.0/contrib/queryperf was used to get the numbers. > Queries where done for ". SOA". (queryperf -s 127.0.0.1 -l 30) > > This is on -CURRENT from Oct 6th, WITNESS, INVARIANTS off and > libpthread built without _LOCK_DEBUG and _PTHREADS_INVARIANTS. > Hardware is a dual IBM x345 2.8ghz Xeon box with HTT on. SCHED_4BSD, > PREEMPTION and ADAPTIVE_GIANT are in the kernel config, malloc.conf > symlinked to 'aj'. So that's a true dual CPU system with HTT CPUs (the kernel sees 4 CPUs)? Turn HTT off, set kern.threads.virtual_cpu = 1, and try using process scope threads. Then set kern.threads.virtual_cpu = 2 and try again using process scope threads. Then try the same 2 tests with system scope threads. You can set LIBPTHREAD_SYSTEM_SCOPE in your environment to force system scope threads, and set LIBPTHREAD_PROCESS_SCOPE to force process scope threads (you needn't rebuild libpthread or your application). If they are both set, system scope wins out. -- Dan Eischen From owner-freebsd-threads@FreeBSD.ORG Fri Oct 8 01:09:44 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 1CED516A4CE; Fri, 8 Oct 2004 01:09:44 +0000 (GMT) Received: from av9-1-sn4.m-sp.skanova.net (av9-1-sn4.m-sp.skanova.net [81.228.10.108]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6A07343D2D; Fri, 8 Oct 2004 01:09:43 +0000 (GMT) (envelope-from pawel.worach@telia.com) Received: by av9-1-sn4.m-sp.skanova.net (Postfix, from userid 502) id 99E1438346; Fri, 8 Oct 2004 03:09:42 +0200 (CEST) Received: from smtp2-1-sn4.m-sp.skanova.net (smtp2-1-sn4.m-sp.skanova.net [81.228.10.183]) by av9-1-sn4.m-sp.skanova.net (Postfix) with ESMTP id 8814437EBD; Fri, 8 Oct 2004 03:09:42 +0200 (CEST) Received: from corona.sajd.net (h47n2fls31o265.telia.com [217.208.189.47]) by smtp2-1-sn4.m-sp.skanova.net (Postfix) with ESMTP id 70B2137E43; Fri, 8 Oct 2004 03:09:42 +0200 (CEST) Received: from [127.0.0.1] (sajd@localhost [127.0.0.1]) by corona.sajd.net (8.13.1/8.13.1) with ESMTP id i9819Zv0006726; Fri, 8 Oct 2004 03:09:36 +0200 (CEST) (envelope-from pawel.worach@telia.com) Message-ID: <4165E8CF.8090409@telia.com> Date: Fri, 08 Oct 2004 03:09:35 +0200 From: Pawel Worach User-Agent: Mozilla Thunderbird 0.7.3 (X11/20040815) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Daniel Eischen References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-threads@freebsd.org Subject: Re: BIND9 and libpthread performance 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: Fri, 08 Oct 2004 01:09:44 -0000 Daniel Eischen wrote: > So that's a true dual CPU system with HTT CPUs (the kernel sees > 4 CPUs)? Turn HTT off, set kern.threads.virtual_cpu = 1, and try > using process scope threads. Then set kern.threads.virtual_cpu = 2 > and try again using process scope threads. Then try the same 2 > tests with system scope threads. Yes, system has two physical cpus with HTT enabled, FreeBSD sees four. kern.smp.cpus: 4 hw.ncpu: 4 As I don't have access to the datacenter to turn off HTT in the BIOS now I set machdep.hlt_logical_cpus in loader.conf which should theoretically do the same thing right? > > You can set LIBPTHREAD_SYSTEM_SCOPE in your environment to force > system scope threads, and set LIBPTHREAD_PROCESS_SCOPE to force > process scope threads (you needn't rebuild libpthread or your > application). If they are both set, system scope wins out. > The first tests I did where with LIBPTHREAD_SYSTEM_SCOPE set. Here are new results for all the parameters above. * kern.threads.virtual_cpu=1, named -n 1 (named still sees four cpus and fires up four theads if I don't force it not to) x process-scope-1-cpu + system-scope-1-cpu +--------------------------------------------------------------------------+ |x xx x x + + + + +| | |_______AM______| |_____M__A_________| | +--------------------------------------------------------------------------+ N Min Max Median Avg Stddev x 5 9531.2955 10089.776 9895.4739 9876.4389 211.59661 + 5 10925.816 11449.187 11082.488 11168.616 244.15478 Difference at 95.0% confidence 1292.18 +/- 333.191 13.0834% +/- 3.37359% (Student's t, pooled s = 228.456) * kern.threads.virtual_cpu=2, named -n 2 x process-scope-2-cpu + system-scope-2-cpu +--------------------------------------------------------------------------+ |x x x xx ++ +++| | |__AM__| |_AM_|| +--------------------------------------------------------------------------+ N Min Max Median Avg Stddev x 5 8319.6891 8558.6617 8476.9996 8463.3126 96.296725 + 5 10159.815 10336.033 10284.944 10260.51 74.904761 Difference at 95.0% confidence 1797.2 +/- 125.815 21.2352% +/- 1.48659% (Student's t, pooled s = 86.2664) The two thread test results don't look quite right, I will turn off HTT in the BIOS and redo this in about 12 hours. HTT seems to suck, not using the logical cpus gives me about ~11k queries per second which is about 1k better than libc_r, woho! Thanks! Keep up the good threading work! -- Pawel From owner-freebsd-threads@FreeBSD.ORG Fri Oct 8 04:45:25 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 E5A1D16A4CE for ; Fri, 8 Oct 2004 04:45:25 +0000 (GMT) Received: from pimout3-ext.prodigy.net (pimout3-ext.prodigy.net [207.115.63.102]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7E94543D68 for ; Fri, 8 Oct 2004 04:45:25 +0000 (GMT) (envelope-from julian@elischer.org) Received: from elischer.org (adsl-67-124-50-20.dsl.snfc21.pacbell.net [67.124.50.20])i984jLSX218400; Fri, 8 Oct 2004 00:45:22 -0400 Message-ID: <41661B61.709@elischer.org> Date: Thu, 07 Oct 2004 21:45:21 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4b) Gecko/20030524 X-Accept-Language: en, hu MIME-Version: 1.0 To: Pawel Worach References: <4165C285.9050909@telia.com> In-Reply-To: <4165C285.9050909@telia.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-threads@freebsd.org Subject: Re: BIND9 and libpthread performance 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: Fri, 08 Oct 2004 04:45:26 -0000 Pawel Worach wrote: > Hi, > > I did some simple benchmarking with libpthread vs. libc_r and BIND. > The numbers puzzle me. Are pthreads supposed to this much slower? > > Tests done using BIND9 with a authoritative root zone. The queryperf > tool from bind-9.3.0/contrib/queryperf was used to get the numbers. > Queries where done for ". SOA". (queryperf -s 127.0.0.1 -l 30) > > This is on -CURRENT from Oct 6th, WITNESS, INVARIANTS off and > libpthread built without _LOCK_DEBUG and _PTHREADS_INVARIANTS. > Hardware is a dual IBM x345 2.8ghz Xeon box with HTT on. SCHED_4BSD, > PREEMPTION and ADAPTIVE_GIANT are in the kernel config, malloc.conf > symlinked to 'aj'. > > Results (queries per second according to queryperf): > x libpthread-system-scope > + libc_r > +--------------------------------------------------------------------------+ > > |x +++ > + +| > |A > |__M__A______| | > +--------------------------------------------------------------------------+ > > N Min Max Median Avg Stddev > x 5 2074.3131 2094.7966 2087.3796 2086.4217 7.579802 > + 5 8179.1707 9535.1741 8448.1802 8763.1869 619.70126 > Difference at 95.0% confidence > 6676.77 +/- 639.13 > 320.01% +/- 30.6328% > (Student's t, pooled s = 438.228) > > Any ideas why the difference is so big, is there anything else to tune? try libthr (use libmap.conf) and why are you using scope_system? > From owner-freebsd-threads@FreeBSD.ORG Fri Oct 8 09:58:31 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 09CA916A4CE for ; Fri, 8 Oct 2004 09:58:31 +0000 (GMT) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6DD5E43D31 for ; Fri, 8 Oct 2004 09:58:30 +0000 (GMT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.13.1/8.13.1) with ESMTP id i989v5Ig084962 for ; Fri, 8 Oct 2004 05:57:06 -0400 (EDT) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)i989v5Pn084959 for ; Fri, 8 Oct 2004 05:57:05 -0400 (EDT) (envelope-from robert@fledge.watson.org) Date: Fri, 8 Oct 2004 05:57:05 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: threads@FreeBSD.org Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: setrunqueue: corrupt kq_runq, td=0xc2745c80 (Sept 17ish kernel) 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: Fri, 08 Oct 2004 09:58:31 -0000 This panic occurred while I was doing a make depend over NFS. mysqld was presumably largely idle, but perhaps woke up to do some processing on a timer. This kernel is a GENERIC kernel from around September 17; I was in the process of building an updated kernel when it panicked, so it could be that this is fixed already? db> show msgbuf msgbufp = 0xc101bfe4 magic = 63062, size = 32740, r= 9434, w = 9540, ptr = 0xc1014000, cksum= 743102 setrunqueue(): corrupt kq_runq, td= 0xc2745c80 panic: deadlock in setrunqueue cpuid = 0 KDB: enter: panic Copyright (c) 1992-2004 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 ... db> show pcpu cpuid = 0 curthread = 0xc67944b0: pid 565 "mysqld" curpcb = 0xef63ada0 fpcurthread = none idlethread = 0xc2260960: pid 14 "idle: cpu0" APIC ID = 0 currentldt = 0x30 spin locks held: db> trace kdb_enter(c07f0956) at kdb_enter+0x2b panic(c07f1f58,c07f1f30,c2745c80,0,c2745c80) at panic+0x127 setrunqueue(c2745c80,0) at setrunqueue+0x11c turnstile_unpend(c29494c0,c296a06c,39f,ef63ac68,c05f79e8) at turnstile_unpend+0x274 _mtx_unlock_sleep(c296a06c,0,c07ee778,39f) at _mtx_unlock_sleep+0x6c _mtx_unlock_flags(c296a06c,0,c07ee778,39f) at _mtx_unlock_flags+0x98 thread_link_mboxes(c22d7a10,c2b2e030,0,0,c22d7a10) at thread_link_mboxes+0xcf thread_userret(c67944b0,ef63ad48) at thread_userret+0x374 userret(c67944b0,ef63ad48,b7,1,b7) at userret+0x57 syscall(830002f,2f,a89002f,8304a00,0) at syscall+0x2d9 Xint0x80_syscall() at Xint0x80_syscall+0x1f --- syscall (0, FreeBSD ELF32, nosys), eip = 0x2833ad6f, esp = 0xa893f88, ebp = 0xa893fc4 --- Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Principal Research Scientist, McAfee Research