[PATCH] ldso: fix dlsym hang when reloading DSOs

2013-06-27 Thread Timo Teräs
It can happen under certain cases that the DSO had refcount 0, but was already loaded. (NODELETE flag is set, or it is pulled in via both NEEDED dependency and explicit dlopen()). In these cases we must not re-add the DSO to the global symbol scope as it is already there. Or we end up corrupting

Re: [PATCH] ldso: fix dlsym hang when reloading DSOs

2013-06-27 Thread Carmelo AMOROSO
On 27/06/2013 8.34, Timo Teräs wrote: It can happen under certain cases that the DSO had refcount 0, but was already loaded. (NODELETE flag is set, or it is pulled in via both NEEDED dependency and explicit dlopen()). In these cases we must not re-add the DSO to the global symbol scope as

Re: [PATCH] ldso: fix dlsym hang when reloading DSOs

2013-06-27 Thread Rich Felker
On Thu, Jun 27, 2013 at 09:34:32AM +0300, Timo Teräs wrote: It can happen under certain cases that the DSO had refcount 0, but was already loaded. (NODELETE flag is set, or it is pulled in via both NEEDED dependency and explicit dlopen()). Wouldn't it be more logical to prevent this from

Re: [PATCH] ldso: fix dlsym hang when reloading DSOs

2013-06-27 Thread Bernhard Reutner-Fischer
On 27 June 2013 20:16:26 Rich Felker dal...@aerifal.cx wrote: On Thu, Jun 27, 2013 at 09:34:32AM +0300, Timo Teräs wrote: It can happen under certain cases that the DSO had refcount 0, but was already loaded. (NODELETE flag is set, or it is pulled in via both NEEDED dependency and explicit

Re: [PATCH] ldso: fix dlsym hang when reloading DSOs

2013-06-27 Thread Timo Teras
On Thu, 27 Jun 2013 14:16:26 -0400 Rich Felker dal...@aerifal.cx wrote: On Thu, Jun 27, 2013 at 09:34:32AM +0300, Timo Teräs wrote: It can happen under certain cases that the DSO had refcount 0, but was already loaded. (NODELETE flag is set, or it is pulled in via both NEEDED dependency

Re: [PATCH] ldso: fix dlsym hang when reloading DSOs

2013-06-27 Thread Timo Teras
On Thu, 27 Jun 2013 21:36:14 +0300 Timo Teras timo.te...@iki.fi wrote: On Thu, 27 Jun 2013 14:16:26 -0400 Rich Felker dal...@aerifal.cx wrote: On Thu, Jun 27, 2013 at 09:34:32AM +0300, Timo Teräs wrote: It can happen under certain cases that the DSO had refcount 0, but was already

Re: [PATCH] ldso: fix dlsym hang when reloading DSOs

2013-06-27 Thread Rich Felker
On Thu, Jun 27, 2013 at 09:36:14PM +0300, Timo Teras wrote: On Thu, 27 Jun 2013 14:16:26 -0400 Rich Felker dal...@aerifal.cx wrote: On Thu, Jun 27, 2013 at 09:34:32AM +0300, Timo Teräs wrote: It can happen under certain cases that the DSO had refcount 0, but was already loaded.

Re: [PATCH] ldso: fix dlsym hang when reloading DSOs

2013-06-27 Thread Timo Teras
On Thu, 27 Jun 2013 20:36:44 +0200 Bernhard Reutner-Fischer rep.dot@gmail.com wrote: On 27 June 2013 20:16:26 Rich Felker dal...@aerifal.cx wrote: On Thu, Jun 27, 2013 at 09:34:32AM +0300, Timo Teräs wrote: It can happen under certain cases that the DSO had refcount 0, but was

Re: [PATCH] ldso: fix dlsym hang when reloading DSOs

2013-06-27 Thread Bernhard Reutner-Fischer
On 27 June 2013 21:07:38 Timo Teras timo.te...@iki.fi wrote: On Thu, 27 Jun 2013 20:36:44 +0200 Bernhard Reutner-Fischer rep.dot@gmail.com wrote: On 27 June 2013 20:16:26 Rich Felker dal...@aerifal.cx wrote: On Thu, Jun 27, 2013 at 09:34:32AM +0300, Timo Teräs wrote: It can happen

Re: [PATCH] ldso: fix dlsym hang when reloading DSOs

2013-06-27 Thread Timo Teras
On Thu, 27 Jun 2013 21:25:12 +0200 Bernhard Reutner-Fischer rep.dot@gmail.com wrote: On 27 June 2013 21:07:38 Timo Teras timo.te...@iki.fi wrote: On Thu, 27 Jun 2013 20:36:44 +0200 Bernhard Reutner-Fischer rep.dot@gmail.com wrote: On 27 June 2013 20:16:26 Rich Felker