Bug 103260 - software crashes when loading certain shared libraries at runtime
software crashes when loading certain shared libraries at runtime
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: glibc (Show other bugs)
3.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-08-28 05:05 EDT by Albert Fluegel
Modified: 2007-11-30 17:06 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-08-28 08:11:52 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Albert Fluegel 2003-08-28 05:05:18 EDT
Description of problem:
The commercial software 'calibre' has the following
problem to start on Itanium2 (ia64):

prompt# /path/to/calibre
/path/to/calibre: relocation error: /path/to/calibre: symbol _dl_loaded, version
GLIBC_2.2 not defined in file ld-linux-ia64.so.2 with link time reference
prompt# ldd /path/to/calibre
        libdl.so.2 => /lib/libdl.so.2 (0x2000000000054000)
        libm.so.6.1 => /lib/tls/libm.so.6.1 (0x200000000006c000)
        libc.so.6.1 => /lib/tls/libc.so.6.1 (0x20000000000fc000)
        libpthread.so.0 => /lib/tls/libpthread.so.0 (0x2000000000360000)
        /lib/ld-linux-ia64.so.2 => /lib/ld-linux-ia64.so.2 (0x2000000000000000)
prompt# file /path/to/calibre
/path/to/calibre: ELF 64-bit LSB executable, IA-64, version 1 (SYSV), for
GNU/Linux 2.4.0, dynamically linked (uses shared libs), not stripped
prompt# strace /path/to/calibre
execve("/opt/fwtmp/lvp/nielsen/orchid_data/setups/calibre_drc/install/iil_cal_20
03.4_9/pkgs/icv/pvt/calibre", ["/opt/fwtmp/lvp/nielsen/orchid_data/setups/calibr
e_drc/install/iil_cal_2003.4_9/pkgs/icv/pvt/calibre"], [/* 34 vars */]) = 0
uname({sys="Linux", node="ltuih001", ...}) = 0
brk(0)                                  = 0x6000000000e6b130
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/opt/intel/compiler70/ia64/lib/tls/libdl.so.2", O_RDONLY) = -1 ENOENT (No 
such file or directory)
stat("/opt/intel/compiler70/ia64/lib/tls", 0x60000fffffffac90) = -1 ENOENT (No s
uch file or directory)
open("/opt/intel/compiler70/ia64/lib/libdl.so.2", O_RDONLY) = -1 ENOENT (No such
 file or directory)
stat("/opt/intel/compiler70/ia64/lib", 0x60000fffffffac90) = -1 ENOENT (No such 
file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=70842, ...}) = 0
mmap(NULL, 70842, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2000000000040000
close(3)                                = 0
open("/lib/libdl.so.2", O_RDONLY)       = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0002\0\1\0\0\0\0006\0"..., 640) = 640
fstat(3, {st_mode=S_IFREG|0755, st_size=28072, ...}) = 0
mmap(NULL, 84560, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x2000000000054000
mprotect(0x200000000005c000, 51792, PROT_NONE) = 0
mmap(0x2000000000064000, 32768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 
0) = 0x2000000000064000
close(3)                                = 0
open("/lib/tls/libm.so.6.1", O_RDONLY)  = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0002\0\1\0\0\0\200\235"..., 640) = 64
0
fstat(3, {st_mode=S_IFREG|0755, st_size=620584, ...}) = 0
mmap(NULL, 589536, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x200000000006c000
mmap(0x20000000000ec000, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 
0x70000) = 0x20000000000ec000
close(3)                                = 0
open("/lib/tls/libc.so.6.1", O_RDONLY)  = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0002\0\1\0\0\0@\253\2"..., 640) = 640
fstat(3, {st_mode=S_IFREG|0755, st_size=2774584, ...}) = 0
mmap(NULL, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x20
0000000002c000
mmap(NULL, 2506248, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x20000000000fc000
mprotect(0x2000000000348000, 97800, PROT_NONE) = 0
mmap(0x200000000034c000, 81920, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 
0x240000) = 0x200000000034c000
close(3)                                = 0
open("/lib/tls/libpthread.so.0", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0002\0\1\0\0\0\0m\0\0"..., 640) = 640
fstat(3, {st_mode=S_IFREG|0755, st_size=150704, ...}) = 0
mmap(NULL, 180584, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x2000000000360000
mprotect(0x2000000000378000, 82280, PROT_NONE) = 0
mmap(0x2000000000380000, 49152, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 
0x10000) = 0x2000000000380000
mmap(0x200000000038c000, 360, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_AN
ONYMOUS, -1, 0) = 0x200000000038c000
close(3)                                = 0
mmap(NULL, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x20
00000000030000
mmap(NULL, 32768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x20
00000000390000
mmap(NULL, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x20
00000000034000
mmap(NULL, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x20
00000000398000
mprotect(0x4000000000000000, 59179008, PROT_READ|PROT_WRITE) = 0
mmap(NULL, 327680, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2
00000000039c000
mmap(NULL, 32768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x20
000000003ec000
writev(2, [{"/opt/fwtmp/lvp/nielsen/orchid_da"..., 99}, {": ", 2}, {"relocation 
error", 16}, {": ", 2}, {"/opt/fwtmp/lvp/nielsen/orchid_da"..., 99}, {": ", 2}, 
{"symbol _dl_loaded, version GLIBC"..., 100}, {"", 0}, {"", 0}, {"\n", 1}], 10/o
pt/fwtmp/lvp/nielsen/orchid_data/setups/calibre_drc/install/iil_cal_2003.4_9/pkg
s/icv/pvt/calibre: relocation error: /opt/fwtmp/lvp/nielsen/orchid_data/setups/c
alibre_drc/install/iil_cal_2003.4_9/pkgs/icv/pvt/calibre: symbol _dl_loaded, ver
sion GLIBC_2.2 not defined in file ld-linux-ia64.so.2 with link time reference
) = 321
exit_group(127)                         = ?

Don't have the sources of course, cause it's commercial
software. Nonetheless i think it should run. Don't know,
if that stuff works on RedHat Enterprise 2.1 for ia64,
sorry.

Probably i could send the binary, but it's 86 Meg in size (!!!)
There's another binary from the same manufacturer, which is
'only' 6.7 Meg and has the same problem. Would it help to have
that program available ?

Version-Release number of selected component (if applicable):
glibc-2.3.2-69 glibc-2.3.2-77 through 

How reproducible:
see above

Steps to Reproduce:
1. see above
2.
3.
    
Actual results:
software does not start

Expected results:
software runs


Additional info:
Comment 1 Jakub Jelinek 2003-08-28 08:11:52 EDT
The problem is that that software tries to use glibc private symbols, which
is a big no no.
You can try building a custom preload shared library which will define
dummy _dl_loaded if the app doesn't mind that it is NULL.
But, certainly the program should be changed to use the supported API for
querying loaded libraries (dl_iterate_phdr).
Comment 2 Albert Fluegel 2003-08-28 11:52:01 EDT
Thanks for the hints. Produced a .so that defines
_dl_loaded returning 0 in 64 Bits loading it using
LD_PRELOAD. The software starts now, but i don't
know, if it's really doing what it should. Enduser
has to test that. Thanks a lot !

Note You need to log in before you can comment on or make changes to this bug.