This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug dynamic-link/14577] dlopen does not unload failed module - second dlopen succeeds


http://sourceware.org/bugzilla/show_bug.cgi?id=14577

Pierre Ossman <ossman at cendio dot se> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ossman at cendio dot se

--- Comment #1 from Pierre Ossman <ossman at cendio dot se> 2012-09-14 08:13:34 UTC ---
There is something special about this specific .so file that triggers the
issue. We've constructed a simple test case with the same scenario, and the
problem doesn't happen there. The failed module is properly unloaded from the
address space, and every dlopen() behaves the same.

Running with LD_DEBUG=all, there is a difference between the two:

Test case (OK):

      9339:    symbol=library_function;  lookup in file=./program [0]
      9339:    symbol=library_function;  lookup in file=/lib64/libdl.so.2 [0]
      9339:    symbol=library_function;  lookup in file=/lib64/libc.so.6 [0]
      9339:    symbol=library_function;  lookup in
file=/lib64/ld-linux-x86-64.so.2 [0]
      9339:    symbol=library_function;  lookup in file=./module.so [0]
      9339:    symbol=library_function;  lookup in file=./library.so [0]
      9339:    symbol=library_function;  lookup in file=/lib64/libc.so.6 [0]
      9339:    symbol=library_function;  lookup in
file=/lib64/ld-linux-x86-64.so.2 [0]
      9339:    ./module.so: error: symbol lookup error: undefined symbol:
library_function (fatal)
      9339:    
      9339:    file=./module.so [0];  destroying link map
      9339:    
      9339:    file=./library.so [0];  destroying link map

Real case (fail):

     16829:    symbol=snd_pcm_hw_params_can_disable_period_wakeup;  lookup in
file=./dlopen [0]
     16829:    symbol=snd_pcm_hw_params_can_disable_period_wakeup;  lookup in
file=/lib64/libdl.so.2 [0]
     16829:    symbol=snd_pcm_hw_params_can_disable_period_wakeup;  lookup in
file=/lib64/libc.so.6 [0]
     16829:    symbol=snd_pcm_hw_params_can_disable_period_wakeup;  lookup in
file=/lib64/ld-linux-x86-64.so.2 [0]
     16829:    symbol=snd_pcm_hw_params_can_disable_period_wakeup;  lookup in
file=/home/astrand/ctc/client/pulseaudio-new/src/.libs/module-alsa-sink.so [0]
     16829:    symbol=snd_pcm_hw_params_can_disable_period_wakeup;  lookup in
file=/home/astrand/ctc/client/pulseaudio-new/src/.libs/libpulsecore-UNKNOWN.UNKNOWN.so
[0]
     16829:    symbol=snd_pcm_hw_params_can_disable_period_wakeup;  lookup in
file=/home/astrand/ctc/client/pulseaudio-new/src/.libs/libpulsecommon-UNKNOWN.UNKNOWN.so
[0]
     16829:    symbol=snd_pcm_hw_params_can_disable_period_wakeup;  lookup in
file=/home/astrand/ctc/client/pulseaudio-new/src/.libs/libpulse.so.0 [0]
     16829:    symbol=snd_pcm_hw_params_can_disable_period_wakeup;  lookup in
file=/home/astrand/ctc/client/pulseaudio-new/src/.libs/libalsa-util.so [0]
     16829:    symbol=snd_pcm_hw_params_can_disable_period_wakeup;  lookup in
file=/lib64/libasound.so.2 [0]
     16829:   
/home/astrand/ctc/client/pulseaudio-new/src/.libs/libalsa-util.so: error:
relocation error: symbol snd_pcm_hw_params_can_disable_period_wakeup, version
ALSA_0.9 not defined in file libasound.so.2 with link time reference (fatal)

There is no "destroying link map" for the failing case.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]