Date: Fri, 31 Dec 2010 12:46:33 +0100 From: John Marino <freebsdml@marino.st> To: freebsd-threads@freebsd.org Subject: AMD64 version of GNAT Ada compiler broken due to libthr Message-ID: <4D1DC299.2090808@marino.st>
next in thread | raw e-mail | index | archive | help
For several months I have been getting the GNAT Ada compiler to work properly on the four major BSDs. The i386 FreeBSD, the i386 Dragonfly BSD, and the x86_64 Dragonfly BSD ports are currently perfect. The i386 and x86_64 ports of NetBSD are nearly perfect, and only lack a functional DWARF2 unwind mechanism, and the OpenBSD ports are in pretty good shape too. The progress for this work can be seen at http://www.dragonlace.net However the AMD64 FreeBSD version is unusable and it's due to libthr. I'm not sure why the i386 version works with libthr and AMD64 version doesn't. For all four BSDs, there is no configuration difference for threading between architectures. The problem seems to be with the pthread_cond_wait functionality. I've logged a test case segfault via gdb7.1 below. I would greatly appreciate some help in determining where the problem lies. If this problem can be solved, it will likely result in a perfect port of the GNAT Ada compiler for FreeBSD AMD64, something that has not existed before. Regards, John Starting program: /usr/home/marino/test_gnat/test_c9a009c/c9a009c [New LWP 100051] [New Thread 800a041c0 (LWP 100051)] [New Thread 800a0ae40 (LWP 100073)] [New Thread 800a64c80 (LWP 100080)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 800a64c80 (LWP 100080)] 0x00007fffffbfeb19 in ?? () * 4 Thread 800a64c80 (LWP 100080) 0x00007fffffbfeb19 in ?? () 3 Thread 800a0ae40 (LWP 100073) 0x00000008006923cc in _umtx_op_err () at /usr/src/lib/libthr/arch/amd64/amd64/_umtx_op_err.S:37 2 Thread 800a041c0 (LWP 100051) 0x00000008006923cc in _umtx_op_err () at /usr/src/lib/libthr/arch/amd64/amd64/_umtx_op_err.S:37 [Switching to thread 3 (Thread 800a0ae40 (LWP 100073))]#0 0x00000008006923cc in _umtx_op_err () at /usr/src/lib/libthr/arch/amd64/amd64/_umtx_op_err.S:37 37 RSYSCALL_ERR(_umtx_op) #0 0x00000008006923cc in _umtx_op_err () at /usr/src/lib/libthr/arch/amd64/amd64/_umtx_op_err.S:37 #1 0x00000008006904c5 in cond_wait_common (cond=<value optimized out>, mutex=0x800a0c850, abstime=0x0, cancel=1) at /usr/src/lib/libthr/thread/thr_cond.c:204 #2 0x000000000040ca0f in system.tasking.stages.activate_tasks ( chain_access=0x7fffffbfebb0) at s-tassta.adb:382 #3 0x0000000000405950 in c9a009c.t1 (<_task>=<value optimized out>) at c9a009c.adb:52 #4 0x000000000040d655 in system.tasking.stages.task_wrapper ( self_id=0x800a0c700) at s-tassta.adb:1207 #5 0x0000000800688621 in thread_start (curthread=0x800a0ae40) at /usr/src/lib/libthr/thread/thr_create.c:288 #6 0x0000000000000000 in ?? ()
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4D1DC299.2090808>