From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 859323858C5F; Wed, 4 Oct 2023 20:06:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 859323858C5F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1696449993; bh=sqv4GMjukIEKJQ3+yvOjqMkKj76HnS8D8PLZ+hKTOZQ=; h=From:To:Subject:Date:From; b=h+axNzQE6LfDjfzYCSU4EPuTmJ1V1tbqDLY9g8ehm+clxivNYZY1eFYMP3OGCDmS2 XLMUc0yF2yLMVO4nZZcNI+6vILP7LbztVO4+YwLUyjzPB42meKmbdFZOLktuA+khqX I62hsvfTBAyO3wTaDzpdbyg8/aJUZpDAnSfofP3g= From: "ben.knoble+bugzilla at gmail dot com" To: gdb-prs@sourceware.org Subject: [Bug gdb/30939] New: "run" (still) hangs on macOS Date: Wed, 04 Oct 2023 20:06:32 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: 13.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ben.knoble+bugzilla at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30939 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 Au= g 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=3D/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=3D/Applications/Xcode.app/Contents/Developer/Platfor= ms/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.xctoolch= ain/usr/bin OR Using built-in specs. COLLECT_GCC=3Dgcc-13 COLLECT_LTO_WRAPPER=3D/usr/local/Cellar/gcc/13.1.0/bin/../libexec/gcc/x86_6= 4-apple-darwin20/13/lto-wrapper Target: x86_64-apple-darwin20 Configured with: ../configure --prefix=3D/usr/local/opt/gcc --libdir=3D/usr/local/opt/gcc/lib/gcc/current --disable-nls --enable-checking=3Drelease --with-gcc-major-version-only --enable-languages=3Dc,c++,objc,obj-c++,fortran --program-suffix=3D-13 --with-gmp=3D/usr/local/opt/gmp --with-mpfr=3D/usr/local/opt/mpfr --with-mpc=3D/usr/local/opt/libmpc --with-isl=3D/usr/local/opt/isl --with-zstd=3D/usr/local/opt/zstd --with-pkgversion=3D'Homebrew GCC 13.1.0' --with-bugurl=3Dhttps://github.com/Homebrew/homebrew-core/issues --with-system-zlib --build=3Dx86_64-apple-darwin20 --with-sysroot=3D/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)=20 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-L= 47) 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-s= hell 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=3D24069 Yet, all responses show that those are solved, whereas I still experience s= ome issue. Using the patched domq/gdb (https://github.com/domq/homebrew-gdb) di= dn't work. Using the lldb distributed with Apple's compiler toolchain did, thoug= h. --=20 You are receiving this mail because: You are on the CC list for the bug.=