Bug 658851
Summary: | _dl_debug_state() RT_CONSISTENT called too early | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 5 | Reporter: | Siddhesh Poyarekar <spoyarek> | |
Component: | gdb | Assignee: | Jan Kratochvil <jan.kratochvil> | |
Status: | CLOSED ERRATA | QA Contact: | qe-baseos-tools-bugs | |
Severity: | medium | Docs Contact: | ||
Priority: | medium | |||
Version: | 5.5 | CC: | drepper, gbenson, jakub, jan.kratochvil, jreiser, masao-takahashi, mattdm, mnewsome, mpolacek, ppluzhnikov, sundaram, tmraz, tromey | |
Target Milestone: | rc | Keywords: | Reopened | |
Target Release: | --- | |||
Hardware: | All | |||
OS: | Linux | |||
Whiteboard: | bzcl34nup | |||
Fixed In Version: | gdb-7.0.1-42.el5 | Doc Type: | Bug Fix | |
Doc Text: |
This text has been already reviewed for RHEL-6.2 Bug 669432:
https://errata.devel.redhat.com/errata/edit/11694
|
Story Points: | --- | |
Clone Of: | 179072 | |||
: | 669432 711924 (view as bug list) | Environment: | ||
Last Closed: | 2012-02-21 06:12:49 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: | ||||
Bug Depends On: | 179072, 711924 | |||
Bug Blocks: | 669432 |
Description
Siddhesh Poyarekar
2010-12-01 13:55:03 UTC
Implementation plan: http://sources.redhat.com/bugzilla/show_bug.cgi?id=2328#c4 suggests GDB `stop-on-solib-events' should stop before STT_GNU_IFUNC entries. But those are currently never resolved during solib load, filed: http://sources.redhat.com/bugzilla/show_bug.cgi?id=12575 If the PR 12575 gets fixed then GDB should put a breakpoint also at the first STT_GNU_IFUNC entry. Without the PR 12575 fix the general GDB implementation plan is the same, just the first STT_GNU_IFUNC entry breakpoint would never get used. Without fixing PR 12575 it would be IMO best to fix this whole issues at the glibc side to make its behavior compatible with the original Solaris linker as described at http://sources.redhat.com/bugzilla/show_bug.cgi?id=2328#c3 But such change has been rejected for glibc-to-glibc compatibility reasons in http://sources.redhat.com/bugzilla/show_bug.cgi?id=2328#c6 and after fixing PR 12575 it would no longer be useful anyway. For the case -Wl,-z,now/RTLD_NOW/LD_BIND_NOW is not in effect the breakpoint should be put at DT_INIT or the first entry of DT_INIT_ARRAY, as called by glibc `call_init'. A single breakpoint on first such entry point is enough. If there is no DT_INIT/DT_INIT_ARRAY then GDB should stop straight at `_dl_debug_state'. GDB needs to consider all the newly found solibs as `_dl_debug_state' does not provide which solib(s) has/have been loaded during RT_ADD. It would be much simpler and quicker for all involved (glibc, gdb, other "auditors" of runtime loading, existing apps, ...) to extend the RT_CONSISTENT enum with another state such as the RT_RUNNABLE suggested in http://sources.redhat.com/bugzilla/show_bug.cgi?id=2328#c6, and then call _dl_debug_state() with RT_RUNNABLE just before _dl_init(). I would rather see something simple that works soon than endure more delay which may be encountered by implementing and adapting to complicated solutions, especially ones may have to deal with interactions from another utility (prelinking). The differing important visible state at RT_CONSISTENT between Solaris and Linux (whether relocations have been done or not) suggests that extending the enum should be allowed. This request was evaluated by Red Hat Product Management for inclusion in Red Hat Enterprise Linux 5.7 and Red Hat does not plan to fix this issue the currently developed update. Contact your manager or support representative in case you need to escalate this bug. Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: This text has been already reviewed for RHEL-6.2 Bug 669432: https://errata.devel.redhat.com/errata/edit/11694 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2012-0238.html |