Date: Sun, 16 Sep 2007 22:35:30 -0600 From: Joe Peterson <lavajoe@gentoo.org> To: Jason Evans <jasone@freebsd.org> Cc: David Xu <davidxu@freebsd.org>, freebsd-threads@freebsd.org Subject: Re: Segfault when mapping libpthread -> libthr Message-ID: <46EE0412.70206@gentoo.org> In-Reply-To: <46EB152B.1080905@freebsd.org> References: <46E9CBC8.3060906@gentoo.org> <46E9E867.7030909@freebsd.org> <46EAEABA.20003@gentoo.org> <46EB152B.1080905@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Jason Evans wrote: > I saw something similar a while back when investigating malloc problem > reports (that turned out to be a threads problem). It looked to me like > there was a minor incompatibility in the exported symbols of libpthread > and libthr that caused rtld to pull some symbols from libpthread, > despite the libmap.conf settings. IIRC, the symbol incompatibilities > did not at first glance seem like they would cause the problem, but my > guess (unverified) was that dynamic dependency resolution was chasing a > dependency into libpthread before a legitimate dependency through libthr > managed to map the symbol. > > I'm sorry that I don't remember the nature of the library interface > incompatibilities. It seems to me though that it was pretty subtle, > having to do with weak internally exported symbols (available to other > .o's within the library, but not to external consumers of the library). This would indeed explain the issue. It is as if some symbols come from libthr and some from libpthread. Or maybe sometimes the libthr version gets called and other timed the libpthread. For now, I am symlinking libpthread.so and libc_r.so to libthr.so (and same for the .a files), and this seems to fix the issue. These are the same libs that we map in libmap.conf. If you remember more about this let me know, or if anyone else knows more about this potential issue, I'd love to hear more! Thanks, Joe
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?46EE0412.70206>