Bug 91141
Summary: | telnet segfaults with LD_LIBRARY_PATH=. | ||||||
---|---|---|---|---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Pádraig Brady <p> | ||||
Component: | glibc | Assignee: | Jakub Jelinek <jakub> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Brian Brock <bbrock> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 9 | CC: | fweimer, harald | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | i686 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2003-10-28 10:17:06 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Pádraig Brady
2003-05-19 12:16:22 UTC
$ LD_LIBRARY_PATH=. telnet 127.0.0.1 6000 Trying 127.0.0.1... Connected to localhost.localdomain (127.0.0.1). Escape character is '^]'. ^] telnet> quit Connection closed. You might sent the infos printed by: $ LD_DEBUG=files LD_LIBRARY_PATH=. telnet 127.0.0.1 6000 It happens on 2 different rh9 installations here. rh9 beta on my laptop doesn't have the problem. Interestingly adding LD_DEBUG=files causes the problem to "go away"! output from LD_DEBUG follows: file=libutil.so.1; needed by telnet file=libutil.so.1; generating link map dynamic: 0x4002f998 base: 0x4002d000 size: 0x00002b28 entry: 0x4002de20 phdr: 0x4002d034 phnum: 6 file=libncurses.so.5; needed by telnet file=libncurses.so.5; generating link map dynamic: 0x4006daa0 base: 0x40030000 size: 0x0003e84c entry: 0x4003e1c0 phdr: 0x40030034 phnum: 3 file=libc.so.6; needed by telnet file=libc.so.6; generating link map dynamic: 0x42130920 base: 0x00000000 size: 0x00132f08 entry: 0x42015660 phdr: 0x42000034 phnum: 8 calling init: /lib/tls/libc.so.6 calling init: /usr/lib/libncurses.so.5 calling init: /lib/libutil.so.1 initialize program: telnet transferring control: telnet file=libnss_files.so.2; generating link map dynamic: 0x4007b434 base: 0x40070000 size: 0x0000b7dc entry: 0x40071d10 phdr: 0x40070034 phnum: 6 calling init: /lib/libnss_files.so.2 opening file=/lib/libnss_files.so.2; opencount == 1 why do you need LD_LIBRARY_PATH=. anyway? Created attachment 91788 [details]
strace diff
crashing version on left
That LD_LIBRARY_PATH was just a trigger. One of the developers noticed it here with other LD_LIBRARY_PATHS. Trying out other LD_LIBRARY_PATHS shows: no crash for: / /lib anything/a /anything crash for: /usr /usr/lib anything Hmm the crashing version (according to strace) does also interact with /var/run/.nscd_socket for some reason? sdiff of straces above seems like this is more likely a loader bug in glibc, reassigning Repeat after bugzilla reload: This is not a bug. The symbols _init and _fini like all symbols starting with _ (with a few documented exceptions) are reserved. The correct way to do what you want is to use the mechanism clearly documented in the gcc manual, namely using the constructor and destructor function attributes. No bug. Comment made for the wrong bug. Reopen. Curse this disk error. We did fix a problem recently which might be responsible for this crash. If you can install and run Fedora Core, give the current glibc-2.3.2-99 a try. I expect that the change will also be in an glibc errate for RHL9 when there is one, but this doesn't exist yet. I could reproduce the problem on redhat 9 with glibc-2.3.2-27.9 I just installed fedora which had glibc-2.3.2-98 and I couldn't reproduce the problem. |