[Bug gdb/12203] New: gdb internal error "infrun.c:2455" after trying to create realtime thread on Linux

Matthias.Gerstner at esolutions dot de sourceware-bugzilla@sourceware.org
Mon Nov 8 17:45:00 GMT 2010


           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


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

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

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.

More information about the Gdb-prs mailing list