public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug threads/11593] New: mi-nsmoribund.exp: unexpected stop
@ 2010-05-12 13:12 jan dot kratochvil at redhat dot com
  2010-05-12 13:13 ` [Bug threads/11593] " jan dot kratochvil at redhat dot com
  0 siblings, 1 reply; 2+ messages in thread
From: jan dot kratochvil at redhat dot com @ 2010-05-12 13:12 UTC (permalink / raw)
  To: gdb-prs

at least on Fedora kernels (tested kernel-2.6.32.12-116.fc12.x86_64) ptrace
implemented on top of utrace gdb.mi/mi-nsmoribund.exp randomly FAILs:
        FAIL: gdb.mi/mi-nsmoribund.exp: unexpected stop

It is due to moribund breakpoint location being retired too early.

Unaware if it happens with legacy ptrace implementation, it probably does not.
utrace has been optimized for the best parallelization for maximum performance
on multicore systems while still maintaining full ptrace backward
compatibility.

In the attached new debug messages instrumentated debug dump one can see
LWP 12856 has been still running the time "-break-delete" has been executed,
then (too) many stop-and-continue operations happened for other LWPs and only
then LWP 12856 finally reported SIGTRAP having already its moribund breakpoint
location retired.

Any increased value of this expression cannot help to fix the bug:
              old_loc->events_till_retirement = 3 * (thread_count () + 1);

I believe to safely retire moribunds each existing thread must get into 
(a) !is_executing() state and 
(b) all its events must get processed.

The (b) requirement may cause moribunds to be never retired during some 
debugging situations.  Also unaware how to find the (b) point now,
stop_and_resume_callback is needlessly expensive.

-- 
           Summary: mi-nsmoribund.exp: unexpected stop
           Product: gdb
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: threads
        AssignedTo: unassigned at sourceware dot org
        ReportedBy: jan dot kratochvil at redhat dot com
                CC: gdb-prs at sourceware dot org,pedro at codesourcery dot
                    com
GCC target triplet: x86_64-fedora12-linux-gnu


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

------- 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] 2+ messages in thread

* [Bug threads/11593] mi-nsmoribund.exp: unexpected stop
  2010-05-12 13:12 [Bug threads/11593] New: mi-nsmoribund.exp: unexpected stop jan dot kratochvil at redhat dot com
@ 2010-05-12 13:13 ` jan dot kratochvil at redhat dot com
  0 siblings, 0 replies; 2+ messages in thread
From: jan dot kratochvil at redhat dot com @ 2010-05-12 13:13 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From jan dot kratochvil at redhat dot com  2010-05-12 13:13 -------
Created an attachment (id=4784)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4784&action=view)
gdb.log dump


-- 


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

------- 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] 2+ messages in thread

end of thread, other threads:[~2010-05-12 13:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-12 13:12 [Bug threads/11593] New: mi-nsmoribund.exp: unexpected stop jan dot kratochvil at redhat dot com
2010-05-12 13:13 ` [Bug threads/11593] " jan dot kratochvil 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).