From owner-freebsd-bugs Wed Jan 16 10: 0:31 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 53A7F37B419 for ; Wed, 16 Jan 2002 10:00:08 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g0GI08o87849; Wed, 16 Jan 2002 10:00:08 -0800 (PST) (envelope-from gnats) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id AA19F37B417 for ; Wed, 16 Jan 2002 09:55:00 -0800 (PST) Received: (from nobody@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g0GHt0e87109; Wed, 16 Jan 2002 09:55:00 -0800 (PST) (envelope-from nobody) Message-Id: <200201161755.g0GHt0e87109@freefall.freebsd.org> Date: Wed, 16 Jan 2002 09:55:00 -0800 (PST) From: Torbjorn Granlund To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: kern/33952: Bogus error message from correct phreads code Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 33952 >Category: kern >Synopsis: Bogus error message from correct phreads code >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Jan 16 10:00:08 PST 2002 >Closed-Date: >Last-Modified: >Originator: Torbjorn Granlund >Release: 4.4 (and 4.2, 4.3, but not fbsd 4.1) >Organization: Swox AB >Environment: FreeBSD hill.swox.se 4.4-RELEASE FreeBSD 4.4-RELEASE #0: Tue Sep 18 11:57:08 PDT 2001 murray@builder.FreeBSD.org:/usr/src/sys/compile/GENERIC i386 >Description: This test case makes the pthreads code print a bogus error message: Fatal error 'Thread 0x804c400 has called pthread_exit() from a destructor. POSIX 1003.1 1996 s16.2.5.2 does not allow this!' at line ? in file /usr/src/lib/libc_r/uthread/uthread_exit.c (errno = ?) >How-To-Repeat: Compile and run the program below. #include #include int stop_flag = 0; void * crunch(void *ignored) { pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, 0); pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, 0); while (!stop_flag) ; pthread_exit (0); } int main() { pthread_t thread; pthread_create(&thread, NULL, crunch, 0); sleep(1); pthread_cancel(thread); stop_flag = 1; sleep(1); return 0; } >Fix: None. We have to tell our customer to run the program on any Unix system except FreeBSD until this (and the other pthreads bug we've also reported) are fixed. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message