This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug record/22368] Assertion failure during recorded execution


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

--- Comment #2 from astian at elude dot in ---
Here's a transcript of a debug build of GDB 8.0.50.20171029-git debugging
another instance of itself while the bug is triggered:

  $ ~/src/gdb/build/gdb/gdb --data-directory ~/src/gdb/build/gdb/data-directory
-ex 'add-auto-load-safe-path ~/src/gdb/build/gdb/gdb-gdb.gdb' -ex 'set
pagination off' -ex 'file ~/src/gdb/build/gdb/gdb' -ex 'run --data-directory
~/src/gdb/build/gdb/data-directory -q -x /tmp/rv.gdb'
  GNU gdb (GDB) 8.0.50.20171029-git
  Copyright (C) 2017 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
  This is free software: you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
  and "show warranty" for details.
  This GDB was configured as "x86_64-pc-linux-gnu".
  Type "show configuration" for configuration details.
  For bug reporting instructions, please see:
  <http://www.gnu.org/software/gdb/bugs/>.
  Find the GDB manual and other documentation resources online at:
  <http://www.gnu.org/software/gdb/documentation/>.
  For help, type "help".
  Type "apropos word" to search for commands related to "word".
  Reading symbols from ~/src/gdb/build/gdb/gdb...done.
  Setting up the environment for debugging gdb.
  During symbol reading, unsupported tag: 'DW_TAG_unspecified_type'.
  Breakpoint 1 at 0x23bee7: file
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/common/errors.c, line 51.
  During symbol reading, const value length mismatch for 'std::ratio<1,
1000000000>::num', got 8, expected 0.
  During symbol reading, cannot get low and high bounds for subprogram DIE at
5383969.
  During symbol reading, Child DIE 0x5379df and its abstract origin 0x53ea06
have different parents.
  During symbol reading, DIE 0x540b48 and its abstract origin 0x53d20b have
different tags.
  During symbol reading, DW_AT_call_target target DIE has invalid low pc, for
referencing DIE 0x5448a7 [in module /home/astian/src/gdb/build/gdb/gdb].
  Breakpoint 2 at 0x113eb8: file
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/cli/cli-cmds.c, line 214.
  Starting program: /home/astian/src/gdb/build/gdb/gdb --data-directory
~/src/gdb/build/gdb/data-directory -q -x /tmp/rv.gdb
  [Thread debugging using libthread_db enabled]
  Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
  Temporary breakpoint 1 at 0x163aa: file remote-viewer-main.c, line 35.
  [Thread debugging using libthread_db enabled]
  Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

  Temporary breakpoint 1, main (argc=2, argv=0x7fffffffe1e8) at
remote-viewer-main.c:35
  35    {
  Breakpoint 2 at 0x555555570ac4: file virt-viewer-app.c, line 1811.
  [New Thread 0x7fffe18cf700 (LWP 30603)]
  [New Thread 0x7fffe10ce700 (LWP 30604)]

  Thread 1 "remote-viewer" hit Breakpoint 2,
virt_viewer_app_on_application_startup (app=0x5555557f2300) at
virt-viewer-app.c:1811
  1811  {

  Breakpoint 1, internal_error (During symbol reading, incomplete CFI data;
unspecified registers (e.g., rax) at 0x55555578feee.
  During symbol reading, unsupported tag: 'DW_TAG_unspecified_type'.
  During symbol reading, const value length mismatch for 'std::ratio<1,
1000000000>::num', got 8, expected 0.
  During symbol reading, Child DIE 0x22bc781 and its abstract origin 0x22c6c36
have different parents.
  During symbol reading, cannot get low and high bounds for subprogram DIE at
36440152.
  file=file@entry=0x555555a67068
"/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/record-full.c",
line=line@entry=1050, fmt=0x5555559a849f "%s: Assertion `%s' failed.") at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/common/errors.c:51
  51    {
  (top-gdb) bt
  #0  internal_error (file=file@entry=0x555555a67068
"/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/record-full.c",
line=line@entry=1050, fmt=0x5555559a849f "%s: Assertion `%s' failed.") at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/common/errors.c:51
  #1  0x0000555555828a31 in record_full_wait_1 (During symbol reading, DIE
0x25d29d9 and its abstract origin 0x25cab35 have different tags.
  ops=0x555555ece680 <record_full_ops>, ptid=...,
status=status@entry=0x7fffffffd7b0, options=0) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/record-full.c:1050
  #2  0x00005555558295e5 in record_full_wait (ops=<optimized out>, ptid=...,
status=0x7fffffffd7b0, options=<optimized out>) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/record-full.c:1330
  #3  0x000055555585e907 in delegate_wait (self=<optimized out>, arg1=...,
arg2=<optimized out>, arg3=<optimized out>) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/target-delegates.c:138
  #4  0x000055555586cd9d in target_wait (During symbol reading, Member function
"~displaced_step_closure" (offset 30910879) is virtual but the vtable offset is
not specified.
  During symbol reading, DW_AT_call_target target DIE has invalid low pc, for
referencing DIE 0x1d8a856 [in module /home/astian/src/gdb/build/gdb/gdb].
  During symbol reading, Child DIE 0x1d94d41 and its abstract origin 0x1d95953
have different tags.
  ptid=..., status=status@entry=0x7fffffffd7b0, options=options@entry=0) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/target.c:2179
  #5  0x00005555557d0f25 in wait_one (ws=ws@entry=0x7fffffffd7b0) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/infrun.c:4345
  #6  0x00005555557d5599 in stop_all_threads () at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/infrun.c:4558
  #7  0x00005555557d599e in stop_waiting (ecs=ecs@entry=0x7fffffffdc50) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/infrun.c:7658
  #8  0x00005555557d59b7 in end_stepping_range (ecs=ecs@entry=0x7fffffffdc50)
at /home/astian/src/gdb/gdb-8.0.50.20171029/gdb/infrun.c:7838
  #9  0x00005555557d8c6f in process_event_stop_test
(ecs=ecs@entry=0x7fffffffdc50) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/infrun.c:6979
  #10 0x00005555557d9d67 in handle_signal_stop (ecs=ecs@entry=0x7fffffffdc50)
at /home/astian/src/gdb/gdb-8.0.50.20171029/gdb/infrun.c:6189
  #11 0x00005555557daf50 in handle_inferior_event_1
(ecs=ecs@entry=0x7fffffffdc50) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/infrun.c:5378
  #12 0x00005555557db061 in handle_inferior_event
(ecs=ecs@entry=0x7fffffffdc50) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/infrun.c:5413
  #13 0x00005555557db663 in fetch_inferior_event
(client_data=client_data@entry=0x0) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/infrun.c:3927
  #14 0x00005555557c554e in inferior_event_handler
(event_type=event_type@entry=INF_REG_EVENT, client_data=client_data@entry=0x0)
at /home/astian/src/gdb/gdb-8.0.50.20171029/gdb/inf-loop.c:43
  #15 0x0000555555825e45 in record_full_async_inferior_event_handler
(data=<optimized out>) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/record-full.c:769
  #16 0x0000555555796384 in check_async_event_handlers () at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/event-loop.c:1064
  #17 0x0000555555796ef8 in gdb_do_one_event () at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/event-loop.c:326
  During symbol reading, Multiple children of DIE 0x26da14a refer to DIE
0x26da13a as their abstract origin.
  #18 0x000055555587f0b5 in wait_sync_command_done () at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/top.c:505
  #19 0x000055555587f104 in maybe_wait_sync_command_done (was_sync=<optimized
out>, was_sync@entry=0) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/top.c:522
  #20 0x000055555587f2f1 in execute_command (p=<optimized out>,
p@entry=0x55555610f440 "next", from_tty=0) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/top.c:610
  #21 0x0000555555797f6f in command_handler (command=0x55555610f440 "next") at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/event-top.c:583
  #22 0x000055555587fa3f in read_command_file (During symbol reading, No
DW_FORM_block* DW_AT_call_value for DW_TAG_call_site child DIE 0x5cd91f [in
module /home/astian/src/gdb/build/gdb/gdb].
  stream=stream@entry=0x5555560c4a80) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/top.c:426
  #23 0x0000555555672318 in script_from_file (stream=0x5555560c4a80,
file=<optimized out>) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/cli/cli-script.c:1582
  #24 0x0000555555666f10 in source_script_from_stream (stream=0x5555560c4a80,
file=0x7fffffffe558 "/tmp/rv.gdb", file_to_open=<optimized out>) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/cli/cli-cmds.c:596
  #25 0x00005555556699d5 in source_script_with_search (file=0x7fffffffe558
"/tmp/rv.gdb", from_tty=1, search_path=0) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/cli/cli-cmds.c:632
  #26 0x0000555555669ab3 in source_script (file=file@entry=0x7fffffffe558
"/tmp/rv.gdb", from_tty=from_tty@entry=1) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/cli/cli-cmds.c:642
  #27 0x00005555557f0939 in catch_command_errors (command=0x555555669aa5
<source_script(char const*, int)>, arg=0x7fffffffe558 "/tmp/rv.gdb",
from_tty=1) at /home/astian/src/gdb/gdb-8.0.50.20171029/gdb/main.c:405
  #28 0x00005555557f1983 in captured_main_1
(context=context@entry=0x7fffffffe0d0) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/main.c:1116
  #29 0x00005555557f1abe in captured_main (data=data@entry=0x7fffffffe0d0) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/main.c:1142
  #30 0x00005555557f1b63 in gdb_main (args=0x7fffffffe0d0) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/main.c:1168
  #31 0x00005555555fbe85 in main (argc=<optimized out>, argv=<optimized out>)
at /home/astian/src/gdb/gdb-8.0.50.20171029/gdb/gdb.c:32
  (top-gdb) c
  Continuing.
  /home/astian/src/gdb/gdb-8.0.50.20171029/gdb/record-full.c:1050:
internal-error: ptid_t record_full_wait_1(target_ops*, ptid_t,
target_waitstatus*, int): Assertion `(options & TARGET_WNOHANG) != 0' failed.
  A problem internal to GDB has been detected,
  further debugging may prove unreliable.
  Quit this debugging session? (y or n) [answered Y; input not from terminal]

  This is a bug, please report it.  For instructions, see:
  <http://www.gnu.org/software/gdb/bugs/>.

  /home/astian/src/gdb/gdb-8.0.50.20171029/gdb/record-full.c:1050:
internal-error: ptid_t record_full_wait_1(target_ops*, ptid_t,
target_waitstatus*, int): Assertion `(options & TARGET_WNOHANG) != 0' failed.
  A problem internal to GDB has been detected,
  further debugging may prove unreliable.
  Create a core file of GDB? (y or n) [answered Y; input not from terminal]

  Program received signal SIGABRT, Aborted.
  0x00007ffff6318fff in raise () from /lib/x86_64-linux-gnu/libc.so.6
  (top-gdb) bt
  #0  0x00007ffff6318fff in raise () from /lib/x86_64-linux-gnu/libc.so.6
  #1  0x00007ffff631a42a in abort () from /lib/x86_64-linux-gnu/libc.so.6
  #2  0x0000555555883855 in dump_core () at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/utils.c:282
  #3  0x0000555555886e20 in internal_vproblem(internal_problem *, const char *,
int, const char *, typedef __va_list_tag __va_list_tag *)
(problem=problem@entry=0x555555ea8820 <internal_error_problem>, file=<optimized
out>, line=1050, fmt=<optimized out>, ap=<optimized out>) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/utils.c:491
  #4  0x0000555555886fa5 in internal_verror (file=<optimized out>,
line=<optimized out>, fmt=<optimized out>, ap=<optimized out>) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/utils.c:516
  #5  0x000055555578ff69 in internal_error (file=file@entry=0x555555a67068
"/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/record-full.c",
line=line@entry=1050, fmt=<optimized out>) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/common/errors.c:55
  #6  0x0000555555828a31 in record_full_wait_1 (ops=0x555555ece680
<record_full_ops>, ptid=..., status=status@entry=0x7fffffffd7b0, options=0) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/record-full.c:1050
  #7  0x00005555558295e5 in record_full_wait (ops=<optimized out>, ptid=...,
status=0x7fffffffd7b0, options=<optimized out>) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/record-full.c:1330
  #8  0x000055555585e907 in delegate_wait (self=<optimized out>, arg1=...,
arg2=<optimized out>, arg3=<optimized out>) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/target-delegates.c:138
  #9  0x000055555586cd9d in target_wait (ptid=...,
status=status@entry=0x7fffffffd7b0, options=options@entry=0) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/target.c:2179
  #10 0x00005555557d0f25 in wait_one (ws=ws@entry=0x7fffffffd7b0) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/infrun.c:4345
  #11 0x00005555557d5599 in stop_all_threads () at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/infrun.c:4558
  #12 0x00005555557d599e in stop_waiting (ecs=ecs@entry=0x7fffffffdc50) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/infrun.c:7658
  #13 0x00005555557d59b7 in end_stepping_range (ecs=ecs@entry=0x7fffffffdc50)
at /home/astian/src/gdb/gdb-8.0.50.20171029/gdb/infrun.c:7838
  #14 0x00005555557d8c6f in process_event_stop_test
(ecs=ecs@entry=0x7fffffffdc50) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/infrun.c:6979
  #15 0x00005555557d9d67 in handle_signal_stop (ecs=ecs@entry=0x7fffffffdc50)
at /home/astian/src/gdb/gdb-8.0.50.20171029/gdb/infrun.c:6189
  #16 0x00005555557daf50 in handle_inferior_event_1
(ecs=ecs@entry=0x7fffffffdc50) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/infrun.c:5378
  #17 0x00005555557db061 in handle_inferior_event
(ecs=ecs@entry=0x7fffffffdc50) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/infrun.c:5413
  #18 0x00005555557db663 in fetch_inferior_event
(client_data=client_data@entry=0x0) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/infrun.c:3927
  #19 0x00005555557c554e in inferior_event_handler
(event_type=event_type@entry=INF_REG_EVENT, client_data=client_data@entry=0x0)
at /home/astian/src/gdb/gdb-8.0.50.20171029/gdb/inf-loop.c:43
  #20 0x0000555555825e45 in record_full_async_inferior_event_handler
(data=<optimized out>) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/record-full.c:769
  #21 0x0000555555796384 in check_async_event_handlers () at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/event-loop.c:1064
  #22 0x0000555555796ef8 in gdb_do_one_event () at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/event-loop.c:326
  #23 0x000055555587f0b5 in wait_sync_command_done () at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/top.c:505
  #24 0x000055555587f104 in maybe_wait_sync_command_done (was_sync=<optimized
out>, was_sync@entry=0) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/top.c:522
  #25 0x000055555587f2f1 in execute_command (p=<optimized out>,
p@entry=0x55555610f440 "next", from_tty=0) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/top.c:610
  #26 0x0000555555797f6f in command_handler (command=0x55555610f440 "next") at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/event-top.c:583
  #27 0x000055555587fa3f in read_command_file
(stream=stream@entry=0x5555560c4a80) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/top.c:426
  #28 0x0000555555672318 in script_from_file (stream=0x5555560c4a80,
file=<optimized out>) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/cli/cli-script.c:1582
  #29 0x0000555555666f10 in source_script_from_stream (stream=0x5555560c4a80,
file=0x7fffffffe558 "/tmp/rv.gdb", file_to_open=<optimized out>) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/cli/cli-cmds.c:596
  #30 0x00005555556699d5 in source_script_with_search (file=0x7fffffffe558
"/tmp/rv.gdb", from_tty=1, search_path=0) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/cli/cli-cmds.c:632
  #31 0x0000555555669ab3 in source_script (file=file@entry=0x7fffffffe558
"/tmp/rv.gdb", from_tty=from_tty@entry=1) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/cli/cli-cmds.c:642
  #32 0x00005555557f0939 in catch_command_errors (command=0x555555669aa5
<source_script(char const*, int)>, arg=0x7fffffffe558 "/tmp/rv.gdb",
from_tty=1) at /home/astian/src/gdb/gdb-8.0.50.20171029/gdb/main.c:405
  #33 0x00005555557f1983 in captured_main_1
(context=context@entry=0x7fffffffe0d0) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/main.c:1116
  #34 0x00005555557f1abe in captured_main (data=data@entry=0x7fffffffe0d0) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/main.c:1142
  #35 0x00005555557f1b63 in gdb_main (args=0x7fffffffe0d0) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/main.c:1168
  #36 0x00005555555fbe85 in main (argc=<optimized out>, argv=<optimized out>)
at /home/astian/src/gdb/gdb-8.0.50.20171029/gdb/gdb.c:32
  (top-gdb)

With "/tmp/rv.gdb" being:

  $ cat /tmp/rv.gdb
  # Avoid problems with GDB's "record" and call trampolines which
  # usually manifests as:
  #   Process record does not support instruction 0xc5 at address
0x7ffff7be0990.
  #   Process record: failed to record execution log.
  set environment LD_BIND_NOW 1

  # Avoid interruptions.
  set pagination off
  set record full stop-at-limit off

  directory ~/src/virt-viewer/virt-viewer-6.0/src
  directory ~/src/virt-viewer/spice-gtk-0.34/src

  #file /usr/bin/remote-viewer
  file ~/src/virt-viewer/virt-viewer-6.0/src/remote-viewer

  start spice://localhost:12333

  # This was the original reproducer for this bug.  To trigger this
  # breakpoint, bring remote-viewer's window into focus and press (or
  # release) some key.
  #
  # Function "key_event" (in library "spice-gtk") is a GTK+ widget
  # keyboard event handler.
  #break key_event
  #commands
  #echo Recording function...\n
  #record
  #finish
  #end

  break virt_viewer_app_on_application_startup
  continue
  # Uncomment this "next" and you get a different error.
  #next
  record
  next

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]