From owner-freebsd-threads@FreeBSD.ORG Mon Jan 31 11:02:03 2005 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 6513B16A4F4 for ; Mon, 31 Jan 2005 11:02:03 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4321743D1D for ; Mon, 31 Jan 2005 11:02:03 +0000 (GMT) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (peter@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id j0VB23Vs048210 for ; Mon, 31 Jan 2005 11:02:03 GMT (envelope-from owner-bugmaster@freebsd.org) Received: (from peter@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id j0VB22FX048204 for freebsd-threads@freebsd.org; Mon, 31 Jan 2005 11:02:02 GMT (envelope-from owner-bugmaster@freebsd.org) Date: Mon, 31 Jan 2005 11:02:02 GMT Message-Id: <200501311102.j0VB22FX048204@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, 31 Jan 2005 11:02:03 -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 o [2005/01/26] threads/76690threads fork hang in child for (-lc_r & -lthr) 2 problems 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 o [2004/10/05] threads/72353threads Assertion fails in /usr/src/lib/libpthrea o [2004/10/07] threads/72429threads threads blocked in stdio (fgets, etc) are o [2004/10/21] threads/72953threads fork() unblocks blocked signals w/o PTHRE o [2004/11/25] threads/74370threads Cannot get lwp 0 registers in gdb o [2004/12/08] threads/74856threads dig/host broken w/ libthr o [2004/12/19] threads/75273threads FBSD 5.3 libpthread (KSE) bug o [2004/12/21] threads/75374threads pthread_kill() ignores SA_SIGINFO flag o [2005/01/04] threads/75795threads applications linked with -lc_r can't clos o [2005/01/26] threads/76694threads fork cause hang in dup()/close() function 25 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 o [2004/11/21] threads/74180threads KSE problem. Applications those riched ma o [2005/01/20] threads/76513threads libpthread is not working o [2005/01/29] threads/76821threads Add access to gdb unique thread id 11 problems total. From owner-freebsd-threads@FreeBSD.ORG Mon Jan 31 21:29:37 2005 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 6CF4916A4CE for ; Mon, 31 Jan 2005 21:29:37 +0000 (GMT) Received: from mailgate-a.mysql.com (mailgate1.mysql.com [213.115.162.47]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5CA3143D64 for ; Mon, 31 Jan 2005 21:29:36 +0000 (GMT) (envelope-from tomas@mysql.com) Received: from localhost (localhost.localdomain [127.0.0.1]) by mailgate-a.mysql.com (8.13.2/8.13.1) with ESMTP id j0VLTDfP013043 for ; Mon, 31 Jan 2005 22:29:13 +0100 Received: from mail.mysql.com ([10.222.1.99]) by localhost (mailgate-a [10.222.1.98]) (amavisd-new, port 10026) with LMTP id 12612-04 for ; Mon, 31 Jan 2005 22:29:13 +0100 (CET) Received: from mysql.com (c-ab59e255.525-1-64736c12.cust.bredbandsbolaget.se [85.226.89.171]) (authenticated bits=0) by mail.mysql.com (8.12.10/8.12.10) with ESMTP id j0VLTSwZ002550 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 31 Jan 2005 22:29:29 +0100 Message-ID: <41FEB137.7040402@mysql.com> Date: Mon, 31 Jan 2005 23:29:11 +0100 From: Tomas Ulin User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040520 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-threads@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at mailgate.mysql.com Subject: wrong exit code with linux threads X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jan 2005 21:29:37 -0000 Hi, the program below (tmp.c) gives strange output regarding the child exit status when using linux threads on freebsd 4.7. With lib pthread- correct: Exit value 123 Exit value 123 With llthread - error: Exit value 123 Exit value 0 Any ideas? Thanks, Tomas Ulin #include #include #include #include #include /* ok - gcc -o tmp tmp.c -L/usr/local/lib -pthread ; ./tmp not ok - gcc -o tmp tmp.c -L/usr/local/lib -llthread ; ./tmp */ void wait_and_display(pid_t pid) { int status; while ( pid != waitpid(pid, &status, 0) ); printf("Exit value %d\n", WEXITSTATUS(status)); } void *athread(void *data) { pthread_exit(0); } int main(void) { pid_t pid; /* Case 1: Explicit call to exit */ if ((pid = fork()) == 0) /* child */ exit(123); /* parent */ wait_and_display(pid); /* Case 2: Start thread and Explicit call to exit */ if ((pid = fork()) == 0) /* child */ { pthread_t thread; pthread_attr_t thread_attr; int result; pthread_attr_init(&thread_attr); result = pthread_create(&thread, &thread_attr, athread, 0); sleep(2); exit(123); } /* parent */ wait_and_display(pid); exit(0); } From owner-freebsd-threads@FreeBSD.ORG Tue Feb 1 04:00:41 2005 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 6AB4B16A4DF for ; Tue, 1 Feb 2005 04:00:41 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 477D743D58 for ; Tue, 1 Feb 2005 04:00:41 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id j1140f6j069464 for ; Tue, 1 Feb 2005 04:00:41 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id j1140fhO069376; Tue, 1 Feb 2005 04:00:41 GMT (envelope-from gnats) Resent-Date: Tue, 1 Feb 2005 04:00:41 GMT Resent-Message-Id: <200502010400.j1140fhO069376@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, "Tom McLaughlin" Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5FFA416A4CF for ; Tue, 1 Feb 2005 03:54:58 +0000 (GMT) Received: from straycat.dhs.org (h0050da134090.ne.client2.attbi.com [24.60.174.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6A79B43D31 for ; Tue, 1 Feb 2005 03:54:54 +0000 (GMT) (envelope-from tmclaugh@sdf.lonestar.org) Received: from compass.straycat.dhs.org (compass.straycat.dhs.org [192.168.1.48]) by straycat.dhs.org (8.13.0/8.13.0) with ESMTP id j113tR0H020652 for ; Mon, 31 Jan 2005 22:55:27 -0500 (EST) Message-Id: <1107230114.0@compass.straycat.dhs.org> Date: Mon, 31 Jan 2005 22:55:14 -0500 From: "Tom McLaughlin" To: "FreeBSD gnats submit" X-Send-Pr-Version: gtk-send-pr 0.4.3 Subject: threads/76938: include/unistd.h: ttyname_r prototype missing 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, 01 Feb 2005 04:00:41 -0000 >Number: 76938 >Category: threads >Synopsis: include/unistd.h: ttyname_r prototype missing >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-threads >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Feb 01 04:00:40 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Tom McLaughlin >Release: FreeBSD 5.3-RELEASE-p5 i386 >Organization: >Environment: System: FreeBSD 5.3-RELEASE-p5 #0: Sun Jan 30 23:37:04 EST 2005 root@compass.straycat.dhs.org:/usr/obj/usr/src/sys/COMPASS >Description: While trying to port Mono 1.1.3 recently I ran into compilation failures due to ttyname_r missing. After some research I found the link below which explains that FreeBSD provides ttyname_r but lacks the prototype for it in unistd.h. Ref: http://lists.gnupg.org/pipermail/gnupg-devel/2004-December/021554.html >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-threads@FreeBSD.ORG Tue Feb 1 15:26:41 2005 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 0588D16A4CE for ; Tue, 1 Feb 2005 15:26:41 +0000 (GMT) Received: from mail22.sea5.speakeasy.net (mail22.sea5.speakeasy.net [69.17.117.24]) by mx1.FreeBSD.org (Postfix) with ESMTP id C5B7843D1D for ; Tue, 1 Feb 2005 15:26:40 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: (qmail 586 invoked from network); 1 Feb 2005 15:26:40 -0000 Received: from server.baldwin.cx ([216.27.160.63]) (envelope-sender )AES256-SHA encrypted SMTP for ; 1 Feb 2005 15:26:40 -0000 Received: from [10.50.40.202] (gw1.twc.weather.com [216.133.140.1]) (authenticated bits=0) by server.baldwin.cx (8.13.1/8.13.1) with ESMTP id j11FQP90038517 for ; Tue, 1 Feb 2005 10:26:36 -0500 (EST) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: threads@FreeBSD.org Date: Tue, 1 Feb 2005 10:27:31 -0500 User-Agent: KMail/1.6.2 MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <200502011027.31991.jhb@FreeBSD.org> X-Spam-Status: No, score=-102.8 required=4.2 tests=ALL_TRUSTED, USER_IN_WHITELIST autolearn=failed version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on server.baldwin.cx Subject: Backport of pthread fixes from 5.x to 6.0. 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, 01 Feb 2005 15:26:41 -0000 I'd like to backport most of the thread fixes for libpthread from 6.0 to RELENG_5 before 5.4. I've been testing this patch locally and just wanted to make sure backporting it was ok with the folks on this list. Patch is at http://www.FreeBSD.org/~jhb/patches/pthread_5.patch -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-threads@FreeBSD.ORG Tue Feb 1 16:20:38 2005 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 E747C16A52B; Tue, 1 Feb 2005 16:20:37 +0000 (GMT) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 516CB43D72; Tue, 1 Feb 2005 16:20:18 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) j11GKGFw019917; Tue, 1 Feb 2005 11:20:16 -0500 (EST) Date: Tue, 1 Feb 2005 11:20:16 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: John Baldwin In-Reply-To: <200502011027.31991.jhb@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: threads@freebsd.org Subject: Re: Backport of pthread fixes from 5.x to 6.0. 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, 01 Feb 2005 16:20:39 -0000 On Tue, 1 Feb 2005, John Baldwin wrote: > I'd like to backport most of the thread fixes for libpthread from 6.0 to > RELENG_5 before 5.4. I've been testing this patch locally and just wanted to > make sure backporting it was ok with the folks on this list. Patch is at > http://www.FreeBSD.org/~jhb/patches/pthread_5.patch Yes, please :-) This was one of the things I had wanted to do but hadn't got around to yet. -- DE From owner-freebsd-threads@FreeBSD.ORG Tue Feb 1 17:40:23 2005 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 711C316A4DB; Tue, 1 Feb 2005 17:40:23 +0000 (GMT) Received: from silver.he.iki.fi (helenius.fi [193.64.42.241]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0BC9643D31; Tue, 1 Feb 2005 17:40:05 +0000 (GMT) (envelope-from pete@he.iki.fi) Received: from [193.64.42.134] (h86.vuokselantie10.fi [193.64.42.134]) by silver.he.iki.fi (8.13.1/8.11.4) with ESMTP id j11He20X099694; Tue, 1 Feb 2005 19:40:03 +0200 (EET) (envelope-from pete@he.iki.fi) Message-ID: <41FFBEF3.9010000@he.iki.fi> Date: Tue, 01 Feb 2005 19:40:03 +0200 From: Petri Helenius User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: John Baldwin References: <200502011027.31991.jhb@FreeBSD.org> In-Reply-To: <200502011027.31991.jhb@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: threads@freebsd.org Subject: Re: Backport of pthread fixes from 5.x to 6.0. 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, 01 Feb 2005 17:40:23 -0000 John Baldwin wrote: >I'd like to backport most of the thread fixes for libpthread from 6.0 to >RELENG_5 before 5.4. I've been testing this patch locally and just wanted to >make sure backporting it was ok with the folks on this list. Patch is at >http://www.FreeBSD.org/~jhb/patches/pthread_5.patch > > > I browsed trough the patch and couldn't locate the new mutex operations in there. Are they somewhere in the pipeline and could you combine them into your patch? Pete From owner-freebsd-threads@FreeBSD.ORG Tue Feb 1 17:40:30 2005 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 25F9016A4D0 for ; Tue, 1 Feb 2005 17:40:30 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1105D43D3F for ; Tue, 1 Feb 2005 17:40:30 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id j11HeTt2099607 for ; Tue, 1 Feb 2005 17:40:29 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id j11HeTcr099606; Tue, 1 Feb 2005 17:40:29 GMT (envelope-from gnats) Date: Tue, 1 Feb 2005 17:40:29 GMT Message-Id: <200502011740.j11HeTcr099606@freefall.freebsd.org> To: freebsd-threads@FreeBSD.org From: Craig Rodrigues Subject: Re: threads/76938: include/unistd.h: ttyname_r prototype missing X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Craig Rodrigues List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Feb 2005 17:40:30 -0000 The following reply was made to PR threads/76938; it has been noted by GNATS. From: Craig Rodrigues To: Tom McLaughlin Cc: FreeBSD gnats submit Subject: Re: threads/76938: include/unistd.h: ttyname_r prototype missing Date: Tue, 1 Feb 2005 12:37:24 -0500 Hi, One slight problem with adding the prototype for ttyname_r() to unistd.h...the implementation of ttyname_r() in FreeBSD is not POSIX-compliant. According to: http://www.opengroup.org/onlinepubs/009695399/functions/ttyname.html the prototype should be: int ttyname_r(int fildes, char *name, size_t namesize); In src/lib/libc/gen/ttyname.c, we have: char *ttyname_r(int fd, char *buf, size_t len); I don't think it would be a big deal to fix this. It might be useful to reassign this PR to standards@. -- Craig Rodrigues rodrigc@crodrigues.org From owner-freebsd-threads@FreeBSD.ORG Tue Feb 1 19:28:38 2005 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 4CA4816A4CE; Tue, 1 Feb 2005 19:28:38 +0000 (GMT) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id E2B9343D5E; Tue, 1 Feb 2005 19:28:37 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) j11JSZkT006825; Tue, 1 Feb 2005 14:28:35 -0500 (EST) Date: Tue, 1 Feb 2005 14:28:29 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Petri Helenius In-Reply-To: <41FFBEF3.9010000@he.iki.fi> 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: threads@freebsd.org cc: John Baldwin Subject: Re: Backport of pthread fixes from 5.x to 6.0. 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, 01 Feb 2005 19:28:38 -0000 On Tue, 1 Feb 2005, Petri Helenius wrote: > John Baldwin wrote: > > >I'd like to backport most of the thread fixes for libpthread from 6.0 to > >RELENG_5 before 5.4. I've been testing this patch locally and just wanted to > >make sure backporting it was ok with the folks on this list. Patch is at > >http://www.FreeBSD.org/~jhb/patches/pthread_5.patch > > > > > > > I browsed trough the patch and couldn't locate the new mutex operations > in there. Are they somewhere in the pipeline and could you combine them > into your patch? They aren't (in userland) even in -current; they exist in perforce in a forked branch of libpthread. You'll have to wait for that because it doesn't yet support all of the stuff that libpthread does. -- DE From owner-freebsd-threads@FreeBSD.ORG Tue Feb 1 20:13:22 2005 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 011F316A4CE; Tue, 1 Feb 2005 20:13:22 +0000 (GMT) Received: from silver.he.iki.fi (helenius.fi [193.64.42.241]) by mx1.FreeBSD.org (Postfix) with ESMTP id CD43A43D5D; Tue, 1 Feb 2005 20:13:20 +0000 (GMT) (envelope-from pete@he.iki.fi) Received: from [193.64.42.134] (h86.vuokselantie10.fi [193.64.42.134]) by silver.he.iki.fi (8.13.1/8.11.4) with ESMTP id j11KDJJp047050; Tue, 1 Feb 2005 22:13:19 +0200 (EET) (envelope-from pete@he.iki.fi) Message-ID: <41FFE2E0.3050308@he.iki.fi> Date: Tue, 01 Feb 2005 22:13:20 +0200 From: Petri Helenius User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) 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: threads@freebsd.org cc: John Baldwin Subject: Re: Backport of pthread fixes from 5.x to 6.0. 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, 01 Feb 2005 20:13:22 -0000 Daniel Eischen wrote: >On Tue, 1 Feb 2005, Petri Helenius wrote: > > > >They aren't (in userland) even in -current; they exist in perforce >in a forked branch of libpthread. You'll have to wait for that >because it doesn't yet support all of the stuff that libpthread does. > > > Is there a lot of other functionality being baggaged in the same branch / patchset or is the mutex pptimization work mostly separate? Pete From owner-freebsd-threads@FreeBSD.ORG Tue Feb 1 20:16:18 2005 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 3927016A4CE; Tue, 1 Feb 2005 20:16:18 +0000 (GMT) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id BFDCD43D2D; Tue, 1 Feb 2005 20:16:17 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) j11KGFg8005351; Tue, 1 Feb 2005 15:16:15 -0500 (EST) Date: Tue, 1 Feb 2005 15:16:06 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Petri Helenius In-Reply-To: <41FFE2E0.3050308@he.iki.fi> 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: threads@freebsd.org cc: John Baldwin Subject: Re: Backport of pthread fixes from 5.x to 6.0. 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, 01 Feb 2005 20:16:18 -0000 On Tue, 1 Feb 2005, Petri Helenius wrote: > Daniel Eischen wrote: > > >On Tue, 1 Feb 2005, Petri Helenius wrote: > > > > > > > >They aren't (in userland) even in -current; they exist in perforce > >in a forked branch of libpthread. You'll have to wait for that > >because it doesn't yet support all of the stuff that libpthread does. > > > > > > > Is there a lot of other functionality being baggaged in the same branch > / patchset or is the mutex pptimization work mostly separate? Yes, no. -- Dan From owner-freebsd-threads@FreeBSD.ORG Wed Feb 2 05:30:50 2005 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 7B95316A4CE; Wed, 2 Feb 2005 05:30:50 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5C38E43D3F; Wed, 2 Feb 2005 05:30:50 +0000 (GMT) (envelope-from davidxu@t2t2.com) Received: from t2t2.com (davidxu@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id j125Uk2n084529; Wed, 2 Feb 2005 05:30:48 GMT (envelope-from davidxu@t2t2.com) Message-ID: <42006745.3070904@t2t2.com> Date: Wed, 02 Feb 2005 13:38:13 +0800 From: David Xu User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5b) Gecko/20030723 Thunderbird/0.1 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: threads@freebsd.org cc: John Baldwin Subject: Re: Backport of pthread fixes from 5.x to 6.0. 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, 02 Feb 2005 05:30:50 -0000 Daniel Eischen wrote: > On Tue, 1 Feb 2005, Petri Helenius wrote: > > >>John Baldwin wrote: >> >> >>>I'd like to backport most of the thread fixes for libpthread from 6.0 to >>>RELENG_5 before 5.4. I've been testing this patch locally and just wanted to >>>make sure backporting it was ok with the folks on this list. Patch is at >>>http://www.FreeBSD.org/~jhb/patches/pthread_5.patch >>> >>> >>> >> >>I browsed trough the patch and couldn't locate the new mutex operations >>in there. Are they somewhere in the pipeline and could you combine them >>into your patch? > > > They aren't (in userland) even in -current; they exist in perforce > in a forked branch of libpthread. You'll have to wait for that > because it doesn't yet support all of the stuff that libpthread does. > I am slowing working on this, but if anyone has interest to work on this, let me know, mostly I want to support PRIORITY pthread mutex in umtx code and other realtime options. David From owner-freebsd-threads@FreeBSD.ORG Wed Feb 2 19:57:28 2005 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 862E816A4CE for ; Wed, 2 Feb 2005 19:57:28 +0000 (GMT) Received: from silver.he.iki.fi (helenius.fi [193.64.42.241]) by mx1.FreeBSD.org (Postfix) with ESMTP id 51E4743D1F for ; Wed, 2 Feb 2005 19:57:27 +0000 (GMT) (envelope-from pete@he.iki.fi) Received: from [193.64.42.134] (h86.vuokselantie10.fi [193.64.42.134]) by silver.he.iki.fi (8.13.1/8.11.4) with ESMTP id j12JvOrJ078785 for ; Wed, 2 Feb 2005 21:57:25 +0200 (EET) (envelope-from pete@he.iki.fi) Message-ID: <420130A6.5080804@he.iki.fi> Date: Wed, 02 Feb 2005 21:57:26 +0200 From: Petri Helenius User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: threads@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: pthread profiling and malloc 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, 02 Feb 2005 19:57:28 -0000 Are there known problems with using libpthread along with profiling with malloc from multiple threads? Pete From owner-freebsd-threads@FreeBSD.ORG Thu Feb 3 21:43:29 2005 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 D176816A4CE for ; Thu, 3 Feb 2005 21:43:29 +0000 (GMT) Received: from mail28.sea5.speakeasy.net (mail28.sea5.speakeasy.net [69.17.117.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id 75A8F43D48 for ; Thu, 3 Feb 2005 21:43:27 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: (qmail 517 invoked from network); 3 Feb 2005 21:43:27 -0000 Received: from server.baldwin.cx ([216.27.160.63]) (envelope-sender )AES256-SHA encrypted SMTP for ; 3 Feb 2005 21:43:26 -0000 Received: from [10.50.40.202] (gw1.twc.weather.com [216.133.140.1]) (authenticated bits=0) by server.baldwin.cx (8.13.1/8.13.1) with ESMTP id j13LhJGu056975; Thu, 3 Feb 2005 16:43:20 -0500 (EST) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: Daniel Eischen Date: Thu, 3 Feb 2005 16:44:19 -0500 User-Agent: KMail/1.6.2 References: In-Reply-To: MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200502031644.19695.jhb@FreeBSD.org> X-Spam-Status: No, score=-102.8 required=4.2 tests=ALL_TRUSTED, USER_IN_WHITELIST autolearn=failed version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on server.baldwin.cx cc: threads@FreeBSD.org Subject: Re: Backport of pthread fixes from 5.x to 6.0. 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, 03 Feb 2005 21:43:29 -0000 On Tuesday 01 February 2005 11:20 am, Daniel Eischen wrote: > On Tue, 1 Feb 2005, John Baldwin wrote: > > I'd like to backport most of the thread fixes for libpthread from 6.0 to > > RELENG_5 before 5.4. I've been testing this patch locally and just > > wanted to make sure backporting it was ok with the folks on this list. > > Patch is at http://www.FreeBSD.org/~jhb/patches/pthread_5.patch > > Yes, please :-) This was one of the things I had wanted to do but hadn't > got around to yet. I have a question about the ABI changes (granted, to internal symbols) that break www/linuxpluginwrapper. Has the port been updated so that it works now? If not, do I need to include the patch you mentioned as a workaround for this in the commit log when I MFC to RELENG_5? -- 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 Feb 3 22:06:58 2005 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 7910A16A4CE; Thu, 3 Feb 2005 22:06:58 +0000 (GMT) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id E6E5743D2D; Thu, 3 Feb 2005 22:06:57 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) j13M6u0w002435; Thu, 3 Feb 2005 17:06:56 -0500 (EST) Date: Thu, 3 Feb 2005 17:06:56 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: John Baldwin In-Reply-To: <200502031644.19695.jhb@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: threads@freebsd.org Subject: Re: Backport of pthread fixes from 5.x to 6.0. 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, 03 Feb 2005 22:06:58 -0000 On Thu, 3 Feb 2005, John Baldwin wrote: > On Tuesday 01 February 2005 11:20 am, Daniel Eischen wrote: > > On Tue, 1 Feb 2005, John Baldwin wrote: > > > I'd like to backport most of the thread fixes for libpthread from 6.0 to > > > RELENG_5 before 5.4. I've been testing this patch locally and just > > > wanted to make sure backporting it was ok with the folks on this list. > > > Patch is at http://www.FreeBSD.org/~jhb/patches/pthread_5.patch > > > > Yes, please :-) This was one of the things I had wanted to do but hadn't > > got around to yet. > > I have a question about the ABI changes (granted, to internal symbols) that > break www/linuxpluginwrapper. Has the port been updated so that it works > now? If not, do I need to include the patch you mentioned as a workaround > for this in the commit log when I MFC to RELENG_5? The port has been updated, so it should work just fine. -- DE From owner-freebsd-threads@FreeBSD.ORG Fri Feb 4 04:08:46 2005 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 9537E16A4CE for ; Fri, 4 Feb 2005 04:08:46 +0000 (GMT) Received: from pil.idi.ntnu.no (pil.idi.ntnu.no [129.241.107.93]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6878843D31 for ; Fri, 4 Feb 2005 04:08:45 +0000 (GMT) (envelope-from Tor.Egge@cvsup.no.freebsd.org) Received: from cvsup.no.freebsd.org (c2h5oh.idi.ntnu.no [129.241.103.69]) by pil.idi.ntnu.no (8.13.1/8.13.1) with ESMTP id j1448eVc016089 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 4 Feb 2005 05:08:40 +0100 (MET) Received: from localhost (localhost [127.0.0.1]) by cvsup.no.freebsd.org (8.13.1/8.13.1) with ESMTP id j1448eAP074368; Fri, 4 Feb 2005 04:08:40 GMT (envelope-from Tor.Egge@cvsup.no.freebsd.org) Date: Fri, 04 Feb 2005 04:08:39 +0000 (UTC) Message-Id: <20050204.040839.71152438.Tor.Egge@cvsup.no.freebsd.org> To: tomas@mysql.com From: Tor Egge In-Reply-To: <41FEB137.7040402@mysql.com> References: <41FEB137.7040402@mysql.com> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Scanned-By: mimedefang.idi.ntnu.no, using FSAV X-SMTP-From: Sender=, Relay/Client=c2h5oh.idi.ntnu.no [129.241.103.69], EHLO=cvsup.no.freebsd.org X-Scanned-By: MIMEDefang 2.48 on 129.241.107.38 X-Scanned-By: mimedefang.idi.ntnu.no, using MIMEDefang 2.48 with local filter 16.42-idi X-Filter-Time: 2 seconds cc: freebsd-threads@freebsd.org Subject: Re: wrong exit code with linux 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: Fri, 04 Feb 2005 04:08:46 -0000 > > Hi, > > the program below (tmp.c) gives strange output regarding the child exit > status when using linux threads on freebsd 4.7. > > With lib pthread- correct: > Exit value 123 > Exit value 123 > > With llthread - error: > Exit value 123 > Exit value 0 > > Any ideas? exit handling is known to be broken in the linuxthreads port, e.g. if one thread calls exit while other threads are still running then atexit handlers registered after the one registered by pthread_initialize() are called, and data structures might be removed while still being used by other threads. atexit handlers registered before the one registered by pthread_initialize() might not be called at all, since if other threads were killed while holding mutexes then the program would just hang. The exit code is not available for functions registered with atexit(), so terminating early with the exit code passed to exit is not easily done. Additionally, the command "gcc -o tmp tmp.c -L/usr/local/lib -llthread" is wrong unless you've compiled the linuxthread port with support for emulating the ABI for native threads (LINUXTHREADS_WRAP_API=yes). You need to specify where to find the corresponding header files, i.e. "-I/usr/local/include/pthread/linuxthreads" has to be added to the command. If you compile the linuxthreads port with LINUXTHREADS_DETECT_UNSAFE_EXIT=yes then your sample program seems to exit with the correct exit code. But that has other side effects, e.g. when it was implicit in version 2.2.3_9 of the linuxthreads port, people reported that /usr/local/bin/mysql_install_db checked the exit code of mysqld and aborted. - Tor Egge