Date: Wed, 16 Jan 2002 09:55:00 -0800 (PST) From: Torbjorn Granlund <tege@swox.se> To: freebsd-gnats-submit@FreeBSD.org Subject: kern/33952: Bogus error message from correct phreads code Message-ID: <200201161755.g0GHt0e87109@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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 <pthread.h> #include <unistd.h> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200201161755.g0GHt0e87109>