public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/30939] New: "run" (still) hangs on macOS
@ 2023-10-04 20:06 ben.knoble+bugzilla at gmail dot com
  2023-10-05 18:26 ` [Bug gdb/30939] " ben.knoble+bugzilla at gmail dot com
  0 siblings, 1 reply; 2+ messages in thread
From: ben.knoble+bugzilla at gmail dot com @ 2023-10-04 20:06 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 30939
           Summary: "run" (still) hangs on macOS
           Product: gdb
           Version: 13.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: ben.knoble+bugzilla at gmail dot com
  Target Milestone: ---

uname -a: Darwin macaroon.local 20.6.0 Darwin Kernel Version 20.6.0: Mon Aug 29
04:31:06 PDT 2022; root:xnu-7195.141.39~2/RELEASE_X86_64 x86_64

I'm on macOS 11.7.

gcc -v: EITHER OF
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr
--with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 13.0.0 (clang-1300.0.29.30)
Target: x86_64-apple-darwin20.6.0
Thread model: posix
InstalledDir:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

OR

Using built-in specs.
COLLECT_GCC=gcc-13
COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc/13.1.0/bin/../libexec/gcc/x86_64-apple-darwin20/13/lto-wrapper
Target: x86_64-apple-darwin20
Configured with: ../configure --prefix=/usr/local/opt/gcc
--libdir=/usr/local/opt/gcc/lib/gcc/current --disable-nls
--enable-checking=release --with-gcc-major-version-only
--enable-languages=c,c++,objc,obj-c++,fortran --program-suffix=-13
--with-gmp=/usr/local/opt/gmp --with-mpfr=/usr/local/opt/mpfr
--with-mpc=/usr/local/opt/libmpc --with-isl=/usr/local/opt/isl
--with-zstd=/usr/local/opt/zstd --with-pkgversion='Homebrew GCC 13.1.0'
--with-bugurl=https://github.com/Homebrew/homebrew-core/issues
--with-system-zlib --build=x86_64-apple-darwin20
--with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 13.1.0 (Homebrew GCC 13.1.0) 

gdb configured: x86_64-apple-darwin20.6.0

(I couldn't select version 13.2, but I've seen this on both 13.2 and 13.1.)

---

This should reliably reproduce the problem (it does for me):
1. Install and codesign GDB (e.g., brew install gdb;
https://github.com/benknoble/Dotfiles/blob/master/links/bin/sign-gdb).
2. Compile a simple C program (e.g.,
https://github.com/vim/vim/blob/master/src/testdir/test_termdebug.vim#L25-L47)
with gcc -g, which also creates a .dSYM directory.
3. Start GDB and execute 'run'.

With or without my ~/.gdbinit (containing only the line "set startup-with-shell
off"), I observe a thread or 2 created and then everything hangs. Sending a
SIGINT seems to "fix" things, and afterwards I can reliably debug _that
specific program_. Others suffer the same hang until it's been "fixed" once.

With the gdbinit file, I can type Control-C for SIGINT. Without it, I have to
run kill from a separate shell.

On the surface, this seems similar to the following reports:
- https://apple.stackexchange.com/q/420492/293074
- https://sourceware.org/bugzilla/show_bug.cgi?id=24069

Yet, all responses show that those are solved, whereas I still experience some
issue. Using the patched domq/gdb (https://github.com/domq/homebrew-gdb) didn't
work. Using the lldb distributed with Apple's compiler toolchain did, though.

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

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

* [Bug gdb/30939] "run" (still) hangs on macOS
  2023-10-04 20:06 [Bug gdb/30939] New: "run" (still) hangs on macOS ben.knoble+bugzilla at gmail dot com
@ 2023-10-05 18:26 ` ben.knoble+bugzilla at gmail dot com
  0 siblings, 0 replies; 2+ messages in thread
From: ben.knoble+bugzilla at gmail dot com @ 2023-10-05 18:26 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #1 from D. Ben Knoble <ben.knoble+bugzilla at gmail dot com> ---
I've reproduced this on macOS 13.6, also.

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

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

end of thread, other threads:[~2023-10-05 18:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-04 20:06 [Bug gdb/30939] New: "run" (still) hangs on macOS ben.knoble+bugzilla at gmail dot com
2023-10-05 18:26 ` [Bug gdb/30939] " ben.knoble+bugzilla at gmail 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).