Date: Thu, 11 Sep 2008 15:06:35 -0400 From: "Barry Andrews" <titanandrews@gmail.com> To: freebsd-hackers@freebsd.org Subject: loading multi threaded library into executable enabled for single thread Message-ID: <eda4c18b0809111206t6438f87dmb8fab0db939c9980@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Hi All, I have a multi-threaded library that is linked against libpthread. When I load this lib into a tclsh process on FreeBSD, I get this error, "Recurse on private mutex". and crash. I understand that I can have this issue when the executable is not linked against libpthread but one of the loaded libs is. Basically, it thinks it's in single threaded mode. I can get around this issue, by doing export LD_PRELOAD=libpthread.so.1, however this is a hack at best. Is there any other way to get around this issue other than linking tclsh with libpthread ( because that's not an option) I thought of re-building libpthread with the offending code commented out, and that did work, however I ran into other issues, so I think it's not a very "safe" option. My feeling is that this is a FreeBSD issue because it's not happening on other platforms, Linux, Solaris. Any suggestions are welcome. Many thanks! -B * *
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?eda4c18b0809111206t6438f87dmb8fab0db939c9980>