updating a shared lib crashes running programs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello all,

I have a strange problem on my fedora (Linux nx0059 2.4.22-1.2179.nptlsmp #1 SMP Tue Apr 13 09:50:25 EDT 2004 i686 i686 i386 GNU/Linux) machine.

I short: if I update a shared library while a program that has loaded it is running, that program crashes (Illegal instruction).

To be precise: my shared lib is always the same (i.e. I don't replace a lib by a new version, I just do cp). I use shared libs, not dynamics (no dlopen dlsym ..). What I do is to launch the program (called http_stack in my case), then while it is running, from another terminal I update one of its lib (called libstack.so):

$ cp -f libstack.so /home/nxuser/pp/lib/libstack.so

the program traces is the following:

$ echo $LD_LIBRARY_PATH
/home/nxuser/pp/lib/
$ ldd ./bin/http_stack
libmonlib.so => /home/nxuser/pp/lib/libmonlib.so (0x00b02000)
libdbcache.so => /home/nxuser/pp/lib/libdbcache.so (0x00faf000)
libstack-devel.so => /home/nxuser/pp/lib/libstack-devel.so (0x00246000)
libstack.so => /home/nxuser/pp/lib/libstack.so (0x0024f000)
libgwutils.so => /home/nxuser/pp/lib/libgwutils.so (0x00e7d000)
libares.so => /home/nxuser/pp/lib/libares.so (0x00ab1000)
libz.so => /home/nxuser/pp/lib/libz.so (0x00712000)
libpthread.so.0 => /lib/tls/libpthread.so.0 (0x00111000)
libm.so.6 => /lib/tls/libm.so.6 (0x00f4a000)
libc.so.6 => /lib/tls/libc.so.6 (0x005d6000)
libncurses.so.5 => /usr/lib/libncurses.so.5 (0x009af000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00a0d000)
libgpm.so.1 => /usr/lib/libgpm.so.1 (0x00121000)
$ ./bin/http_stack -f conf/http_stack.conf
Illegal instruction (core dumped)


I tried with LD_DEBUG=all, but it says nothing more. I tried with gdb but is tells me nothing more useful than Illegal Instruction. I finally tried with valgrind 2.0.0 but then I don't have the problem.

I really cannot understand what could go wrong when replacing a library, the running programs are not supposed to reload it.

Any hint is welcomed ! thanks in advance

Dimitri




[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux