From owner-freebsd-threads@FreeBSD.ORG Sun Dec 19 17:30:42 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 3AB8716A4F5 for ; Sun, 19 Dec 2004 17:30:42 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id AB53343D5D for ; Sun, 19 Dec 2004 17:30:26 +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 iBJHUQc5093341 for ; Sun, 19 Dec 2004 17:30:26 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id iBJHUQSC093338; Sun, 19 Dec 2004 17:30:26 GMT (envelope-from gnats) Resent-Date: Sun, 19 Dec 2004 17:30:26 GMT Resent-Message-Id: <200412191730.iBJHUQSC093338@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, "Enoch W." Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 85A7816A4CE for ; Sun, 19 Dec 2004 17:20:54 +0000 (GMT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5F2AB43D41 for ; Sun, 19 Dec 2004 17:20:54 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id iBJHKs1e081820 for ; Sun, 19 Dec 2004 17:20:54 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id iBJHKs0R081818; Sun, 19 Dec 2004 17:20:54 GMT (envelope-from nobody) Message-Id: <200412191720.iBJHKs0R081818@www.freebsd.org> Date: Sun, 19 Dec 2004 17:20:54 GMT From: "Enoch W." To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Subject: threads/75273: FBSD 5.3 libpthread (KSE) bug 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, 19 Dec 2004 17:30:42 -0000 >Number: 75273 >Category: threads >Synopsis: FBSD 5.3 libpthread (KSE) bug >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-threads >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Dec 19 17:30:26 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Enoch W. >Release: FreeBSD 5.3-STABLE >Organization: >Environment: __FreeBSD_version 503101 i386 >Description: sigsuspend() bug Thread aborts at /usr/src/lib/libpthread/thread/thr_sigsuspend.c line 77 with "oldsigmask is not cleared" when the main thread tries to pthread_cancel() it. FreeBSD 4.x (libc_r) does not have this problem. >How-To-Repeat: >Fix: The easy solution :-) remove: THR_ASSERT(curthread->oldsigmask == NULL, "oldsigmask is not cleared"); >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-threads@FreeBSD.ORG Sun Dec 19 18:00:48 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 8DA2B16A4CE for ; Sun, 19 Dec 2004 18:00:48 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 77B8E43D2D for ; Sun, 19 Dec 2004 18:00:48 +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 iBJI0meD095138 for ; Sun, 19 Dec 2004 18:00:48 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id iBJI0mbd095137; Sun, 19 Dec 2004 18:00:48 GMT (envelope-from gnats) Date: Sun, 19 Dec 2004 18:00:48 GMT Message-Id: <200412191800.iBJI0mbd095137@freefall.freebsd.org> To: freebsd-threads@FreeBSD.org From: Daniel Eischen Subject: Re: threads/75273: FBSD 5.3 libpthread (KSE) bug 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: Sun, 19 Dec 2004 18:00:48 -0000 The following reply was made to PR threads/75273; it has been noted by GNATS. From: Daniel Eischen To: "Enoch W." Cc: freebsd-gnats-submit@freebsd.org Subject: Re: threads/75273: FBSD 5.3 libpthread (KSE) bug Date: Sun, 19 Dec 2004 12:54:54 -0500 (EST) On Sun, 19 Dec 2004, Enoch W. wrote: > >Description: > sigsuspend() bug > > Thread aborts at /usr/src/lib/libpthread/thread/thr_sigsuspend.c line 77 with "oldsigmask is not cleared" when the main thread tries to pthread_cancel() it. > > FreeBSD 4.x (libc_r) does not have this problem. > > >How-To-Repeat: > > >Fix: > The easy solution :-) remove: > THR_ASSERT(curthread->oldsigmask == NULL, "oldsigmask is not cleared"); Sample program to demonstrate the problem, please? This could be fixed in -current, but since I don't know how to repeat the problem, I can't test it. From owner-freebsd-threads@FreeBSD.ORG Mon Dec 20 11:02:17 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 71FAB16A4D2 for ; Mon, 20 Dec 2004 11:02:17 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4042B43D2D for ; Mon, 20 Dec 2004 11:02:17 +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 iBKB2HRm047181 for ; Mon, 20 Dec 2004 11:02:17 GMT (envelope-from owner-bugmaster@freebsd.org) Received: (from peter@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id iBKB2GE8047175 for freebsd-threads@freebsd.org; Mon, 20 Dec 2004 11:02:16 GMT (envelope-from owner-bugmaster@freebsd.org) Date: Mon, 20 Dec 2004 11:02:16 GMT Message-Id: <200412201102.iBKB2GE8047175@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, 20 Dec 2004 11:02:17 -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 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 22 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 9 problems total. From owner-freebsd-threads@FreeBSD.ORG Tue Dec 21 22: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 F334916A4D0 for ; Tue, 21 Dec 2004 22:20:17 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id B51C243D41 for ; Tue, 21 Dec 2004 22:20:17 +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 iBLMKH1d025058 for ; Tue, 21 Dec 2004 22:20:17 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id iBLMKHEr025057; Tue, 21 Dec 2004 22:20:17 GMT (envelope-from gnats) Resent-Date: Tue, 21 Dec 2004 22:20:17 GMT Resent-Message-Id: <200412212220.iBLMKHEr025057@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, Archie Cobbs Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 61AAE16A4CE for ; Tue, 21 Dec 2004 22:18:27 +0000 (GMT) Received: from beast.freebsd.org (beast.freebsd.org [216.136.204.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4992143D2D for ; Tue, 21 Dec 2004 22:18:27 +0000 (GMT) (envelope-from archie@FreeBSD.org) Received: from beast.freebsd.org (localhost [127.0.0.1]) by beast.freebsd.org (8.13.1/8.13.1) with ESMTP id iBLMIRfq061758 for ; Tue, 21 Dec 2004 22:18:27 GMT (envelope-from archie@beast.freebsd.org) Received: (from archie@localhost) by beast.freebsd.org (8.13.1/8.13.1/Submit) id iBLMIRtD061757; Tue, 21 Dec 2004 22:18:27 GMT (envelope-from archie) Message-Id: <200412212218.iBLMIRtD061757@beast.freebsd.org> Date: Tue, 21 Dec 2004 22:18:27 GMT From: Archie Cobbs To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: threads/75374: pthread_kill() ignores SA_SIGINFO flag X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Archie Cobbs List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Dec 2004 22:20:18 -0000 >Number: 75374 >Category: threads >Synopsis: pthread_kill() ignores SA_SIGINFO flag >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-threads >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Dec 21 22:20:17 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Archie Cobbs >Release: FreeBSD 5.3-STABLE alpha >Organization: Packet Design >Environment: System: FreeBSD beast.freebsd.org 5.3-STABLE FreeBSD 5.3-STABLE #527: Tue Dec 21 15:02:03 UTC 2004 root@beast.freebsd.org:/usr/src/sys/alpha/compile/BEAST alpha Also happens on FreeBSD 4.10. >Description: When a signal handler is set with the SA_SIGINFO flag, the signal is supposed to be delivered with extra information including the siginfo_t and ucontext_t structures. pthread_kill() seems to ignore this flag, at least when sending the signal to oneself. >How-To-Repeat: /* * Note that the program below prints "info=0x0 ctx=0x0" which shows that * no SA_SIGINFO context is being passed * * Compile: cc -Wall -o bug bug.c -pthread */ #include #include #include #include #include #include #include static void handler(int sig, siginfo_t *info, void *ctx) { printf("info=%p ctx=%p\n", info, ctx); } static void * entry(void *arg) { pthread_kill(pthread_self(), SIGSEGV); return NULL; } int main(int ac, char **av) { struct sigaction sa; pthread_t tid; memset(&sa, 0, sizeof(sa)); sigemptyset(&sa.sa_mask); sigaddset(&sa.sa_mask, SIGSEGV); sa.sa_flags = SA_SIGINFO | SA_NODEFER; sa.sa_sigaction = handler; if (sigaction(SIGSEGV, &sa, NULL) == -1) err(1, "sigaction"); if ((errno = pthread_create(&tid, NULL, entry, NULL)) != 0) err(1, "pthread_create"); if ((errno = pthread_join(tid, NULL)) != 0) err(1, "pthread_join"); return 0; } >Fix: Unknown. >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-threads@FreeBSD.ORG Tue Dec 21 22:35: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 A898A16A4CE; Tue, 21 Dec 2004 22:35:59 +0000 (GMT) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3CA8843D4C; Tue, 21 Dec 2004 22:35:59 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) iBLMZvhT024675; Tue, 21 Dec 2004 17:35:57 -0500 (EST) Date: Tue, 21 Dec 2004 17:35:57 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Archie Cobbs In-Reply-To: <200412212218.iBLMIRtD061757@beast.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/75374: pthread_kill() ignores SA_SIGINFO flag 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, 21 Dec 2004 22:35:59 -0000 On Tue, 21 Dec 2004, Archie Cobbs wrote: > > /* > * Note that the program below prints "info=0x0 ctx=0x0" which shows that > * no SA_SIGINFO context is being passed > * > * Compile: cc -Wall -o bug bug.c -pthread > */ This works in -current with libpthread. From owner-freebsd-threads@FreeBSD.ORG Tue Dec 21 22:40:22 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 179A816A4CF for ; Tue, 21 Dec 2004 22:40:22 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id DF22E43D31 for ; Tue, 21 Dec 2004 22:40:21 +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 iBLMeLdm027043 for ; Tue, 21 Dec 2004 22:40:21 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id iBLMeLLm027042; Tue, 21 Dec 2004 22:40:21 GMT (envelope-from gnats) Date: Tue, 21 Dec 2004 22:40:21 GMT Message-Id: <200412212240.iBLMeLLm027042@freefall.freebsd.org> To: freebsd-threads@FreeBSD.org From: Daniel Eischen Subject: Re: threads/75374: pthread_kill() ignores SA_SIGINFO flag 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, 21 Dec 2004 22:40:22 -0000 The following reply was made to PR threads/75374; it has been noted by GNATS. From: Daniel Eischen To: Archie Cobbs Cc: FreeBSD-gnats-submit@freebsd.org, Subject: Re: threads/75374: pthread_kill() ignores SA_SIGINFO flag Date: Tue, 21 Dec 2004 17:35:57 -0500 (EST) On Tue, 21 Dec 2004, Archie Cobbs wrote: > > /* > * Note that the program below prints "info=0x0 ctx=0x0" which shows that > * no SA_SIGINFO context is being passed > * > * Compile: cc -Wall -o bug bug.c -pthread > */ This works in -current with libpthread. From owner-freebsd-threads@FreeBSD.ORG Wed Dec 22 04:30: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 5E30816A4CE for ; Wed, 22 Dec 2004 04:30:35 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 32CFB43D2F for ; Wed, 22 Dec 2004 04:30:35 +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 iBM4UZcB074829 for ; Wed, 22 Dec 2004 04:30:35 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id iBM4UZaY074828; Wed, 22 Dec 2004 04:30:35 GMT (envelope-from gnats) Date: Wed, 22 Dec 2004 04:30:35 GMT Message-Id: <200412220430.iBM4UZaY074828@freefall.freebsd.org> To: freebsd-threads@FreeBSD.org From: "Enoch W." Subject: Re: threads/75273: FBSD 5.3 libpthread (KSE) bug X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: "Enoch W." List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Dec 2004 04:30:35 -0000 The following reply was made to PR threads/75273; it has been noted by GNATS. From: "Enoch W." To: , Cc: Subject: Re: threads/75273: FBSD 5.3 libpthread (KSE) bug Date: Tue, 21 Dec 2004 23:26:28 -0500 This is a multi-part message in MIME format. ------=_NextPart_000_0002_01C4E7B4.7F0A0870 Content-Type: multipart/alternative; boundary="----=_NextPart_001_0003_01C4E7B4.7F0B8F10" ------=_NextPart_001_0003_01C4E7B4.7F0B8F10 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Problem demo is attached, as requested. TIA, Enoch. ------=_NextPart_001_0003_01C4E7B4.7F0B8F10 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Problem demo is attached, as requested. = TIA,=20 Enoch.
------=_NextPart_001_0003_01C4E7B4.7F0B8F10-- ------=_NextPart_000_0002_01C4E7B4.7F0A0870 Content-Type: application/octet-stream; name="demo.c" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="demo.c" #include =0A= #include =0A= #include =0A= #include =0A= #include =0A= #include =0A= =0A= #define ASSRET(cond) do { \=0A= if (!(cond)) { \=0A= fprintf(stderr, "ASSRET ERROR @ %d -> %s\n", __LINE__, \=0A= strerror(ret =3D=3D -1 ? errno : ret)); \=0A= exit(EXIT_FAILURE); \=0A= } \=0A= } while (0)=0A= =0A= int tock;=0A= =0A= void tick()=0A= {=0A= tock =3D 1;=0A= }=0A= =0A= void *pulse(void *arg)=0A= {=0A= int ret;=0A= struct itimerval it;=0A= sigset_t set;=0A= =0A= sigemptyset(&set);=0A= sigaddset(&set, SIGALRM);=0A= ret =3D sigprocmask(SIG_BLOCK, &set, NULL);=0A= ASSRET(ret =3D=3D 0);=0A= sigemptyset(&set);=0A= =0A= it.it_interval.tv_sec =3D 1;=0A= it.it_interval.tv_usec =3D 0;=0A= it.it_value.tv_sec =3D 1;=0A= it.it_value.tv_usec =3D 0;=0A= ret =3D setitimer(ITIMER_REAL, &it, NULL);=0A= ASSRET(ret =3D=3D 0);=0A= =0A= while (1) {=0A= while (!tock)=0A= sigsuspend(&set);=0A= tock =3D 0;=0A= putchar('*');=0A= fflush(stdout);=0A= }=0A= }=0A= =0A= int main()=0A= {=0A= int ret;=0A= pthread_attr_t attr;=0A= pthread_t thread;=0A= =0A= ret =3D pthread_attr_init(&attr);=0A= ASSRET(ret =3D=3D 0);=0A= ret =3D pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);=0A= ASSRET(ret =3D=3D 0);=0A= =0A= signal(SIGALRM, tick);=0A= =0A= ret =3D pthread_create(&thread, NULL, pulse, NULL);=0A= ASSRET(ret =3D=3D 0);=0A= =0A= printf("Press Enter to cancel the pulse() thread\n");=0A= while (getchar() !=3D '\n');=0A= =0A= ret =3D pthread_cancel(thread);=0A= ASSRET(ret =3D=3D 0);=0A= ret =3D pthread_join(thread, NULL);=0A= ASSRET(ret =3D=3D 0);=0A= =0A= printf("Press Enter to end\n");=0A= while (getchar() !=3D '\n');=0A= return 0;=0A= }=0A= ------=_NextPart_000_0002_01C4E7B4.7F0A0870 Content-Type: application/octet-stream; name="demo.mk" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="demo.mk" demo: demo.c=0A= $(CC) -Wall -g -odemo -pthread demo.c=0A= ------=_NextPart_000_0002_01C4E7B4.7F0A0870-- From owner-freebsd-threads@FreeBSD.ORG Wed Dec 22 06:10: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 7752D16A4CF for ; Wed, 22 Dec 2004 06:10:24 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5AF2743D41 for ; Wed, 22 Dec 2004 06:10:24 +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 iBM6AOAk012633 for ; Wed, 22 Dec 2004 06:10:24 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id iBM6AOuo012632; Wed, 22 Dec 2004 06:10:24 GMT (envelope-from gnats) Date: Wed, 22 Dec 2004 06:10:24 GMT Message-Id: <200412220610.iBM6AOuo012632@freefall.freebsd.org> To: freebsd-threads@FreeBSD.org From: Craig Rodrigues Subject: Re: threads/75273: FBSD 5.3 libpthread (KSE) bug 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: Wed, 22 Dec 2004 06:10:24 -0000 The following reply was made to PR threads/75273; it has been noted by GNATS. From: Craig Rodrigues To: freebsd-gnats-submit@freebsd.org Cc: ixew@hotmail.com Subject: Re: threads/75273: FBSD 5.3 libpthread (KSE) bug Date: Wed, 22 Dec 2004 01:05:04 -0500 Here is the non-MIME mangled version of the demo source. It works for me on -CURRENT. #include #include #include #include #include #include #define ASSRET(cond) do { \ if (!(cond)) { \ fprintf(stderr, "ASSRET ERROR @ %d -> %s\n", __LINE__, \ strerror(ret == -1 ? errno : ret)); \ exit(EXIT_FAILURE); \ } \ } while (0) int tock; void tick() { tock = 1; } void *pulse(void *arg) { int ret; struct itimerval it; sigset_t set; sigemptyset(&set); sigaddset(&set, SIGALRM); ret = sigprocmask(SIG_BLOCK, &set, NULL); ASSRET(ret == 0); sigemptyset(&set); it.it_interval.tv_sec = 1; it.it_interval.tv_usec = 0; it.it_value.tv_sec = 1; it.it_value.tv_usec = 0; ret = setitimer(ITIMER_REAL, &it, NULL); ASSRET(ret == 0); while (1) { while (!tock) sigsuspend(&set); tock = 0; putchar('*'); fflush(stdout); } } int main() { int ret; pthread_attr_t attr; pthread_t thread; ret = pthread_attr_init(&attr); ASSRET(ret == 0); ret = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); ASSRET(ret == 0); signal(SIGALRM, tick); ret = pthread_create(&thread, NULL, pulse, NULL); ASSRET(ret == 0); printf("Press Enter to cancel the pulse() thread\n"); while (getchar() != '\n'); ret = pthread_cancel(thread); ASSRET(ret == 0); ret = pthread_join(thread, NULL); ASSRET(ret == 0); printf("Press Enter to end\n"); while (getchar() != '\n'); return 0; } From owner-freebsd-threads@FreeBSD.ORG Wed Dec 22 11:20:17 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 043AD16A4CE for ; Wed, 22 Dec 2004 11:20:17 +0000 (GMT) Received: from web51807.mail.yahoo.com (web51807.mail.yahoo.com [206.190.38.238]) by mx1.FreeBSD.org (Postfix) with SMTP id 7E8F943D31 for ; Wed, 22 Dec 2004 11:20:16 +0000 (GMT) (envelope-from huanghwh@yahoo.com) Received: (qmail 46552 invoked by uid 60001); 22 Dec 2004 11:20:16 -0000 Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; b=1/WTS+Db//fo5P8tMnQuIp/q+AG2cv+05WETaQToCqc1IO0dVBKzyETPLsmuFqoG/ygIGVmGM9oPVMnIcZbnttdTnwcwEgQY8DmtFqIlYIQ5bGX6qGnUv20e7sdumv0rmdbenKu9u0l4/r3bJRMtKEw9lTjGZwBoao+eXOkhZt8= ; Message-ID: <20041222112016.46550.qmail@web51807.mail.yahoo.com> Received: from [218.20.230.105] by web51807.mail.yahoo.com via HTTP; Wed, 22 Dec 2004 19:20:16 CST Date: Wed, 22 Dec 2004 19:20:16 +0800 (CST) From: huang wen hui To: threads@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=gb2312 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Wed, 22 Dec 2004 15:58:41 +0000 Subject: Mozilla 1.7.3 crash under CURRENT 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, 22 Dec 2004 11:20:17 -0000 view this page:http://www-8.ibm.com/products/cn/Brand.wss?brand=pt&series=pt_t&nextpage=seriesmodels&ctry=cn&gpid=0000000001 will crash mozilla: %mozilla Error: No running window found. Fatal error 'Recurse on a private mutex.' at line 988 in file /usr/src/lib/libpthread/thread/thr_mutex.c (errno = 0) Abort trap --hwh _________________________________________________________ Do You Yahoo!? ÏÓÓÊÏä̫С£¿ÑÅ»¢µçÓÊ×ÔÖúÀ©ÈÝ£¡ http://cn.rd.yahoo.com/mail_cn/tag/10m/*http://cn.mail.yahoo.com/event/10m.html From owner-freebsd-threads@FreeBSD.ORG Wed Dec 22 18: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 1457516A4D2 for ; Wed, 22 Dec 2004 18:20:20 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id F19E743D49 for ; Wed, 22 Dec 2004 18:20:19 +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 iBMIKJY1006420 for ; Wed, 22 Dec 2004 18:20:19 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id iBMIKJ82006419; Wed, 22 Dec 2004 18:20:19 GMT (envelope-from gnats) Date: Wed, 22 Dec 2004 18:20:19 GMT Message-Id: <200412221820.iBMIKJ82006419@freefall.freebsd.org> To: freebsd-threads@FreeBSD.org From: Craig Rodrigues Subject: Re: threads/75273: FBSD 5.3 libpthread (KSE) bug 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: Wed, 22 Dec 2004 18:20:20 -0000 The following reply was made to PR threads/75273; it has been noted by GNATS. From: Craig Rodrigues To: freebsd-gnats-submit@freebsd.org Cc: "Enoch W." Subject: Re: threads/75273: FBSD 5.3 libpthread (KSE) bug Date: Wed, 22 Dec 2004 13:18:52 -0500 On Wed, Dec 22, 2004 at 06:10:24AM +0000, Craig Rodrigues wrote: > Here is the non-MIME mangled version of the demo source. > It works for me on -CURRENT. While this testcase does not fail on -CURRENT, I just verified that it does in fact fail on 5.3 with: Press Enter to cancel the pulse() thread ****** Fatal error 'oldsigmask is not cleared' at line 77 in file /usr/src/lib/libpthread/thread/thr_sigsuspend.c (errno = 4) Abort trap (core dumped) -- Craig Rodrigues rodrigc@crodrigues.org