public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug threads/17207] New: internal error on "c -a &": Assertion `lp != NULL' failed.
@ 2014-07-27 20:07 xdje42 at gmail dot com
  2014-07-27 20:09 ` [Bug threads/17207] " xdje42 at gmail dot com
  2014-07-28  2:12 ` xdje42 at gmail dot com
  0 siblings, 2 replies; 3+ messages in thread
From: xdje42 at gmail dot com @ 2014-07-27 20:07 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 17207
           Summary: internal error on "c -a &": Assertion `lp != NULL'
                    failed.
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: threads
          Assignee: unassigned at sourceware dot org
          Reporter: xdje42 at gmail dot com

Trying some additions to the testcase for my interrupt command fix (pr 14236) I
hit an internal error, repro'd with clean HEAD.

--snip---foo.gdb
set trace-commands on
set height 0
set width 0
dir ../../../interrupt/gdb/testsuite/gdb.threads
file /hack/build/interrupt/obj64/gdb/testsuite/gdb.threads/interrupt-command
set non-stop on
delete breakpoints
info breakpoints
break main
run
break all_threads_running
continue
info threads
set var test_thread_creation_p = 1
c &
info thread 1
c -a &
---snip---

bash$ ./gdb -D ./data-directory <foo.gdb
GNU gdb (GDB) 7.8.50.20140727-cvs
...
Type "apropos word" to search for commands related to "word".
(gdb) (gdb) (gdb) +set height 0
(gdb) +set width 0
(gdb) +dir ../../../interrupt/gdb/testsuite/gdb.threads
Warning:
/hack/build/interrupt/obj64/gdb/../../../interrupt/gdb/testsuite/gdb.threads:
No such file or directory.
Source directories searched:
/hack/build/interrupt/obj64/gdb/../../../interrupt/gdb/testsuite/gdb.threads:$cdir:$cwd
(gdb) +file
/hack/build/interrupt/obj64/gdb/testsuite/gdb.threads/interrupt-command
Reading symbols from
/hack/build/interrupt/obj64/gdb/testsuite/gdb.threads/interrupt-command...done.
(gdb) +set non-stop on
(gdb) +delete breakpoints
(gdb) +info breakpoints
No breakpoints or watchpoints.
(gdb) +break main
Breakpoint 1 at 0x4007a6: file
../../../interrupt/gdb/testsuite/gdb.threads/interrupt-command.c, line 98.
(gdb) +run
Starting program:
/hack/build/interrupt/obj64/gdb/testsuite/gdb.threads/interrupt-command
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Breakpoint 1, main (argc=1, argv=0x7fffffffe218) at
../../../interrupt/gdb/testsuite/gdb.threads/interrupt-command.c:98
98        alarm (60);
(gdb) +break all_threads_running
Breakpoint 2 at 0x400795: file
../../../interrupt/gdb/testsuite/gdb.threads/interrupt-command.c, line 91.
(gdb) +continue
Continuing.
[New Thread 0x7ffff7fcb700 (LWP 20395)]
[New Thread 0x7ffff777a700 (LWP 20396)]
[New Thread 0x7ffff6f29700 (LWP 20397)]
[New Thread 0x7ffff66d8700 (LWP 20398)]

Breakpoint 2, all_threads_running () at
../../../interrupt/gdb/testsuite/gdb.threads/interrupt-command.c:91
91      }
(gdb) +info threads
  Id   Target Id         Frame
  5    Thread 0x7ffff66d8700 (LWP 20398) "interrupt-comma" (running)
  4    Thread 0x7ffff6f29700 (LWP 20397) "interrupt-comma" (running)
  3    Thread 0x7ffff777a700 (LWP 20396) "interrupt-comma" (running)
  2    Thread 0x7ffff7fcb700 (LWP 20395) "interrupt-comma" (running)
* 1    Thread 0x7ffff7fcc740 (LWP 20391) "interrupt-comma" all_threads_running
() at ../../../interrupt/gdb/testsuite/gdb.threads/interrupt-command.c:91
(gdb) +set var test_thread_creation_p = 1
(gdb) +c &
Continuing.
(gdb) [New Thread 0x7ffff4de5700 (LWP 20400)]
[New Thread 0x7ffff5e87700 (LWP 20402)]
+info thread 1
[New Thread 0x7ffff5636700 (LWP 20401)]
[New Thread 0x7ffff4594700 (LWP 20399)]
  Id   Target Id         Frame
* 1    Thread 0x7ffff7fcc740 (LWP 20391) "interrupt-comma" (running)
(gdb) +c -a &
Continuing.
../../binutils-gdb/gdb/linux-nat.c:1751: internal-error: linux_nat_resume:
Assertion `lp != NULL' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.

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


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

* [Bug threads/17207] internal error on "c -a &": Assertion `lp != NULL' failed.
  2014-07-27 20:07 [Bug threads/17207] New: internal error on "c -a &": Assertion `lp != NULL' failed xdje42 at gmail dot com
@ 2014-07-27 20:09 ` xdje42 at gmail dot com
  2014-07-28  2:12 ` xdje42 at gmail dot com
  1 sibling, 0 replies; 3+ messages in thread
From: xdje42 at gmail dot com @ 2014-07-27 20:09 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #1 from Doug Evans <xdje42 at gmail dot com> ---
Created attachment 7728
  --> https://sourceware.org/bugzilla/attachment.cgi?id=7728&action=edit
testcase

testcase is a work-in-progress, but is sufficient to repro the bug

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


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

* [Bug threads/17207] internal error on "c -a &": Assertion `lp != NULL' failed.
  2014-07-27 20:07 [Bug threads/17207] New: internal error on "c -a &": Assertion `lp != NULL' failed xdje42 at gmail dot com
  2014-07-27 20:09 ` [Bug threads/17207] " xdje42 at gmail dot com
@ 2014-07-28  2:12 ` xdje42 at gmail dot com
  1 sibling, 0 replies; 3+ messages in thread
From: xdje42 at gmail dot com @ 2014-07-28  2:12 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #2 from Doug Evans <xdje42 at gmail dot com> ---
Data point: The thread is in thread_list but not lwp_list.
We iterate over all threads in thread_list, fail to find it in lwp_list, and
boom.

Time to have just one copy of the list.  Ideally.

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


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

end of thread, other threads:[~2014-07-28  2:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-27 20:07 [Bug threads/17207] New: internal error on "c -a &": Assertion `lp != NULL' failed xdje42 at gmail dot com
2014-07-27 20:09 ` [Bug threads/17207] " xdje42 at gmail dot com
2014-07-28  2:12 ` xdje42 at gmail 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).