| Summary: | 32 bit libthr failing pthread_create() | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | Stephen Sanders <ssanders> | ||||
| Component: | threads | Assignee: | freebsd-threads (Nobody) <threads> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Only Me | ||||||
| Priority: | Normal | ||||||
| Version: | Unspecified | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
Responsible Changed From-To: freebsd-bugs->freebsd-threads Over to maintainer(s). libkse does not have 32 bit compatible shim on 64 bit platform, you should use libmap.conf and map libkse to libthr. Regards, David Xu Retesting by linking with libthr.so on the 6.3/32 bit system worked. Thanks. David Xu wrote: > libkse does not have 32 bit compatible shim on 64 bit platform, > you should use libmap.conf and map libkse to libthr. > > Regards, > David Xu > > State Changed From-To: open->closed Submitter reports that the problem was fixed by linking with libthr. |
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.