Date: Tue, 14 Apr 2009 20:41:15 GMT From: Stephen Sanders <ssanders@opnet.com> To: freebsd-gnats-submit@FreeBSD.org Subject: misc/133734: 32 bit libthr failing pthread_create() Message-ID: <200904142041.n3EKfFdS054550@www.freebsd.org> Resent-Message-ID: <200904142050.n3EKo3FN055569@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 133734 >Category: misc >Synopsis: 32 bit libthr failing pthread_create() >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Apr 14 20:50:03 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Stephen Sanders >Release: 7.1 >Organization: OPNET >Environment: FreeBSD vm7-1-64 7.1-RELEASE FreeBSD 7.1-RELEASE #1: Tue Mar 17 09:07:55 EDT 2009 root@vm.7.1.64:/usr/obj/usr/src/sys/GENERIC amd64 QEMU emulation running on Fedora 10. 32 bit library support installed. 5.3/6.3 compatibility libraries installed. >Description: The following program will drop core in pthread_create() with an invalid argument error: #include <sys/types.h> #include <signal.h> #include <pthread.h> #include <unistd.h> #include <stdio.h> #include <err.h> void *thr(void *a) { int *ip = (int *)a; printf("started thread %d\n", *ip); pause(); return 0; } int main(int argc, char **argv) { const int THREADCOUNT =4; int i; pthread_t threads[THREADCOUNT]; for (i =0; i < THREADCOUNT; i++) if (pthread_create(&threads[i], 0, thr, (void *)&i) != 0) errx(-1, "cannot create thread"); sleep(1); return 0; } ** an example execution ** [root@vm7-1-64 ~/tmp]# ./threadcore Fatal error 'can not create signal daemon thread! ' at line 236 in file /usr/src/lib/libpthread/thread/thr_sig.c (errno = 22) >How-To-Repeat: Cut and paste the program in the description. Compile it on a FreeBSD 6.3/32bit system and run the program on a FreeBSD 7.1 64 bit system. >Fix: >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200904142041.n3EKfFdS054550>