Date: Sat, 25 Mar 2000 22:56:15 -0800 From: Arun Sharma <adsharma@sharmas.dhs.org> To: FreeBSD Hackers <freebsd-hackers@freebsd.org> Subject: RTLD thread safety Message-ID: <20000325225615.A11307@sharmas.dhs.org>
next in thread | raw e-mail | index | archive | help
When I try to compile a simple multi threaded program using a wrapper around rfork (from linuxthreads port), I get the following core dump: ld-elf.so.1: assert failed: /usr/src/libexec/rtld-elf/lockdflt.c:54 Investigation into code reveals that lazy resolution of symbols (using PLTs) was happening in multiple threads in the linker simultaneously. Also, the code in lockdflt.c is achieving mutual exclusion by blocking signals. This doesn't work on a SMP machine using kernel threads. What would be the right solution for this ? A new set of primitives registered using dllockinit or making the defaults SMP thread-safe ? I suppose the linuxthreads port works because it has been tested only with Linux executables and Linux executables don't use lazy resolution of symbols ? I'm just speculating here. -Arun To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000325225615.A11307>