Date: Tue, 14 Apr 2009 20:54:45 GMT From: Stephen Sanders <ssanders@opnet.com> To: freebsd-gnats-submit@FreeBSD.org Subject: misc/133735: Multi-threaded 32 bit cores can't be used on 64 bit systems Message-ID: <200904142054.n3EKsjXN065121@www.freebsd.org> Resent-Message-ID: <200904142100.n3EL04oI068392@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 133735 >Category: misc >Synopsis: Multi-threaded 32 bit cores can't be used on 64 bit systems >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 21:00:04 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Stephen Sanders >Release: 6.3 - 64 Bit >Organization: OPNET >Environment: FreeBSD alt-4100-1.lab.opnet.com 6.3-RELEASE FreeBSD 6.3-RELEASE #0: Tue Mar 31 14:11:07 PDT 2009 pmai@focus7.networkphysics.com:/u1/builds/ping/NP/FreeBSD/package/NPbabkernel/bld-tmp/sys/amd64/compile/NPBAB amd64 >Description: The following program will produce a core file. Running the program on a FreeBSD 6.3/64 bit system will produce a core file. Attempts to use gdb on the core will fail on the following error: Core was generated by `threadcore'. Program terminated with signal 11, Segmentation fault. Reading symbols from /usr/lib32/libpthread.so.2...(no debugging symbols found)...done. Loaded symbols for /usr/lib32/libpthread.so.2 Reading symbols from /usr/lib32/libc.so.6...(no debugging symbols found)...done. Loaded symbols for /usr/lib32/libc.so.6 Reading symbols from /libexec/ld-elf.so.1...(no debugging symbols found)...done. Loaded symbols for /libexec/ld-elf.so.1 #0 0x0804d100 in ?? () [New Thread 0x805301408053200 (runnable)] [New Thread 0x280a05a808053000 (runnable)] Cannot get thread info: generic error (gdb) --------------------------- The Program ------------------ #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); kill(0, SIGBUS); return 0; } >How-To-Repeat: Compile the program in the description section on a FreeBSD 6.3/32 bit system. Run it on a 6.3/64 bit system and attempt to look at the core file ('info threads' for example) >Fix: >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200904142054.n3EKsjXN065121>