Date: Thu, 22 Mar 2007 06:08:04 GMT From: "Martin M. Mladenov"<fm@mtweb.org> To: freebsd-gnats-submit@FreeBSD.org Subject: amd64/110656: 32 bit threaded applications crash on amd64 SMP kernel. Message-ID: <200703220608.l2M684JS076860@www.freebsd.org> Resent-Message-ID: <200703220620.l2M6K4oS048320@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 110656 >Category: amd64 >Synopsis: 32 bit threaded applications crash on amd64 SMP kernel. >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-amd64 >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Mar 22 06:20:04 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Martin M. Mladenov >Release: FreeBSD 6.2-RELEASE-p3 amd64 >Organization: >Environment: System: FreeBSD c8 6.2-RELEASE-p3 FreeBSD 6.2-RELEASE-p3 #2: Wed Mar 21 06:31:50 MST 2007 root@c8:/usr/obj/usr/src/sys/SM6015TTV amd64 >Description: 32 bit applications using the posix threads library crash when calling pthread_create on an SMP amd64 kernel. This happens with existing binaries, built natively on a x86 machine, as well as binaries built with cc -m32 on the amd64 system. A backtrace for the example in the next section yields: Core was generated by `pthread-crash'. 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 0x2809f1c808053000 (runnable)] Cannot get thread info: generic error (gdb) bt #0 0x0804d100 in ?? () This has been reproduced on two machines with completely different hardware. >How-To-Repeat: The problem can be reproduced by the following code (pthread_crash.c): #include <stdio.h> #include <pthread.h> void *thread(void *data) { puts("Thread."); return NULL; } int main() { pthread_t pth; void *pv; pthread_create(&pth,NULL,thread,NULL); pthread_join(pth,&pv); return 0; } The code is compiled with: cc -m32 -B/usr/lib32 -pthread -o pthread-crash pthread-crash.c This code runs fine when compiled to 64 bit. >Fix: None known. >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200703220608.l2M684JS076860>