public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug cli/17716] New: [7.7 regression] Backtrace cannot be stopped by 'q' or CTRL-C
@ 2014-12-15 19:21 jan.kratochvil at redhat dot com
  2015-01-15  9:02 ` [Bug cli/17716] " pmuldoon at redhat dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: jan.kratochvil at redhat dot com @ 2014-12-15 19:21 UTC (permalink / raw)
  To: gdb-prs

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.


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

* [Bug cli/17716] [7.7 regression] Backtrace cannot be stopped by 'q' or CTRL-C
  2014-12-15 19:21 [Bug cli/17716] New: [7.7 regression] Backtrace cannot be stopped by 'q' or CTRL-C jan.kratochvil at redhat dot com
@ 2015-01-15  9:02 ` pmuldoon at redhat dot com
  2015-01-15  9:19 ` jan.kratochvil at redhat dot com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pmuldoon at redhat dot com @ 2015-01-15  9:02 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #1 from Phil Muldoon <pmuldoon at redhat dot com> ---
With a regression, do you mean it has failed since the first implementation of
frame filters, or a more recent change has affected it?

The three methods I would think are ok is:

1) Check the Python exception, if it is keyboard interrupt, quit.
2) Define a new constant as Jan mentions
3) Alter the exception mask as Jan mentions.

I don't think this is blocker though.  It is annoying, but I do not think it
warrants blocking status

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


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

* [Bug cli/17716] [7.7 regression] Backtrace cannot be stopped by 'q' or CTRL-C
  2014-12-15 19:21 [Bug cli/17716] New: [7.7 regression] Backtrace cannot be stopped by 'q' or CTRL-C jan.kratochvil at redhat dot com
  2015-01-15  9:02 ` [Bug cli/17716] " pmuldoon at redhat dot com
@ 2015-01-15  9:19 ` jan.kratochvil at redhat dot com
  2015-01-15  9:31 ` pmuldoon at redhat dot com
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: jan.kratochvil at redhat dot com @ 2015-01-15  9:19 UTC (permalink / raw)
  To: gdb-prs

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

Jan Kratochvil <jan.kratochvil at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jan.kratochvil at redhat dot com

--- Comment #2 from Jan Kratochvil <jan.kratochvil at redhat dot com> ---
(In reply to Phil Muldoon from comment #1)
> With a regression, do you mean it has failed since the first implementation
> of frame filters, or a more recent change has affected it?

it has failed since the first implementation of frame filters


> The three methods I would think are ok is:
> 
> 1) Check the Python exception, if it is keyboard interrupt, quit.

This does not work as there are line(s)
  TRY_CATCH (except, RETURN_MASK_ALL)
which nullify that quit() attempt.  That's the whole problem.

> 2) Define a new constant as Jan mentions
> 3) Alter the exception mask as Jan mentions.

IMO from my attempt to fix it there needs to be done some rethinking how it
should behave for errors vs. quits.

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


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

* [Bug cli/17716] [7.7 regression] Backtrace cannot be stopped by 'q' or CTRL-C
  2014-12-15 19:21 [Bug cli/17716] New: [7.7 regression] Backtrace cannot be stopped by 'q' or CTRL-C jan.kratochvil at redhat dot com
  2015-01-15  9:02 ` [Bug cli/17716] " pmuldoon at redhat dot com
  2015-01-15  9:19 ` jan.kratochvil at redhat dot com
@ 2015-01-15  9:31 ` pmuldoon at redhat dot com
  2015-02-07 17:56 ` jan.kratochvil at redhat dot com
  2015-02-11 19:33 ` jan.kratochvil at redhat dot com
  4 siblings, 0 replies; 6+ messages in thread
From: pmuldoon at redhat dot com @ 2015-01-15  9:31 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #3 from Phil Muldoon <pmuldoon at redhat dot com> ---
The current workaround for this, is to just turn frame filters on and off when
needed:

(gdb) disable frame-filter all
(gdb) bt
(gdb) enable frame-filter all

But sure, it is annoying.  I will fix soon

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


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

* [Bug cli/17716] [7.7 regression] Backtrace cannot be stopped by 'q' or CTRL-C
  2014-12-15 19:21 [Bug cli/17716] New: [7.7 regression] Backtrace cannot be stopped by 'q' or CTRL-C jan.kratochvil at redhat dot com
                   ` (2 preceding siblings ...)
  2015-01-15  9:31 ` pmuldoon at redhat dot com
@ 2015-02-07 17:56 ` jan.kratochvil at redhat dot com
  2015-02-11 19:33 ` jan.kratochvil at redhat dot com
  4 siblings, 0 replies; 6+ messages in thread
From: jan.kratochvil at redhat dot com @ 2015-02-07 17:56 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #4 from Jan Kratochvil <jan.kratochvil at redhat dot com> ---
[PATCH 0/6] framefilter quit: PR cli/17716
https://sourceware.org/ml/gdb-patches/2015-02/msg00168.html

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


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

* [Bug cli/17716] [7.7 regression] Backtrace cannot be stopped by 'q' or CTRL-C
  2014-12-15 19:21 [Bug cli/17716] New: [7.7 regression] Backtrace cannot be stopped by 'q' or CTRL-C jan.kratochvil at redhat dot com
                   ` (3 preceding siblings ...)
  2015-02-07 17:56 ` jan.kratochvil at redhat dot com
@ 2015-02-11 19:33 ` jan.kratochvil at redhat dot com
  4 siblings, 0 replies; 6+ messages in thread
From: jan.kratochvil at redhat dot com @ 2015-02-11 19:33 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #5 from Jan Kratochvil <jan.kratochvil at redhat dot com> ---
It has been partially fixed for 7.9; but more fixes are needed there:
211e7f3c26b39159df2dedd8198148cec60307f9
cf3f71d273c607ecd1e912ce9fe8121da320c6a9
5dea9fe2285fee5d53691856750a0c8960fca04d
46d020960241fcafd7d0ab483746a206829620ea
a9189a245363137825ce02a23202df45b04db179
25a0672ba8b7f4badc682eaf08a1e342b496b483

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


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

end of thread, other threads:[~2015-02-11 13:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-15 19:21 [Bug cli/17716] New: [7.7 regression] Backtrace cannot be stopped by 'q' or CTRL-C jan.kratochvil at redhat dot com
2015-01-15  9:02 ` [Bug cli/17716] " pmuldoon at redhat dot com
2015-01-15  9:19 ` jan.kratochvil at redhat dot com
2015-01-15  9:31 ` pmuldoon at redhat dot com
2015-02-07 17:56 ` jan.kratochvil at redhat dot com
2015-02-11 19:33 ` jan.kratochvil at redhat 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).