From owner-freebsd-hackers Thu Oct 19 14:33: 5 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from finch-post-11.mail.demon.net (finch-post-11.mail.demon.net [194.217.242.39]) by hub.freebsd.org (Postfix) with ESMTP id D8A3437B4FE for ; Thu, 19 Oct 2000 14:32:59 -0700 (PDT) Received: from krasnegar.demon.co.uk ([194.222.168.155] helo=farie) by finch-post-11.mail.demon.net with esmtp (Exim 2.12 #1) id 13mNJ3-000HS4-0B for freebsd-hackers@freebsd.org; Thu, 19 Oct 2000 21:32:58 +0000 Received: from steve by farie with local (Exim 3.12 #1) id 13mNIV-0000R6-00 (Debian); Thu, 19 Oct 2000 22:32:23 +0100 Date: Thu, 19 Oct 2000 22:32:23 +0100 From: Steve Dobson To: freebsd-hackers@freebsd.org Subject: Problems with pthread Message-ID: <20001019223223.A1105@krasnegar.demon.co.uk> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="yEPQxsgoJgBvi8ip" User-Agent: Mutt/1.0.1i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG --yEPQxsgoJgBvi8ip Content-Type: text/plain; charset=us-ascii Hi First please CC to me as I am not on the hackers mail list. I am trying to get the ORBacus working for FreeBSD. I know you already have a port of ORBacus, but that is version 3, and their latest release is version 4. In order to get ORBacus working to it I first need to get their JTC library working (JTC is a thin wrapper to pthread). Now that the user threads have re-written I was hoping to get the JTC library to compile and work under the 4.1 kernel. I have managed to get it to compile, but it core dumps very early in the start up code of my application. I have written a little simple program (attached with its Makefile) that also exhibits the same problem. When I run the program I see the following error reported from gdb: (gdb) run Starting program: nod Program received signal SIGSEGV, Segmentation fault. 0x280747b8 in pth_cancel_point () from /usr/local/lib/libpthread.so.13 (gdb) Can anyone offer any advice. Steve -- Steve Dobson steve.dobson@krasnegar.demon.co.uk People don't usually make the same mistake twice -- they make it three times, four time, five times... --yEPQxsgoJgBvi8ip Content-Type: text/x-c++src Content-Disposition: attachment; filename="nod.FSO8wN.cpp" #include #include int main(int argc, char **argv) { pthread_mutex_t lock; cerr << "About to initialise the lock" << endl; if (pthread_mutex_init(&lock, 0)) { cerr << "Failed to init the lock" << cout; return 1; } cerr << "About to grab the lock" << endl; if (pthread_mutex_lock(&lock)) { cerr << "Failed to grab the lock" << cout; return 1; } cerr << "About to release the lock" << endl; if (pthread_mutex_unlock(&lock)) { cerr << "Failed to release the lock" << cout; return 1; } cerr << "All done" << endl; } --yEPQxsgoJgBvi8ip Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="Makefile.FuKxyt" SRC.cpp = nod.cpp CPPFLAGS = -I/usr/local/include -D_THREAD_SAFE CXXFLAGS = -g LDFLAGS = -L/usr/local/lib -pthread -g LDLIBS = -lpthread OBJS = ${SRC.cpp:%.cpp=%.o} nod: ${OBJS} ${CXX} ${LDFLAGS} -o nod ${OBJS} ${LDLIBS} clean: rm -f nod ${OBJS} --yEPQxsgoJgBvi8ip-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message