From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B57B33858C54; Mon, 5 Feb 2024 09:22:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B57B33858C54 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1707124974; bh=XwFGMVlXFf5S7wU14MOJW6hXe9jz5uJHDNH1gxXV4uQ=; h=From:To:Subject:Date:From; b=KQT+UlPZmJSGZ765zS6CwUUU14TkiA2uBVKL71RPecIIyV6RH1Xx+jaRh+iNuyu+R k3YtQOml7LcO4hei1k1yRZ0q0A1X9ym576PmnIFU0levZxmqNnUIABqnElhnuuPM5D 4gFrJ8udcChVclhf/5PD0UeJjw2dsYWVfM/Za+ac= From: "dmitry.neverov at jetbrains dot com" To: gdb-prs@sourceware.org Subject: [Bug server/31337] New: MinGW error on detach: gdbserver/inferiors.cc:160: A problem internal to GDBserver has been detected Date: Mon, 05 Feb 2024 09:22:53 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: server X-Bugzilla-Version: 14.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dmitry.neverov at jetbrains 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=3D31337 Bug ID: 31337 Summary: MinGW error on detach: gdbserver/inferiors.cc:160: A problem internal to GDBserver has been detected Product: gdb Version: 14.1 Status: UNCONFIRMED Severity: normal Priority: P2 Component: server Assignee: unassigned at sourceware dot org Reporter: dmitry.neverov at jetbrains dot com Target Milestone: --- Happens in latest MinGW: https://github.com/brechtsanders/winlibs_mingw/releases winlibs-i686-posix-dwarf-gcc-14.0.0-snapshot20240107-mingw-w64msvcrt-11.0.1= -r1.7z To reproduce: - compile the program #include #include int main(void) { for (int i =3D 0; i < 10000; i++) { printf("%d\n", i); Sleep(1000); } return 0; } - run mingw32/bin/gdbserver.exe --once localhost:4242 a.exe - run mingw32/bin/gdb.exe -nx and execute the commands: (gdb) file a.exe (gdb) target remote tcp:localhost:4242 (gdb) b main.c:7 (gdb) continue (gdb) detach Gdbserver process is terminated, the a.exe keeps running. Gdbserver output: Listening on port 4242 Remote debugging from host ::1, port 65172 0 Detaching from process 6476 ../../gdbserver/inferiors.cc:160: A problem internal to GDBserver has been detected. remove_process: Assertion `find_thread_process (process) =3D=3D NULL' faile= d. Gdb output: (gdb) file a.exe Reading symbols from a.exe... (gdb) target remote tcp:localhost:4242 Remote debugging using tcp:localhost:4242 Reading C:\WINDOWS\SysWOW64\ntdll.dll from remote target... warning: File transfers from remote targets can be slow. Use "set sysroot" = to access files locally instead. Reading C:\WINDOWS\SysWOW64\kernel32.dll from remote target... Reading C:\WINDOWS\SysWOW64\KernelBase.dll from remote target... Reading C:\WINDOWS\SysWOW64\msvcrt.dll from remote target... Reading c:/R/winlibs32_stage/inst_gdb-14.1/share/gdb/lib/debug/.build-id/ce/2f4b523= d856940ee33aaab0cab37b0.debug from remote target... Reading c:/R/winlibs32_stage/inst_gdb-14.1/share/gdb/lib/debug/.build-id/ae/8ddde49= 412d714d51c90cdaeb34527.debug from remote target... Reading c:/R/winlibs32_stage/inst_gdb-14.1/share/gdb/lib/debug/.build-id/49/8edfaad= 5f9f445d4e77e14f7de2807.debug from remote target... Reading c:/R/winlibs32_stage/inst_gdb-14.1/share/gdb/lib/debug/.build-id/34/f7f7273= 9101e3b219e5fc1e36b0435.debug from remote target... 0x776c8088 in ntdll!LdrInitShimEngineDynamic () from target:C:\WINDOWS\SysWOW64\ntdll.dll (gdb) b main.c:7 Breakpoint 1 at 0x8f15fe: file main.c, line 7. (gdb) continue Continuing. Thread 1 hit Breakpoint 1, main () at main.c:7 7 Sleep(1000); (gdb) detach Detaching from program: c:\w\CLionProjects\CLoop\a.exe, Remote target Remote communication error. Target disconnected: No error. (gdb) --=20 You are receiving this mail because: You are on the CC list for the bug.=