public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/13653] New: ~"inferior.c:61: internal-error: set_current_inferior: Assertion `inf != NULL' failed.
@ 2012-02-02 14:33 tamas at eisenberger dot hu
  2012-02-02 14:34 ` [Bug c++/13653] " tamas at eisenberger dot hu
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: tamas at eisenberger dot hu @ 2012-02-02 14:33 UTC (permalink / raw)
  To: gdb-prs

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

             Bug #: 13653
           Summary: ~"inferior.c:61: internal-error: set_current_inferior:
                    Assertion `inf != NULL' failed.
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned@sourceware.org
        ReportedBy: tamas@eisenberger.hu
    Classification: Unclassified


Created attachment 6189
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6189
the end of "gdb traces" from eclipse

Hy,

I have a problem while debugging a project with gdb trough eclipse..

I use gdb 7.3, but tested and got the same results with today's cvs version
(2012.02.02)

This is basically a forking tcp server, but each forked process runs about four
external binaries..
After the first session closes, and a new one opened gdb crashes.

Attached the output from eclipse's "gdb traces" window..

Sadly I can't give out the sources I'm working on, but can help you debug the
problem..

Thanks!

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

* [Bug c++/13653] ~"inferior.c:61: internal-error: set_current_inferior: Assertion `inf != NULL' failed.
  2012-02-02 14:33 [Bug c++/13653] New: ~"inferior.c:61: internal-error: set_current_inferior: Assertion `inf != NULL' failed tamas at eisenberger dot hu
@ 2012-02-02 14:34 ` tamas at eisenberger dot hu
  2012-02-02 15:19 ` tromey at redhat dot com
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: tamas at eisenberger dot hu @ 2012-02-02 14:34 UTC (permalink / raw)
  To: gdb-prs

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

Eisenberger Tamás <tamas at eisenberger dot hu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tamas at eisenberger dot hu

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

* [Bug c++/13653] ~"inferior.c:61: internal-error: set_current_inferior: Assertion `inf != NULL' failed.
  2012-02-02 14:33 [Bug c++/13653] New: ~"inferior.c:61: internal-error: set_current_inferior: Assertion `inf != NULL' failed tamas at eisenberger dot hu
  2012-02-02 14:34 ` [Bug c++/13653] " tamas at eisenberger dot hu
@ 2012-02-02 15:19 ` tromey at redhat dot com
  2012-02-02 16:29 ` tamas at eisenberger dot hu
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: tromey at redhat dot com @ 2012-02-02 15:19 UTC (permalink / raw)
  To: gdb-prs

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

Tom Tromey <tromey at redhat dot com> changed:

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

--- Comment #1 from Tom Tromey <tromey at redhat dot com> 2012-02-02 15:19:16 UTC ---
This isn't enough information to easily reproduce the bug.
Maybe a stack trace from the crashing gdb would help,
could you get that?

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

* [Bug c++/13653] ~"inferior.c:61: internal-error: set_current_inferior: Assertion `inf != NULL' failed.
  2012-02-02 14:33 [Bug c++/13653] New: ~"inferior.c:61: internal-error: set_current_inferior: Assertion `inf != NULL' failed tamas at eisenberger dot hu
  2012-02-02 14:34 ` [Bug c++/13653] " tamas at eisenberger dot hu
  2012-02-02 15:19 ` tromey at redhat dot com
@ 2012-02-02 16:29 ` tamas at eisenberger dot hu
  2012-02-02 17:04 ` tamas at eisenberger dot hu
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: tamas at eisenberger dot hu @ 2012-02-02 16:29 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #2 from Eisenberger Tamás <tamas at eisenberger dot hu> 2012-02-02 16:28:54 UTC ---
Well, I can't reproduce this without eclipse, so I'll have to attach to the gdb
process eclipse starts..

I'll try to do that, but a good example of doing such would be helpful.
Should I use the same (currently HEAD compiled with -g -O0) gdb to debug, and
be debugged?

P.S.:
Thanks for the fast reply!

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

* [Bug c++/13653] ~"inferior.c:61: internal-error: set_current_inferior: Assertion `inf != NULL' failed.
  2012-02-02 14:33 [Bug c++/13653] New: ~"inferior.c:61: internal-error: set_current_inferior: Assertion `inf != NULL' failed tamas at eisenberger dot hu
                   ` (2 preceding siblings ...)
  2012-02-02 16:29 ` tamas at eisenberger dot hu
@ 2012-02-02 17:04 ` tamas at eisenberger dot hu
  2012-02-03 22:45 ` tamas at eisenberger dot hu
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: tamas at eisenberger dot hu @ 2012-02-02 17:04 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #3 from Eisenberger Tamás <tamas at eisenberger dot hu> 2012-02-02 17:03:55 UTC ---
Created attachment 6192
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6192
gdb backtrace

Well... here is a bt (actually the entire top-gdb session)
if you need any more info, please tell me!

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

* [Bug c++/13653] ~"inferior.c:61: internal-error: set_current_inferior: Assertion `inf != NULL' failed.
  2012-02-02 14:33 [Bug c++/13653] New: ~"inferior.c:61: internal-error: set_current_inferior: Assertion `inf != NULL' failed tamas at eisenberger dot hu
                   ` (3 preceding siblings ...)
  2012-02-02 17:04 ` tamas at eisenberger dot hu
@ 2012-02-03 22:45 ` tamas at eisenberger dot hu
  2012-02-03 22:46 ` tamas at eisenberger dot hu
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: tamas at eisenberger dot hu @ 2012-02-03 22:45 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #4 from Eisenberger Tamás <tamas at eisenberger dot hu> 2012-02-03 22:45:08 UTC ---
Hey, I've managed to reproduce this in a minimal test case :)

Will attach the test-program's source, and a sample top-gdb session..

So, when using target-async and non-stop..
The problem occurs after the child process breaks, continues, then exits and
gdb keept on it's inferior.. then the parent process forks an other child.

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

* [Bug c++/13653] ~"inferior.c:61: internal-error: set_current_inferior: Assertion `inf != NULL' failed.
  2012-02-02 14:33 [Bug c++/13653] New: ~"inferior.c:61: internal-error: set_current_inferior: Assertion `inf != NULL' failed tamas at eisenberger dot hu
                   ` (4 preceding siblings ...)
  2012-02-03 22:45 ` tamas at eisenberger dot hu
@ 2012-02-03 22:46 ` tamas at eisenberger dot hu
  2012-02-03 22:47 ` tamas at eisenberger dot hu
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: tamas at eisenberger dot hu @ 2012-02-03 22:46 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #5 from Eisenberger Tamás <tamas at eisenberger dot hu> 2012-02-03 22:46:03 UTC ---
Created attachment 6196
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6196
gdb-killer.cpp

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

* [Bug c++/13653] ~"inferior.c:61: internal-error: set_current_inferior: Assertion `inf != NULL' failed.
  2012-02-02 14:33 [Bug c++/13653] New: ~"inferior.c:61: internal-error: set_current_inferior: Assertion `inf != NULL' failed tamas at eisenberger dot hu
                   ` (5 preceding siblings ...)
  2012-02-03 22:46 ` tamas at eisenberger dot hu
@ 2012-02-03 22:47 ` tamas at eisenberger dot hu
  2012-02-07 17:07 ` tromey at redhat dot com
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: tamas at eisenberger dot hu @ 2012-02-03 22:47 UTC (permalink / raw)
  To: gdb-prs

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

Eisenberger Tamás <tamas at eisenberger dot hu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #6189|0                           |1
        is obsolete|                            |
   Attachment #6192|0                           |1
        is obsolete|                            |

--- Comment #6 from Eisenberger Tamás <tamas at eisenberger dot hu> 2012-02-03 22:47:02 UTC ---
Created attachment 6197
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6197
gdb backtrace

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

* [Bug c++/13653] ~"inferior.c:61: internal-error: set_current_inferior: Assertion `inf != NULL' failed.
  2012-02-02 14:33 [Bug c++/13653] New: ~"inferior.c:61: internal-error: set_current_inferior: Assertion `inf != NULL' failed tamas at eisenberger dot hu
                   ` (6 preceding siblings ...)
  2012-02-03 22:47 ` tamas at eisenberger dot hu
@ 2012-02-07 17:07 ` tromey at redhat dot com
  2012-02-16 14:36 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: tromey at redhat dot com @ 2012-02-07 17:07 UTC (permalink / raw)
  To: gdb-prs

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

Tom Tromey <tromey at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at sourceware    |tromey at redhat dot com
                   |dot org                     |

--- Comment #7 from Tom Tromey <tromey at redhat dot com> 2012-02-07 17:06:48 UTC ---
The bug here is that do_restore_current_thread_cleanup tries
to switch back to an inferior that has been deleted.

I have a patch that fixes this problem by instead picking an
arbitrary inferior to switch to if the saved inferior no longer
exists.

I'll submit it to gdb-patches once testing is done.

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

* [Bug c++/13653] ~"inferior.c:61: internal-error: set_current_inferior: Assertion `inf != NULL' failed.
  2012-02-02 14:33 [Bug c++/13653] New: ~"inferior.c:61: internal-error: set_current_inferior: Assertion `inf != NULL' failed tamas at eisenberger dot hu
                   ` (7 preceding siblings ...)
  2012-02-07 17:07 ` tromey at redhat dot com
@ 2012-02-16 14:36 ` cvs-commit at gcc dot gnu.org
  2012-02-16 14:39 ` tromey at redhat dot com
  2012-02-16 17:36 ` tamas at eisenberger dot hu
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2012-02-16 14:36 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #8 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> 2012-02-16 14:35:08 UTC ---
CVSROOT:    /cvs/src
Module name:    src
Changes by:    tromey@sourceware.org    2012-02-16 14:35:00

Modified files:
    gdb            : ChangeLog thread.c 
    gdb/testsuite  : ChangeLog 
Added files:
    gdb/testsuite/gdb.base: inferior-died.c inferior-died.exp 

Log message:
    PR c++/13653:
    * thread.c (struct current_thread_cleanup) <was_removable>: New
    field.
    (do_restore_current_thread_cleanup): Restore 'removable' field.
    (restore_current_thread_cleanup_dtor): Likewise.
    (make_cleanup_restore_current_thread): Initialize new field.
    testsuite/gdb
    * gdb.base/inferior-died.c: New file.
    * gdb.base/inferior-died.exp: New file.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.13834&r2=1.13835
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/thread.c.diff?cvsroot=src&r1=1.144&r2=1.145
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/ChangeLog.diff?cvsroot=src&r1=1.3074&r2=1.3075
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.base/inferior-died.c.diff?cvsroot=src&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.base/inferior-died.exp.diff?cvsroot=src&r1=NONE&r2=1.1

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

* [Bug c++/13653] ~"inferior.c:61: internal-error: set_current_inferior: Assertion `inf != NULL' failed.
  2012-02-02 14:33 [Bug c++/13653] New: ~"inferior.c:61: internal-error: set_current_inferior: Assertion `inf != NULL' failed tamas at eisenberger dot hu
                   ` (8 preceding siblings ...)
  2012-02-16 14:36 ` cvs-commit at gcc dot gnu.org
@ 2012-02-16 14:39 ` tromey at redhat dot com
  2012-02-16 17:36 ` tamas at eisenberger dot hu
  10 siblings, 0 replies; 12+ messages in thread
From: tromey at redhat dot com @ 2012-02-16 14:39 UTC (permalink / raw)
  To: gdb-prs

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

Tom Tromey <tromey at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |7.5

--- Comment #9 from Tom Tromey <tromey at redhat dot com> 2012-02-16 14:38:53 UTC ---
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] 12+ messages in thread

* [Bug c++/13653] ~"inferior.c:61: internal-error: set_current_inferior: Assertion `inf != NULL' failed.
  2012-02-02 14:33 [Bug c++/13653] New: ~"inferior.c:61: internal-error: set_current_inferior: Assertion `inf != NULL' failed tamas at eisenberger dot hu
                   ` (9 preceding siblings ...)
  2012-02-16 14:39 ` tromey at redhat dot com
@ 2012-02-16 17:36 ` tamas at eisenberger dot hu
  10 siblings, 0 replies; 12+ messages in thread
From: tamas at eisenberger dot hu @ 2012-02-16 17:36 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #10 from Eisenberger Tamás <tamas at eisenberger dot hu> 2012-02-16 17:35:42 UTC ---
Thanks! I can confirm that the bug is gone (using the original code I faced
this first)

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

end of thread, other threads:[~2012-02-16 17:36 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-02 14:33 [Bug c++/13653] New: ~"inferior.c:61: internal-error: set_current_inferior: Assertion `inf != NULL' failed tamas at eisenberger dot hu
2012-02-02 14:34 ` [Bug c++/13653] " tamas at eisenberger dot hu
2012-02-02 15:19 ` tromey at redhat dot com
2012-02-02 16:29 ` tamas at eisenberger dot hu
2012-02-02 17:04 ` tamas at eisenberger dot hu
2012-02-03 22:45 ` tamas at eisenberger dot hu
2012-02-03 22:46 ` tamas at eisenberger dot hu
2012-02-03 22:47 ` tamas at eisenberger dot hu
2012-02-07 17:07 ` tromey at redhat dot com
2012-02-16 14:36 ` cvs-commit at gcc dot gnu.org
2012-02-16 14:39 ` tromey at redhat dot com
2012-02-16 17:36 ` tamas at eisenberger dot hu

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