[Bug gdb/24454] New: nat/x86-linux-dregs.c:146: internal-error: void x86_linux_update_debug_registers(lwp_info*): Assertion `lwp_is_stopped (lwp)' failed.

vries at gcc dot gnu.org sourceware-bugzilla@sourceware.org
Mon Apr 15 11:30:00 GMT 2019


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

            Bug ID: 24454
           Summary: nat/x86-linux-dregs.c:146: internal-error: void
                    x86_linux_update_debug_registers(lwp_info*): Assertion
                    `lwp_is_stopped (lwp)' failed.
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

[ This is most likely a duplicate of PR21051. Filing it separately to prevent
obfuscating original PR. ]

Using gdb build from HEAD of today (2019-04-15):
...
$ git show -s --pretty="%h %s"
8669f96f0d Automatic date update in version.in
...

Terminal 1:
...
$ ./gdb /usr/bin/sleep 
...

Terminal 2:
...
$ ./gdb -p $(ps -u $USER | grep gdb | awk '{print $1}')
...

Terminal 3:
...
$ ./gdb -p $(ps -u $USER | grep gdb | awk '{print $1}' | tail -n 1)
(gdb) continue
Continuing.
...

Terminal 2:
...
(gdb) set follow-fork-mode child
(gdb) continue
Continuing.
...

Terminal 1:
...
(gdb) run
Starting program: /usr/bin/sleep 
warning: Could not trace the inferior process.
Error: 
warning: ptrace: Action is not allowed
...

Terminal 2:
...
[Attaching after Thread 0x7fd9945c9ac0 (LWP 15665) vfork to child process
15722]
[New inferior 2 (process 15722)]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[Detaching vfork parent process 15665 after child exit]
/data/gdb_versions/devel/src/gdb/nat/x86-linux-dregs.c:146: internal-error:
void x86_linux_update_debug_registers(lwp_info*): Assertion `lwp_is_stopped
(lwp)' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n)
...

Terminal 3:
...
^C
Thread 1 "gdb" received signal SIGINT, Interrupt.
0x00007f8c2181807b in poll () from /lib64/libc.so.6
(gdb) bt
#0  0x00007f8c2181807b in poll () from /lib64/libc.so.6
#1  0x000000000061bebb in gdb_wait_for_event (block=1) at gdb/event-loop.c:770
#2  0x000000000061b2c2 in gdb_do_one_event () at gdb/event-loop.c:347
#3  0x00000000008caf14 in gdb_readline_wrapper (
    prompt=0x3363230 "gdb/nat/x86-linux-dregs.c:146: internal-error: void
x86_linux_update_debug_registers(lwp_info*): Assertion `lwp_is_stopped (lwp)'
failed.\nA problem internal to GDB has bee"...) at gdb/top.c:1004
#4  0x00000000009278c1 in defaulted_query(const char *, char, typedef
__va_list_tag __va_list_tag *) (
    ctlstr=0xc66b68 "%s\nQuit this debugging session? ", defchar=0 '\000',
args=0x7ffec3aca140)
    at gdb/utils.c:894
#5  0x0000000000927c79 in query (ctlstr=0xc66b68 "%s\nQuit this debugging
session? ")
    at gdb/utils.c:986
#6  0x0000000000926a39 in internal_vproblem(internal_problem *, const char *,
int, const char *, typedef __va_list_tag __va_list_tag *) (problem=0x11ac940
<internal_error_problem>, 
    file=0xbf4fd8 "gdb/nat/x86-linux-dregs.c", line=146, 
    fmt=0xbf4faa "%s: Assertion `%s' failed.", ap=0x7ffec3aca348) at
gdb/utils.c:370
#7  0x0000000000926ccc in internal_verror (
    file=0xbf4fd8 "gdb/nat/x86-linux-dregs.c", line=146, 
    fmt=0xbf4faa "%s: Assertion `%s' failed.", ap=0x7ffec3aca348) at
gdb/utils.c:436
#8  0x0000000000512f45 in internal_error (
    file=0xbf4fd8 "gdb/nat/x86-linux-dregs.c", line=146, 
    fmt=0xbf4faa "%s: Assertion `%s' failed.") at gdb/common/errors.c:55
#9  0x000000000076667c in x86_linux_update_debug_registers (lwp=0x3378ac0)
    at gdb/nat/x86-linux-dregs.c:146
#10 0x000000000076688d in x86_linux_prepare_to_resume (lwp=0x3378ac0)
    at gdb/nat/x86-linux.c:81
#11 0x000000000044c3f6 in x86_linux_nat_target::low_prepare_to_resume
(this=0x11bd5b0 <the_amd64_linux_nat_target>, lwp=0x3378ac0) at
gdb/x86-linux-nat.h:69
#12 0x00000000006f2661 in detach_one_lwp (lp=0x3378ac0, signo_p=0x0) at
gdb/linux-nat.c:1406
#13 0x00000000006f2951 in detach_callback (lp=0x3378ac0) at
gdb/linux-nat.c:1464
#14 0x00000000006fa7bc in gdb::function_view<int (lwp_info*)>::bind<int,
lwp_info*>(int (*)(lwp_info*))::{lambda(gdb::fv_detail::erased_callable,
lwp_info*)#1}::operator()(gdb::fv_detail::erased_callable, lwp_info*) const
(__closure=0x0, ecall=..., args#0=0x3378ac0) at gdb/common/function-view.h:284
#15 0x00000000006fa7e3 in gdb::function_view<int (lwp_info*)>::bind<int,
lwp_info*>(int (*)(lwp_info*))::{lambda(gdb::fv_detail::erased_callable,
lwp_info*)#1}::_FUN(gdb::fv_detail::erased_callable, lwp_info*) () at
gdb/common/function-view.h:278
#16 0x00000000006fa676 in gdb::function_view<int
(lwp_info*)>::operator()(lwp_info*) const (this=0x7ffec3aca650,
args#0=0x3378ac0) at gdb/common/function-view.h:247
#17 0x00000000006f1760 in iterate_over_lwps(ptid_t, gdb::function_view<int
(lwp_info*)>) (filter=..., callback=...) at gdb/linux-nat.c:972
#18 0x00000000006f2a8e in linux_nat_target::detach (this=0x11bd5b0
<the_amd64_linux_nat_target>, inf=0x334c5e0, from_tty=0) at
gdb/linux-nat.c:1484
#19 0x0000000000709a21 in thread_db_target::detach (this=0x11a1978
<the_thread_db_target>, inf=0x334c5e0, from_tty=0) at
gdb/linux-thread-db.c:1364
#20 0x00000000008a9742 in target_detach (inf=0x334c5e0, from_tty=0) at
gdb/target.c:2038
#21 0x00000000006b9c44 in handle_vfork_child_exec_or_exit (exec=0) at
gdb/infrun.c:985
#22 0x00000000006c16b9 in handle_inferior_event (ecs=0x7ffec3acab80) at
gdb/infrun.c:4830
#23 0x00000000006bf204 in fetch_inferior_event (client_data=0x0) at
gdb/infrun.c:3748
#24 0x00000000006a6e8c in inferior_event_handler (event_type=INF_REG_EVENT,
client_data=0x0) at gdb/inf-loop.c:43
#25 0x00000000006f9218 in handle_target_event (error=0, client_data=0x0) at
gdb/linux-nat.c:4355
#26 0x000000000061be10 in handle_file_event (file_ptr=0x5393160, ready_mask=1)
at gdb/event-loop.c:732
#27 0x000000000061c3b3 in gdb_wait_for_event (block=0) at gdb/event-loop.c:858
#28 0x000000000061b24e in gdb_do_one_event () at gdb/event-loop.c:322
#29 0x000000000061b2ec in start_event_loop () at gdb/event-loop.c:371
#30 0x000000000071df7f in captured_command_loop () at gdb/main.c:331
#31 0x000000000071f3e2 in captured_main (data=0x7ffec3acaef0) at
gdb/main.c:1173
#32 0x000000000071f473 in gdb_main (args=0x7ffec3acaef0) at gdb/main.c:1188
#33 0x000000000040fcde in main (argc=3, argv=0x7ffec3acaff8) at gdb/gdb.c:32
...

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


More information about the Gdb-prs mailing list