public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/28374] New: Toggle TUI causes segmentation fault
@ 2021-09-22 11:19 chuddah at gmail dot com
  2021-09-22 11:26 ` [Bug gdb/28374] " chuddah at gmail dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: chuddah at gmail dot com @ 2021-09-22 11:19 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 28374
           Summary: Toggle TUI causes segmentation fault
           Product: gdb
           Version: 9.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: chuddah at gmail dot com
  Target Milestone: ---

Often, I get a seg fault when switching between TUI and regular mode while
debugging. I will try and update this report with more details -- when I have a
debug build of GDB. 

To reproduce:
In certain circumstances (yet to be determined :)) toggling from TUI view back
to the regular view causes the GPF. I am using the keyboard shortcut (ctrl-x
then a). 
This always works (no GPF) when no program file is loaded. The crash occurs
only sometimes when a program file is loaded and is being debugged. When
attempting to reproduce the bug I was debugging I can reliably reproduce the
GPF by getting the inferior process to the same point and toggling TUI mode
off. This bug therefore appears to be reliant on the inferior process and its
state.

I will add more details as I find them.

(gdb) bt
#0  0x00007f0d3f7034a5 in __GI__IO_fwrite (buf=0x55a300ac7030, size=1, count=6,
fp=0x0) at iofwrite.c:35
#1  0x00007f0d40327a78 in ?? () from /lib/x86_64-linux-gnu/libreadline.so.8
#2  0x00007f0d403297e0 in rl_redisplay () from
/lib/x86_64-linux-gnu/libreadline.so.8
#3  0x00007f0d403130f7 in readline_internal_setup () from
/lib/x86_64-linux-gnu/libreadline.so.8
#4  0x00007f0d4032e769 in ?? () from /lib/x86_64-linux-gnu/libreadline.so.8
#5  0x000055a2fec6e75e in ?? ()
#6  0x000055a2fec6f3df in ?? ()
#7  0x000055a2fec6f1cc in ?? ()
#8  0x00007f0d4032ebde in rl_callback_read_char () from
/lib/x86_64-linux-gnu/libreadline.so.8
#9  0x000055a2fec6e466 in ?? ()
#10 0x000055a2fec6f085 in ?? ()
#11 0x000055a2fec6e388 in ?? ()
#12 0x000055a2fec6d036 in ?? ()
#13 0x000055a2fec6d51c in ?? ()
#14 0x000055a2fec6d62e in ?? ()
#15 0x000055a2fed1cb4b in ?? ()
#16 0x000055a2fed1ecb5 in ?? ()
#17 0x000055a2feb38a80 in ?? ()
#18 0x00007f0d3f6a40b3 in __libc_start_main (main=0x55a2feb38a40, argc=10,
argv=0x7ffcf30697c8, init=<optimised out>, fini=<optimised out>,
rtld_fini=<optimised out>, stack_end=0x7ffcf30697b8)
    at ../csu/libc-start.c:308
#19 0x000055a2feb3e41e in ?? ()

$ gdb --version
GNU gdb (Ubuntu 9.2-0ubuntu1~20.04) 9.2

$ gcc -v
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 7.5.0-6ubuntu2'
--with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs
--enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr
--with-gcc-major-version-only --program-suffix=-7
--program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=new --enable-gnu-unique-object
--disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie
--with-system-zlib --with-target-system-zlib --enable-objc-gc=auto
--enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64
--with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic
--enable-offload-targets=nvptx-none --without-cuda-driver
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
gcc version 7.5.0 (Ubuntu 7.5.0-6ubuntu2) 

$ uname -a
Linux druscoe-mint 5.4.0-42-generic #46-Ubuntu SMP Fri Jul 10 00:24:02 UTC 2020
x86_64 x86_64 x86_64 GNU/Linux

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

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

* [Bug gdb/28374] Toggle TUI causes segmentation fault
  2021-09-22 11:19 [Bug gdb/28374] New: Toggle TUI causes segmentation fault chuddah at gmail dot com
@ 2021-09-22 11:26 ` chuddah at gmail dot com
  2021-09-22 16:20 ` cbiesinger at google dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: chuddah at gmail dot com @ 2021-09-22 11:26 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #1 from Damien Ruscoe <chuddah at gmail dot com> ---
Appears simple to reproduce once I unpacked how my scripts were invoking gdb.

To reproduce:

- Run gdb with TUI from the command line 
gdb --tui

- Switch TUI mode off using keyboard shortcut.
ctrl-x then a

- GPF

$ gdb --tui
Aborted (core dumped)

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

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

* [Bug gdb/28374] Toggle TUI causes segmentation fault
  2021-09-22 11:19 [Bug gdb/28374] New: Toggle TUI causes segmentation fault chuddah at gmail dot com
  2021-09-22 11:26 ` [Bug gdb/28374] " chuddah at gmail dot com
@ 2021-09-22 16:20 ` cbiesinger at google dot com
  2021-09-23 13:39 ` chuddah at gmail dot com
  2021-09-23 17:03 ` cbiesinger at google dot com
  3 siblings, 0 replies; 5+ messages in thread
From: cbiesinger at google dot com @ 2021-09-22 16:20 UTC (permalink / raw)
  To: gdb-prs

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

Christian Biesinger <cbiesinger at google dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |cbiesinger at google dot com

--- Comment #2 from Christian Biesinger <cbiesinger at google dot com> ---
Have you tried this with gdb 10 or 11?

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

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

* [Bug gdb/28374] Toggle TUI causes segmentation fault
  2021-09-22 11:19 [Bug gdb/28374] New: Toggle TUI causes segmentation fault chuddah at gmail dot com
  2021-09-22 11:26 ` [Bug gdb/28374] " chuddah at gmail dot com
  2021-09-22 16:20 ` cbiesinger at google dot com
@ 2021-09-23 13:39 ` chuddah at gmail dot com
  2021-09-23 17:03 ` cbiesinger at google dot com
  3 siblings, 0 replies; 5+ messages in thread
From: chuddah at gmail dot com @ 2021-09-23 13:39 UTC (permalink / raw)
  To: gdb-prs

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

Damien Ruscoe <chuddah at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Damien Ruscoe <chuddah at gmail dot com> ---
Hi Christian,

So, Ive built 9.2 branch from git and I can reproduce the problem on that
build. I have also build the current master and the bug is no longer
reproducible. 

It looks like this bug has already been fixed and I need to wait for my distro
to update binutils. Thanks for your help.

Damien

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

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

* [Bug gdb/28374] Toggle TUI causes segmentation fault
  2021-09-22 11:19 [Bug gdb/28374] New: Toggle TUI causes segmentation fault chuddah at gmail dot com
                   ` (2 preceding siblings ...)
  2021-09-23 13:39 ` chuddah at gmail dot com
@ 2021-09-23 17:03 ` cbiesinger at google dot com
  3 siblings, 0 replies; 5+ messages in thread
From: cbiesinger at google dot com @ 2021-09-23 17:03 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #4 from Christian Biesinger <cbiesinger at google dot com> ---
Thanks for checking! FWIW, even though binutils and gdb are in the same
repository, most distributions ship gdb in a separate package. (so uninstalling
gdb and installing the one you built yourself should not be as burdensome as
doing that for your entire binutils)

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

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

end of thread, other threads:[~2021-09-23 17:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-22 11:19 [Bug gdb/28374] New: Toggle TUI causes segmentation fault chuddah at gmail dot com
2021-09-22 11:26 ` [Bug gdb/28374] " chuddah at gmail dot com
2021-09-22 16:20 ` cbiesinger at google dot com
2021-09-23 13:39 ` chuddah at gmail dot com
2021-09-23 17:03 ` cbiesinger at google 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).