Discussion:
[Bug record/22368] New: Assertion failure during recorded execution
astian at elude dot in
2017-10-30 01:41:55 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=22368

Bug ID: 22368
Summary: Assertion failure during recorded execution
Product: gdb
Version: 8.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: record
Assignee: unassigned at sourceware dot org
Reporter: astian at elude dot in
Target Milestone: ---

I ran into the following 2 assertion failures when trying to record execution
of a function:

1. /build/gdb-uGdIdO/gdb-7.12/gdb/record-full.c:1066: internal-error: ptid_t
record_full_wait_1(target_ops*, ptid_t, target_waitstatus*, int): Assertion
`(options & TARGET_WNOHANG) != 0' failed.

2. /build/gdb-uGdIdO/gdb-7.12/gdb/nat/x86-linux-dregs.c:146: internal-error:
void x86_linux_update_debug_registers(lwp_info*): Assertion `lwp_is_stopped
(lwp)' failed.

It happened for the first time while trying to record execution of a keyboard
event handler for a GTK+ widget provided by the `spice-gtk` library and used
in the SPICE client `remote-viewer`, part of the `virt-viewer` package.

Initially I thought it had something to do with the peculiar situation I was
trying to debug: with the keyboard partially "stuck" due to (methinks) being
in the middle of an X server "grab". However, after some experimentation, I
rather think that some threading shenanigans are at play: the same errors
occur when attempting to record other, more typical, functions in the same
program.

I also confirmed that the recording steps I'm trying to carry out do work when
applied to other functions and other programs.

STR:

1. On a Debian unstable system (with a configured debug-symbols repository):

# apt install gdb virt-viewer virt-viewer-dbgsym
libspice-client-gtk-3.0-5-dbgsym

Which should give you the following packages (among others):

Package Version
-------------------------------------------------------------
gdb 7.12-6+b1 (7.12.0.20161007-git)
virt-viewer 6.0-2
libspice-client-gtk-3.0-5 0.34-1.1

2. Set up some SPICE server. In my case I have a Xen VM for which QEMU
serves the desktop via a SPICE server.

3. Run:

$ gdb -x rv.gdb

Where "rv.gdb" contains (change the address of the spice server as
needed):

# 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

file /usr/bin/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
# Uncomment this "next" and you get a different error, see below.
#next
continue
next

Result: GDB stops because of an assertion failure. The failed assertion is
one of the two listed above. It varies which one but the 1st is most common.

I also reproduced the bug using my own from-source debug builds of GDB (from
8.0.50-20171029 tarball), virt-viewer (from Debian source package) and
spice-gtk (from Debian source package).

Example transcript showing the first assertion failure:

$ gdb -x rv.gdb
GNU gdb (Debian 7.12-6+b1) 7.12.0.20161007-git
Copyright (C) 2016 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-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".
Temporary breakpoint 1 at 0x129b0: 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=0x7fffffffe278) at
remote-viewer-main.c:35
35 remote-viewer-main.c: No such file or directory.
Breakpoint 2 at 0x5555555709a0: file virt-viewer-app.c, line 1811.
[New Thread 0x7fffe18cf700 (LWP 15211)]
[New Thread 0x7fffe10ce700 (LWP 15212)]

Thread 1 "remote-viewer" hit Breakpoint 2,
virt_viewer_app_on_application_startup (app=0x5555557f2300 [RemoteViewer]) at
virt-viewer-app.c:1811
1811 virt-viewer-app.c: No such file or directory.
/build/gdb-uGdIdO/gdb-7.12/gdb/record-full.c:1066: 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/>.

/build/gdb-uGdIdO/gdb-7.12/gdb/record-full.c:1066: 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]
Aborted (core dumped)

(I can provide the core dump if required.)

In the script, if instead of:

break ...
continue
next

...one does:

break ...
next
continue
next

...instead of the assertion failure we get:

[...]
Temporary breakpoint 1, main (argc=2, argv=0x7fffffffe278) at
remote-viewer-main.c:35
35 remote-viewer-main.c: No such file or directory.
Breakpoint 2 at 0x5555555709a0: file virt-viewer-app.c, line 1811.
[New Thread 0x7fffe18cf700 (LWP 15504)]
[New Thread 0x7fffe10ce700 (LWP 15505)]

Thread 1 "remote-viewer" hit Breakpoint 2,
virt_viewer_app_on_application_startup (app=0x5555557f2300 [RemoteViewer]) at
virt-viewer-app.c:1811
1811 virt-viewer-app.c: No such file or directory.
1812 in virt-viewer-app.c
rv.gdb:16: Error in sourced command file:
Couldn't get registers: No such process.
(gdb)

The inferior seems to be in a very bad state now:

(gdb) next
Cannot execute this command while the selected thread is running.

Also note that the active thread was changed from 1 to 3:

(gdb) info thread
Id Target Id Frame
1 Thread 0x7ffff7f8c540 (LWP 15500) "remote-viewer" (running)
2 Thread 0x7fffe18cf700 (LWP 15504) "gmain" (running)
* 3 Thread 0x7fffe10ce700 (LWP 15505) "gdbus" (running)

Changing it back to 1 does not help.
--
You are receiving this mail because:
You are on the CC list for the bug.
astian at elude dot in
2017-10-30 14:27:34 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=22368

--- Comment #1 from astian at elude dot in ---
But of course I screw up the STR!
Post by astian at elude dot in
break virt_viewer_app_on_application_startup
# Uncomment this "next" and you get a different error, see below.
#next
continue
next
break virt_viewer_app_on_application_startup
continue
Post by astian at elude dot in
# Uncomment this "next" and you get a different error, see below.
#next
record
Post by astian at elude dot in
next
That is: run until the breakpoint, optionally execute one line, start
recording, execute one line (instead of "next", "step" or even "stepi" also
work).
Post by astian at elude dot in
break ...
continue
next
break ...
next
continue
next
break ...
continue
record
Post by astian at elude dot in
next
break ...
continue
Post by astian at elude dot in
next
record
Post by astian at elude dot in
next
--
You are receiving this mail because:
You are on the CC list for the bug.
astian at elude dot in
2017-10-30 14:43:25 UTC
Permalink
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=***@entry=0x555555a67068
"/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/record-full.c",
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=***@entry=0x555555a67068
"/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/record-full.c",
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=***@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=***@entry=0x7fffffffd7b0, options=***@entry=0) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/target.c:2179
#5 0x00005555557d0f25 in wait_one (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=***@entry=0x7fffffffdc50) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/infrun.c:7658
#8 0x00005555557d59b7 in end_stepping_range (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=***@entry=0x7fffffffdc50) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/infrun.c:6979
#10 0x00005555557d9d67 in handle_signal_stop (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=***@entry=0x7fffffffdc50) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/infrun.c:5378
#12 0x00005555557db061 in handle_inferior_event
(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=***@entry=0x0) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/infrun.c:3927
#14 0x00005555557c554e in inferior_event_handler
(event_type=***@entry=INF_REG_EVENT, 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>, ***@entry=0) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/top.c:522
#20 0x000055555587f2f1 in execute_command (p=<optimized out>,
***@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=***@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=***@entry=0x7fffffffe558
"/tmp/rv.gdb", 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=***@entry=0x7fffffffe0d0) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/main.c:1116
#29 0x00005555557f1abe in captured_main (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=***@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=***@entry=0x555555a67068
"/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/record-full.c",
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=***@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=***@entry=0x7fffffffd7b0, options=***@entry=0) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/target.c:2179
#10 0x00005555557d0f25 in wait_one (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=***@entry=0x7fffffffdc50) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/infrun.c:7658
#13 0x00005555557d59b7 in end_stepping_range (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=***@entry=0x7fffffffdc50) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/infrun.c:6979
#15 0x00005555557d9d67 in handle_signal_stop (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=***@entry=0x7fffffffdc50) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/infrun.c:5378
#17 0x00005555557db061 in handle_inferior_event
(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=***@entry=0x0) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/infrun.c:3927
#19 0x00005555557c554e in inferior_event_handler
(event_type=***@entry=INF_REG_EVENT, 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>, ***@entry=0) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/top.c:522
#25 0x000055555587f2f1 in execute_command (p=<optimized out>,
***@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=***@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=***@entry=0x7fffffffe558
"/tmp/rv.gdb", 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=***@entry=0x7fffffffe0d0) at
/home/astian/src/gdb/gdb-8.0.50.20171029/gdb/main.c:1116
#34 0x00005555557f1abe in captured_main (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.
bernhardu at mailbox dot org
2018-11-22 13:02:06 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=22368

Bernhard Übelacker <bernhardu at mailbox dot org> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |bernhardu at mailbox dot org

--- Comment #3 from Bernhard Übelacker <bernhardu at mailbox dot org> ---
Might be a duplicate of #20456.
--
You are receiving this mail because:
You are on the CC list for the bug.
Loading...