From owner-freebsd-hackers Mon Oct 21 4:42: 4 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4696F37B401 for ; Mon, 21 Oct 2002 04:42:01 -0700 (PDT) Received: from mailg.telia.com (mailg.telia.com [194.22.194.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8C8F343E4A for ; Mon, 21 Oct 2002 04:41:53 -0700 (PDT) (envelope-from linus@angliaab.se) Received: from d1o927.telia.com (d1o927.telia.com [213.65.200.241]) by mailg.telia.com (8.12.5/8.12.5) with ESMTP id g9LBfknI009588 for ; Mon, 21 Oct 2002 13:41:46 +0200 (CEST) X-Original-Recipient: Received: from bilbo (h87n2fls33o927.telia.com [213.65.39.87]) by d1o927.telia.com (8.10.2/8.10.1) with SMTP id g9LBfjc13460 for ; Mon, 21 Oct 2002 13:41:45 +0200 (CEST) Received: by bilbo (sSMTP sendmail emulation); Mon, 21 Oct 2002 13:36:00 +0200 Subject: PThreads problem From: Linus Kendall To: freebsd-hackers@freebsd.org Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.8 Date: 21 Oct 2002 13:35:59 +0200 Message-Id: <1035200159.24315.13.camel@bilbo> Mime-Version: 1.0 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi, I'm trying to port a heavily threaded application from Linux (Debian 3.0, 2.4.19) to FreeBSD (4.6-RELEASE). The program compiles successfully using gcc with -pthreads. But, when I try to run the application I get the following error after a while (after spawning 11 threads): Fatal error 'siglongjmp()ing between thread contexts is undefined by POSIX 1003.1' at line ? in file /usr/src/lib/libc_r/uthread/uthread_jmp.c (errno = ?) Abort trap - core dumped It always crashes at the same point. Under Linux it works perfectly fine. I also tried to compile with linuxthreads only to get a segfault directly when the program tries to spawn the first thread. GCC version on Linux: 2.95.4 20011002 GCC version on FreeBSD: 2.95.3 20010315 GCC/G++ command-line: g++ -g -Wall -I. `curl-config --cflags` -fsjlj-exceptions -D_THREAD_SAFE -D_REENTRANT -pthread `curl-config --libs` /Linus To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message