public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/12203] New: gdb internal error "infrun.c:2455" after trying to create realtime thread on Linux
@ 2010-11-08 17:45 Matthias.Gerstner at esolutions dot de
  2010-11-09 13:34 ` [Bug gdb/12203] " pedro at codesourcery dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Matthias.Gerstner at esolutions dot de @ 2010-11-08 17:45 UTC (permalink / raw)
  To: gdb-prs

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

           Summary: gdb internal error "infrun.c:2455" after trying to
                    create realtime thread on Linux
           Product: gdb
           Version: 7.0
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
        AssignedTo: unassigned@sourceware.org
        ReportedBy: Matthias.Gerstner@esolutions.de


Created attachment 5115
  --> http://sourceware.org/bugzilla/attachment.cgi?id=5115
test program to reproduce the crash

Hello!

I've run into a problem with GDB when the debugged application attempts to
create a realtime thread on Linux e.g. with SCHED_RR as scheduler. If that
operation fails due to missing priveleges (i.e. EPERM is returned from
pthread_create()) then few instructions later gdb crashes with this:

-----
infrun.c:2455: internal-error: handle_inferior_event: Assertion `inf' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) 
-----

The crash is pretty much always reproducable but seems not to be deterministic.
I.e. it doesn't always occur at the same time and place but is subject
differences in runtime. So it's probably caused by some parallel thread or
something.

When the same program is run as root then everything is fine (pthread_create()
doesn't return with EPERM in that case).

My system is a Gentoo Linux running "GNU gdb (Gentoo 7.0.1 p1) 7.0.1". I was
able to reproduce the crash also on a Ubuntu Linux running a somewhat newer
gdb. The problem does *not* occur an older gdb like "GNU gdb 6.8" on my Gentoo
system.

I've attached a small test program that is able to reproduce the crash if you
set a breakpoint in main and step through until a few lines after the call to
pthread_create(). Again this only works if you don't have the priveleges to
create the thread.

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

end of thread, other threads:[~2012-07-20 17:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-08 17:45 [Bug gdb/12203] New: gdb internal error "infrun.c:2455" after trying to create realtime thread on Linux Matthias.Gerstner at esolutions dot de
2010-11-09 13:34 ` [Bug gdb/12203] " pedro at codesourcery dot com
2010-11-09 15:12 ` Matthias.Gerstner at esolutions dot de
2010-11-11 18:28 ` pedro at codesourcery dot com
2012-07-20 17:27 ` cvs-commit at gcc dot gnu.org
2012-07-20 17:34 ` palves 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).