public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/2328] _dl_debug_state() RT_CONSISTENT called too early
       [not found] <bug-2328-131@http.sourceware.org/bugzilla/>
@ 2011-03-13 10:16 ` jan.kratochvil at redhat dot com
  2011-05-12  3:09 ` drepper.fsp at gmail dot com
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 22+ messages in thread
From: jan.kratochvil at redhat dot com @ 2011-03-13 10:16 UTC (permalink / raw)
  To: glibc-bugs

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

Jan Kratochvil <jan.kratochvil at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |12575

-- 
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.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug libc/2328] _dl_debug_state() RT_CONSISTENT called too early
       [not found] <bug-2328-131@http.sourceware.org/bugzilla/>
  2011-03-13 10:16 ` [Bug libc/2328] _dl_debug_state() RT_CONSISTENT called too early jan.kratochvil at redhat dot com
@ 2011-05-12  3:09 ` drepper.fsp at gmail dot com
  2011-05-17 13:13 ` gbenson at redhat dot com
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 22+ messages in thread
From: drepper.fsp at gmail dot com @ 2011-05-12  3:09 UTC (permalink / raw)
  To: glibc-bugs

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

Bug 2328 depends on bug 12575, which changed state.

Bug 12575 Summary: dlopen RTLD_NOW does not apply to GNU-IFUNCs
http://sourceware.org/bugzilla/show_bug.cgi?id=12575

           What    |Old Value                   |New Value
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WORKSFORME

-- 
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.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug libc/2328] _dl_debug_state() RT_CONSISTENT called too early
       [not found] <bug-2328-131@http.sourceware.org/bugzilla/>
  2011-03-13 10:16 ` [Bug libc/2328] _dl_debug_state() RT_CONSISTENT called too early jan.kratochvil at redhat dot com
  2011-05-12  3:09 ` drepper.fsp at gmail dot com
@ 2011-05-17 13:13 ` gbenson at redhat dot com
  2011-08-11 11:39 ` jan.kratochvil at redhat dot com
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 22+ messages in thread
From: gbenson at redhat dot com @ 2011-05-17 13:13 UTC (permalink / raw)
  To: glibc-bugs

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

Gary Benson <gbenson at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gbenson at redhat dot com

-- 
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.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug libc/2328] _dl_debug_state() RT_CONSISTENT called too early
       [not found] <bug-2328-131@http.sourceware.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2011-05-17 13:13 ` gbenson at redhat dot com
@ 2011-08-11 11:39 ` jan.kratochvil at redhat dot com
  2011-08-11 12:13 ` gbenson at redhat dot com
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 22+ messages in thread
From: jan.kratochvil at redhat dot com @ 2011-08-11 11:39 UTC (permalink / raw)
  To: glibc-bugs

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

Jan Kratochvil <jan.kratochvil at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |ASSIGNED

--- Comment #7 from Jan Kratochvil <jan.kratochvil at redhat dot com> 2011-08-11 11:38:42 UTC ---
(In reply to comment #6)
> The breakpoint could be added into the appropriate code in the dynamic linker
> (i.e., the place calling the constructor for the object.  That code is
> already relocated.

Such breakpoint is put there by the SystemTap probes, as implemented by Gary
Benson for glibc + gdb.

> It is wrong to change the semantics of RT_CONSISTENT.

This patch does not do so.

> And I think it is a bad approach trying to extend this strange interface

Neither this one.

> If we need more state information it is better to expose some APIs.  We have
> libthread_db, maybe we need librtld_db as well.

These SystemTap probes are such alternative interface but SystemTap probes
were never replied to in the mailing list:
        merging roland/systemtap branch
        http://sourceware.org/ml/libc-alpha/2011-03/msg00001.html

> If we'd have a specification of what information of the implementation gdb
> currently contains and what it still wants we can design such a library.

SystemTap probes work well for this purpose.

> I guess I am waiting for gdb people to provide this information.

This patch contains the needed features.

-- 
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.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug libc/2328] _dl_debug_state() RT_CONSISTENT called too early
       [not found] <bug-2328-131@http.sourceware.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2011-08-11 11:39 ` jan.kratochvil at redhat dot com
@ 2011-08-11 12:13 ` gbenson at redhat dot com
  2011-08-16 15:10 ` gbenson at redhat dot com
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 22+ messages in thread
From: gbenson at redhat dot com @ 2011-08-11 12:13 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #8 from Gary Benson <gbenson at redhat dot com> 2011-08-11 12:11:47 UTC ---
Created attachment 5895
  --> http://sourceware.org/bugzilla/attachment.cgi?id=5895
Proposed patch for Fedora

To elaborate on Jan's comment above, this is the fix we are proposing for
Fedora.  It adds a new function, _dl_debug_notify, which is called wherever
_dl_debug_state was previously called, and in a couple of other places.  For
backwards compatibility, _dl_debug_notify calls _dl_debug_state whenever it was
previously called, so applications using _dl_debug_state will see no change.
The new interface is in the form of a number of SystemTap probes in
_dl_debug_notify which applications can locate and set breakpoints on if
necessary.  The new interface has the following advantages over the existing
one:

* Applications using the new interface have much more control over the events
they are notified about.  They can set breakpoints or whatever on the probes of
interest and ignore probes that are not of interest.

* Applications using the new interface are able to be notified about other
events than the ones supported by the existing interface.  Currently there are
two new events, for the start and end of object relocation, but the interface
is extensible in the sense that new probes can be added for other events of
interest.

* Applications using the new interface can handle libraries loaded into
namespaces other than the default, eg with dlmopen.  Under the existing
interface _dl_debug_state is called but the data structure for the namespace
(with the list of loaded libraries) is unavailable.  This allows, for example,
for a fix to bug 11839.

In addition to the addition of new probes, the new interface is also extensible
in the sense that new arguments may be added to existing probes without
breaking compatibility.

-- 
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.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug libc/2328] _dl_debug_state() RT_CONSISTENT called too early
       [not found] <bug-2328-131@http.sourceware.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2011-08-11 12:13 ` gbenson at redhat dot com
@ 2011-08-16 15:10 ` gbenson at redhat dot com
  2012-02-21  1:21 ` [Bug ld.so|libdl/2328] " jsm28 at gcc dot gnu.org
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 22+ messages in thread
From: gbenson at redhat dot com @ 2011-08-16 15:10 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #9 from Gary Benson <gbenson at redhat dot com> 2011-08-16 15:10:13 UTC ---
(In reply to comment #6)
> If we need more state information it is better to expose some APIs.  We have
> libthread_db, maybe we need librtld_db as well.  If we'd have a specification
> of what information of the implementation gdb currently contains and what it
> still wants we can design such a library.
> 
> I guess I am waiting for gdb people to provide this information.

What gdb needs is not so much more information per se as more (and more
finely-grained notifications).  I would say as a minimum a new interface should
allow debuggers to do everything that the existing interface does, so the new
interface needs to be able to notify the debugger at every point the existing
interface does.  Then, to be able to fix this particular issue (which
incidentally prevents gdb from being able to debug programs that dlopen
libpthread) we need a notification after relocation is complete -- basically in
the location John Reiser proposed moving the RT_CONSISTENT notification to.  In
the probes-based interface I proposed I also added a notification before
relocation occurs, for symmetry with all the other notifications which all have
before and after versions.

We also need the ability to be able to enable and disable the various
notifications.  In the probes-based interface this is done on the gdb side:
each notification has its own address, so debuggers can install breakpoints on
only the set of notifications they care about.  Another way to do this would be
to have one breakpoint address but calls into glibc to enable/disable the
various notifications individually.  I didn't go down that route as it would
mean debuggers altering the controlled program more than necessary, but it's
not unfeasable.

Also, to allow debugging of programs that use dlmopen the interface needs to
provide some way for debuggers to inspect namespaces other than the default. 
The existing interface only exposes the initial namespace so any others are
effectively invisible.

Finally, it is desirable to minimise the amount of data than needs to flow
between the inferior and the debugger, as this has performance issues when
debugging applications with large numbers of shared libraries, especially when
debugging remotely.  The probes-based interface as it stands does not do this
yet, but it could be extended to do so without breaking compatibility.

-- 
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.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug ld.so|libdl/2328] _dl_debug_state() RT_CONSISTENT called too early
       [not found] <bug-2328-131@http.sourceware.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2011-08-16 15:10 ` gbenson at redhat dot com
@ 2012-02-21  1:21 ` jsm28 at gcc dot gnu.org
  2012-06-27  9:58 ` [Bug dynamic-link/2328] " gbenson at redhat dot com
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 22+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2012-02-21  1:21 UTC (permalink / raw)
  To: glibc-bugs

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

Joseph Myers <jsm28 at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|libc                        |ld.so|libdl

-- 
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.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug dynamic-link/2328] _dl_debug_state() RT_CONSISTENT called too early
       [not found] <bug-2328-131@http.sourceware.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2012-02-21  1:21 ` [Bug ld.so|libdl/2328] " jsm28 at gcc dot gnu.org
@ 2012-06-27  9:58 ` gbenson at redhat dot com
  2012-06-27  9:59 ` gbenson at redhat dot com
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 22+ messages in thread
From: gbenson at redhat dot com @ 2012-06-27  9:58 UTC (permalink / raw)
  To: glibc-bugs

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

Gary Benson <gbenson at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #5895|0                           |1
        is obsolete|                            |

-- 
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.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug dynamic-link/2328] _dl_debug_state() RT_CONSISTENT called too early
       [not found] <bug-2328-131@http.sourceware.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2012-06-27  9:58 ` [Bug dynamic-link/2328] " gbenson at redhat dot com
@ 2012-06-27  9:59 ` gbenson at redhat dot com
  2012-06-27 10:03 ` gbenson at redhat dot com
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 22+ messages in thread
From: gbenson at redhat dot com @ 2012-06-27  9:59 UTC (permalink / raw)
  To: glibc-bugs

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

Gary Benson <gbenson at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |14298

-- 
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.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug dynamic-link/2328] _dl_debug_state() RT_CONSISTENT called too early
       [not found] <bug-2328-131@http.sourceware.org/bugzilla/>
                   ` (8 preceding siblings ...)
  2012-06-27  9:59 ` gbenson at redhat dot com
@ 2012-06-27 10:03 ` gbenson at redhat dot com
  2012-07-27 13:07 ` gbenson at redhat dot com
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 22+ messages in thread
From: gbenson at redhat dot com @ 2012-06-27 10:03 UTC (permalink / raw)
  To: glibc-bugs

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

Gary Benson <gbenson at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|drepper.fsp at gmail dot    |gbenson at redhat dot com
                   |com                         |

--- Comment #10 from Gary Benson <gbenson at redhat dot com> 2012-06-27 10:03:01 UTC ---
The tracker for the glibc side of this is bug 14298.

-- 
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.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug dynamic-link/2328] _dl_debug_state() RT_CONSISTENT called too early
       [not found] <bug-2328-131@http.sourceware.org/bugzilla/>
                   ` (9 preceding siblings ...)
  2012-06-27 10:03 ` gbenson at redhat dot com
@ 2012-07-27 13:07 ` gbenson at redhat dot com
  2013-06-06  8:39 ` gbenson at redhat dot com
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 22+ messages in thread
From: gbenson at redhat dot com @ 2012-07-27 13:07 UTC (permalink / raw)
  To: glibc-bugs

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

Bug 2328 depends on bug 14298, which changed state.

Bug 14298 Summary: Add static probes to runtime linker
http://sourceware.org/bugzilla/show_bug.cgi?id=14298

           What    |Old Value                   |New Value
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

-- 
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.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug dynamic-link/2328] _dl_debug_state() RT_CONSISTENT called too early
       [not found] <bug-2328-131@http.sourceware.org/bugzilla/>
                   ` (10 preceding siblings ...)
  2012-07-27 13:07 ` gbenson at redhat dot com
@ 2013-06-06  8:39 ` gbenson at redhat dot com
  2013-06-13  9:51 ` gbenson at redhat dot com
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 22+ messages in thread
From: gbenson at redhat dot com @ 2013-06-06  8:39 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #11 from Gary Benson <gbenson at redhat dot com> ---
The GDB side of this interface was committed here:
http://cygwin.com/ml/gdb-patches/2013-06/msg00046.html

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug dynamic-link/2328] _dl_debug_state() RT_CONSISTENT called too early
       [not found] <bug-2328-131@http.sourceware.org/bugzilla/>
                   ` (11 preceding siblings ...)
  2013-06-06  8:39 ` gbenson at redhat dot com
@ 2013-06-13  9:51 ` gbenson at redhat dot com
  2014-02-16 19:35 ` jackie.rosen at hushmail dot com
  2014-05-28 19:47 ` schwab at sourceware dot org
  14 siblings, 0 replies; 22+ messages in thread
From: gbenson at redhat dot com @ 2013-06-13  9:51 UTC (permalink / raw)
  To: glibc-bugs

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

Gary Benson <gbenson at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #12 from Gary Benson <gbenson at redhat dot com> ---
Fixed with this glibc commit:
http://cygwin.com/ml/libc-alpha/2012-07/msg00557.html

and this GDB commit:
http://cygwin.com/ml/gdb-patches/2013-06/msg00046.html

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug dynamic-link/2328] _dl_debug_state() RT_CONSISTENT called too early
       [not found] <bug-2328-131@http.sourceware.org/bugzilla/>
                   ` (12 preceding siblings ...)
  2013-06-13  9:51 ` gbenson at redhat dot com
@ 2014-02-16 19:35 ` jackie.rosen at hushmail dot com
  2014-05-28 19:47 ` schwab at sourceware dot org
  14 siblings, 0 replies; 22+ messages in thread
From: jackie.rosen at hushmail dot com @ 2014-02-16 19:35 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=2328

Jackie Rosen <jackie.rosen at hushmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jackie.rosen at hushmail dot com

--- Comment #13 from Jackie Rosen <jackie.rosen at hushmail dot com> ---
*** Bug 260998 has been marked as a duplicate of this bug. ***
Seen from the domain http://volichat.com
Page where seen: http://volichat.com/adult-chat-rooms
Marked for reference. Resolved as fixed @bugzilla.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug dynamic-link/2328] _dl_debug_state() RT_CONSISTENT called too early
       [not found] <bug-2328-131@http.sourceware.org/bugzilla/>
                   ` (13 preceding siblings ...)
  2014-02-16 19:35 ` jackie.rosen at hushmail dot com
@ 2014-05-28 19:47 ` schwab at sourceware dot org
  14 siblings, 0 replies; 22+ messages in thread
From: schwab at sourceware dot org @ 2014-05-28 19:47 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=2328

Andreas Schwab <schwab at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|jackie.rosen at hushmail dot com   |

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug libc/2328] _dl_debug_state() RT_CONSISTENT called too early
  2006-02-11 19:22 [Bug libc/2328] New: " jreiser at BitWagon dot com
                   ` (5 preceding siblings ...)
  2009-11-21  3:10 ` jreiser at BitWagon dot com
@ 2010-04-30 16:03 ` drepper at redhat dot com
  6 siblings, 0 replies; 22+ messages in thread
From: drepper at redhat dot com @ 2010-04-30 16:03 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From drepper at redhat dot com  2010-04-30 16:03 -------
(In reply to comment #5)
> "Nothing should prevent you inserting breakpoints before relocation, ..." 
> Except that in general, being subject to future relocation *does* prevent
> inserting breakpoints.

The breakpoint could be added into the appropriate code in the dynamic linker
(i.e., the place calling the constructor for the object.  That code is already
relocated.

It is wrong to change the semantics of RT_CONSISTENT.  And I think it is a bad
approach trying to extend this strange interface with the debugger by adding a
RT_RUNNABLE state (I made up the name) for when the relocation happened, too. 
If we need more state information it is better to expose some APIs.  We have
libthread_db, maybe we need librtld_db as well.  If we'd have a specification of
what information of the implementation gdb currently contains and what it still
wants we can design such a library.

I guess I am waiting for gdb people to provide this information.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |WAITING


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug libc/2328] _dl_debug_state() RT_CONSISTENT called too early
  2006-02-11 19:22 [Bug libc/2328] New: " jreiser at BitWagon dot com
                   ` (4 preceding siblings ...)
  2009-11-21  0:26 ` roland at gnu dot org
@ 2009-11-21  3:10 ` jreiser at BitWagon dot com
  2010-04-30 16:03 ` drepper at redhat dot com
  6 siblings, 0 replies; 22+ messages in thread
From: jreiser at BitWagon dot com @ 2009-11-21  3:10 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From jreiser at BitWagon dot com  2009-11-21 03:10 -------
"Nothing should prevent you inserting breakpoints before relocation, ..." 
Except that in general, being subject to future relocation *does* prevent
inserting breakpoints.  Particularly in the case of RISC with multi-byte
breakpoint opcode (such as SPARC), if the intended location of a breakpoint is
also relocated then it is essential to perform the relocation before inserting
the breakpoint.  Even in the case of CISC with a single-byte breakpoint opcode
(such as x86 and x86_64), the "code" could be directly threaded (a list of
addresses), and inserting a breakpoint [by overwriting more than one byte] would
require changing something that is subject to later relocation.


-- 


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug libc/2328] _dl_debug_state() RT_CONSISTENT called too early
  2006-02-11 19:22 [Bug libc/2328] New: " jreiser at BitWagon dot com
                   ` (3 preceding siblings ...)
  2009-11-19  9:56 ` jan dot kratochvil at redhat dot com
@ 2009-11-21  0:26 ` roland at gnu dot org
  2009-11-21  3:10 ` jreiser at BitWagon dot com
  2010-04-30 16:03 ` drepper at redhat dot com
  6 siblings, 0 replies; 22+ messages in thread
From: roland at gnu dot org @ 2009-11-21  0:26 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From roland at gnu dot org  2009-11-21 00:26 -------
It occurs to me that now that we have STT_GNU_IFUNC, there is DSO code that can
run during the relocation phase (if LD_BIND_NOW).  So perhaps we really should
not break after relocation, but still before.

The debugger can always put a breakpoint on the DSO's initializer function if it
wants.  With init_array this could be a bunch of breakpoints to add, but it's
doable.  Nothing should prevent you inserting breakpoints before relocation,
which is what this is really for.

Having libthread_db be happy at certain points is really a different story and
should not be misconstrued as an authentic driver for the ld.so breakpoint behavior.

-- 


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug libc/2328] _dl_debug_state() RT_CONSISTENT called too early
  2006-02-11 19:22 [Bug libc/2328] New: " jreiser at BitWagon dot com
                   ` (2 preceding siblings ...)
  2009-11-19  0:31 ` roland at gnu dot org
@ 2009-11-19  9:56 ` jan dot kratochvil at redhat dot com
  2009-11-21  0:26 ` roland at gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 22+ messages in thread
From: jan dot kratochvil at redhat dot com @ 2009-11-19  9:56 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From jan dot kratochvil at redhat dot com  2009-11-19 09:56 -------
(In reply to comment #2)
> Someone might want to test where the RT_CONSISTENT breakpoint happens in
> relation to relocation on Solaris.

Verified by Paul Pluzhnikov
https://bugzilla.redhat.com/show_bug.cgi?id=179072#c15
I can't find official documentation for RT_CONSISTENT,
but Solaris (from which this interface is copied) AFAICT calls 
_dl_debug_state() (or rather its Solaris equivalent) at (B):
http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/cmd/sgs/rtld/common/setup.c#1028
[ (B) = after relocations and before initializers ]


> AFAICT the RT_CONSISTENT state is purely about the state of the r_debug.r_map
> list and all those pointers.  It says you can get the list of objects mapped
> in core now, that is all.

There is just no easy way for debugger how to catch the later point - after the
relocations got resolved.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ppluzhnikov at google dot
                   |                            |com


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug libc/2328] _dl_debug_state() RT_CONSISTENT called too early
  2006-02-11 19:22 [Bug libc/2328] New: " jreiser at BitWagon dot com
  2006-09-20 17:38 ` [Bug libc/2328] " jreiser at BitWagon dot com
  2009-10-27 12:13 ` jan dot kratochvil at redhat dot com
@ 2009-11-19  0:31 ` roland at gnu dot org
  2009-11-19  9:56 ` jan dot kratochvil at redhat dot com
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 22+ messages in thread
From: roland at gnu dot org @ 2009-11-19  0:31 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From roland at gnu dot org  2009-11-19 00:30 -------
I'm not at all sure this change would be right.  Someone might want to test
where the RT_CONSISTENT breakpoint happens in relation to relocation on Solaris.

AFAICT the RT_CONSISTENT state is purely about the state of the r_debug.r_map
list and all those pointers.  It says you can get the list of objects mapped in
core now, that is all.

It might be OK to move RT_CONSISTENT to after relocation, but we should be
cautious about that.  It's been as it is for a very long time.

How best to make GDB and libthread_db startup work right is really another question.

-- 


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug libc/2328] _dl_debug_state() RT_CONSISTENT called too early
  2006-02-11 19:22 [Bug libc/2328] New: " jreiser at BitWagon dot com
  2006-09-20 17:38 ` [Bug libc/2328] " jreiser at BitWagon dot com
@ 2009-10-27 12:13 ` jan dot kratochvil at redhat dot com
  2009-11-19  0:31 ` roland at gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 22+ messages in thread
From: jan dot kratochvil at redhat dot com @ 2009-10-27 12:13 UTC (permalink / raw)
  To: glibc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jan dot kratochvil at redhat
                   |                            |dot com


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug libc/2328] _dl_debug_state() RT_CONSISTENT called too early
  2006-02-11 19:22 [Bug libc/2328] New: " jreiser at BitWagon dot com
@ 2006-09-20 17:38 ` jreiser at BitWagon dot com
  2009-10-27 12:13 ` jan dot kratochvil at redhat dot com
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 22+ messages in thread
From: jreiser at BitWagon dot com @ 2006-09-20 17:38 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From jreiser at BitWagon dot com  2006-09-20 17:38 -------
Created an attachment (id=1309)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=1309&action=view)
call .r_brk just before _dl_init

Daniel Jacobowitz (CodeSourcery) requested an explicit separate patch for this
one case.

-- 


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2014-05-28 19:46 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-2328-131@http.sourceware.org/bugzilla/>
2011-03-13 10:16 ` [Bug libc/2328] _dl_debug_state() RT_CONSISTENT called too early jan.kratochvil at redhat dot com
2011-05-12  3:09 ` drepper.fsp at gmail dot com
2011-05-17 13:13 ` gbenson at redhat dot com
2011-08-11 11:39 ` jan.kratochvil at redhat dot com
2011-08-11 12:13 ` gbenson at redhat dot com
2011-08-16 15:10 ` gbenson at redhat dot com
2012-02-21  1:21 ` [Bug ld.so|libdl/2328] " jsm28 at gcc dot gnu.org
2012-06-27  9:58 ` [Bug dynamic-link/2328] " gbenson at redhat dot com
2012-06-27  9:59 ` gbenson at redhat dot com
2012-06-27 10:03 ` gbenson at redhat dot com
2012-07-27 13:07 ` gbenson at redhat dot com
2013-06-06  8:39 ` gbenson at redhat dot com
2013-06-13  9:51 ` gbenson at redhat dot com
2014-02-16 19:35 ` jackie.rosen at hushmail dot com
2014-05-28 19:47 ` schwab at sourceware dot org
2006-02-11 19:22 [Bug libc/2328] New: " jreiser at BitWagon dot com
2006-09-20 17:38 ` [Bug libc/2328] " jreiser at BitWagon dot com
2009-10-27 12:13 ` jan dot kratochvil at redhat dot com
2009-11-19  0:31 ` roland at gnu dot org
2009-11-19  9:56 ` jan dot kratochvil at redhat dot com
2009-11-21  0:26 ` roland at gnu dot org
2009-11-21  3:10 ` jreiser at BitWagon dot com
2010-04-30 16:03 ` drepper at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).