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 cli/17716] New: [7.7 regression] Backtrace cannot be stopped by 'q' or CTRL-C


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

            Bug ID: 17716
           Summary: [7.7 regression] Backtrace cannot be stopped by 'q' or
                    CTRL-C
           Product: gdb
           Version: 7.7
            Status: NEW
          Severity: normal
          Priority: P2
         Component: cli
          Assignee: unassigned at sourceware dot org
          Reporter: jan.kratochvil at redhat dot com
                CC: pmuldoon at redhat dot com
              Host: x86_64-linux-gnu
            Target: x86_64-linux-gnu

It is a regression since frame filters have been introduced in 7.7; for some
reason it regresses for me in real world only in 7.8, though.

One cannot stop backtrace by 'q' at
  ---Type <return> to continue, or q <return> to quit---
or even by CTRL-C, it always just prints:
  Python Exception <type 'exceptions.KeyboardInterrupt'>
and continue the backtrace dump.

Fedora 21 x86_64:

Make the window height a bit smaller:
stty size
15 129

184d64776bc16fcba7b00e5784e27f52854cc8dd

/home/jkratoch/redhat/gdb-clean/gdb/gdb -data-directory
/home/jkratoch/redhat/gdb-clean/gdb/data-directory -iex 'set data-directory
/usr/share/gdb' -ex start -ex 'b gtk_widget_draw_marshallerv' -ex c -ex bt
gtk3-demo

PASS:
Breakpoint 2, gtk_widget_draw_marshallerv (closure=0x90a490,
return_value=0x7fffffffcf70, instance=0xaee2a0, args=0x7fffffffd070,
marshal_data=0x3348d32df0 <gtk_window_draw>, n_params=1, param_types=0x90a500)
at gtkwidget.c:1087
1087    {
#0  gtk_widget_draw_marshallerv (closure=0x90a490, return_value=0x7fffffffcf70,
instance=0xaee2a0, args=0x7fffffffd070, marshal_data=0x3348d32df0
<gtk_window_draw>, n_params=1, param_types=0x90a500) at gtkwidget.c:1087
#1  0x0000003c21a0ff64 in _g_closure_invoke_va (closure=closure@entry=0x90a490,
return_value=return_value@entry=0x7fffffffcf70,
---Type <return> to continue, or q <return> to quit---q
iQuit
(gdb)


FAIL:
Breakpoint 2, gtk_widget_draw_marshallerv (closure=0x90a490,
return_value=0x7fffffffcf70, instance=0xb26270, args=0x7fffffffd070,
marshal_data=0x3348d32df0 <gtk_window_draw>, n_params=1, param_types=0x90a500)
at gtkwidget.c:1087
1087    {
#0  0x0000003348d1a020 in gtk_widget_draw_marshallerv (closure=0x90a490,
return_value=0x7fffffffcf70, instance=0xb26270, args=0x7fffffffd070,
marshal_data=0x3348d32df0 <gtk_window_draw>, n_params=1, param_types=0x90a500)
at gtkwidget.c:1087
#1  0x0000003c21a0ff64 in _g_closure_invoke_va (closure=closure@entry=0x90a490,
return_value=return_value@entry=0x7fffffffcf70, i---Type <return> to continue,
or q <return> to quit---q
Python Exception <type 'exceptions.KeyboardInterrupt'> Quit:
, args=args@entry=0x7fffffffd070, n_params=<optimized out>,
param_types=0x90a500#2  0x0000003c21a2962b in g_signal_emit_valist
(instance=0xb26270, signal_id=<optimized out>, detail=0,
var_args=var_args@entry=0x7fffffffd070) at gsignal.c:3218
#3  0x0000003c21a2a3af in g_signal_emit (instance=instance@entry=0xb26270,
signal_id=<optimized out>, detail=detail@entry=0) at gsignal.c:3365
#4  0x0000003348d285d6 in _gtk_widget_draw_internal
(widget=widget@entry=0xb26270 [GtkApplicationWindow], cr=cr@entry=0xcada60,
clip_to_size=clip_to_size@entry=1, window=window@entry=0x959360 [GdkX11Window])
at gtkwidget.c:6951
Python Exception <type 'exceptions.KeyboardInterrupt'> <type
'exceptions.KeyboardInterrupt'>:
Python Exception <type 'exceptions.KeyboardInterrupt'> :
#5  0x0000003348d29c4f in _gtk_widget_draw_windows (window=0x959360
[GdkX11Window], clip_to_size=1, cr=0xcada60, #6  0x0000003348d29c4f in
_gtk_widget_draw_windows (window=window@entry=, cr=cr@entry=0xcada60,
window_x=window_x@entry=0, window_y=window_y@entry=0) at gtkwidget.c:7052
#7  0x0000003348d29ecf in _gtk_widget_draw (widget=widget@entry=0xb26270
[GtkApplicationWindow], cr=cr@entry=0xcada60) at gtkwidget.c:7122


It is a pain to debug as due to the FSF GDB HEAD lacking
        [patchv2] Fix 100x slowdown regression on DWZ files
        https://sourceware.org/ml/gdb-patches/2014-10/msg00031.html
the unbreakable backtrace takes several minutes.  Killing GDB leaves runaway
inferior etc.

The primary problem is that py_print_single_arg() at its end
  if (except.reason < 0)
    gdbpy_convert_exception (except);
for RETURN_QUIT still returns EXT_LANG_BT_OK.

But EXT_LANG_BT_ERROR is also not helpful as the backtrace correctly tries to
recover from errors printing some parameters or frames (it was another
regression before it did not recover).

I guess one should create new EXT_LANG_BT_QUIT.
Or is it just safe enough to change py_print_single_arg()'s RETURN_MASK_ALL to
RETURN_MASK_ERROR?

-- 
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]