Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Mar 2006 10:48:34 +0200
From:      Kostik Belousov <kostikbel@gmail.com>
To:        freebsd-threads@freebsd.org
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: [patch] Re: dlopen() and dlclose() are not MT-safe? YES, esp. for libthr
Message-ID:  <20060324084834.GE27116@deviant.kiev.zoral.com.ua>
In-Reply-To: <20060323105440.GD27116@deviant.kiev.zoral.com.ua>
References:  <44215FE9.2070602@highway.ne.jp> <20060322174312.GB27116@deviant.kiev.zoral.com.ua> <20060322190725.GC27116@deviant.kiev.zoral.com.ua> <4421BA34.8040908@highway.ne.jp> <20060323105440.GD27116@deviant.kiev.zoral.com.ua>

next in thread | previous in thread | raw e-mail | index | archive | help

--zCKi3GIZzVBPywwA
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

I did understand the purpose of the thread mask code in
libexec/rtld/rtld_lock.c, or, more precisely, the condition where this code
works (for the context, see the mails with same subject on freebsd-hackers).

Look, that code assumes that blocking async signals would stop thread
scheduler from doing preemption of the current thread. This works
for libc_r, but fails in libpthread and libthr cases. libpthread provides
implementation of the locks for rtld. But libthr does not !

As result, rtld exhibit races when used with libthr. In other words,
libthr needs code to do proper locking.

Do you agree ? Does somebody already planned to do this work ?

Best regards,
Kostik Belousov

--zCKi3GIZzVBPywwA
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (FreeBSD)

iD8DBQFEI7JhC3+MBN1Mb4gRAiHtAJ9XJSGx3Y9lpjAUaRFM+D/Qy0YpxgCgtm3r
nxXCU+TonMJc6DrF4a4gqik=
=0lBj
-----END PGP SIGNATURE-----

--zCKi3GIZzVBPywwA--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060324084834.GE27116>