public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug server/31337] New: MinGW error on detach: gdbserver/inferiors.cc:160: A problem internal to GDBserver has been detected
@ 2024-02-05  9:22 dmitry.neverov at jetbrains dot com
  2024-02-05  9:33 ` [Bug server/31337] " dmitry.neverov at jetbrains dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: dmitry.neverov at jetbrains dot com @ 2024-02-05  9:22 UTC (permalink / raw)
  To: gdb-prs

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

            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 <stdio.h>
#include <windows.h>

int main(void) {
  for (int i = 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) == NULL' failed.

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/2f4b523d856940ee33aaab0cab37b0.debug
from remote target...
Reading
c:/R/winlibs32_stage/inst_gdb-14.1/share/gdb/lib/debug/.build-id/ae/8ddde49412d714d51c90cdaeb34527.debug
from remote target...
Reading
c:/R/winlibs32_stage/inst_gdb-14.1/share/gdb/lib/debug/.build-id/49/8edfaad5f9f445d4e77e14f7de2807.debug
from remote target...
Reading
c:/R/winlibs32_stage/inst_gdb-14.1/share/gdb/lib/debug/.build-id/34/f7f72739101e3b219e5fc1e36b0435.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)

-- 
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 server/31337] MinGW error on detach: gdbserver/inferiors.cc:160: A problem internal to GDBserver has been detected
  2024-02-05  9:22 [Bug server/31337] New: MinGW error on detach: gdbserver/inferiors.cc:160: A problem internal to GDBserver has been detected dmitry.neverov at jetbrains dot com
@ 2024-02-05  9:33 ` dmitry.neverov at jetbrains dot com
  2024-02-05 13:21 ` tromey at sourceware dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: dmitry.neverov at jetbrains dot com @ 2024-02-05  9:33 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #1 from Dmitry Neverov <dmitry.neverov at jetbrains dot com> ---
*** Bug 31338 has been marked as a duplicate of this bug. ***

-- 
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 server/31337] MinGW error on detach: gdbserver/inferiors.cc:160: A problem internal to GDBserver has been detected
  2024-02-05  9:22 [Bug server/31337] New: MinGW error on detach: gdbserver/inferiors.cc:160: A problem internal to GDBserver has been detected dmitry.neverov at jetbrains dot com
  2024-02-05  9:33 ` [Bug server/31337] " dmitry.neverov at jetbrains dot com
@ 2024-02-05 13:21 ` tromey at sourceware dot org
  2024-02-05 15:42 ` dmitry.neverov at jetbrains dot com
  2024-02-05 16:29 ` tromey at sourceware dot org
  3 siblings, 0 replies; 5+ messages in thread
From: tromey at sourceware dot org @ 2024-02-05 13:21 UTC (permalink / raw)
  To: gdb-prs

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

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tromey at sourceware dot org

--- Comment #2 from Tom Tromey <tromey at sourceware dot org> ---
I think this was probably fixed by

commit fa659800b009df1f0bdb0c5d24eec047fb9c3fa0
Author: Stefano Moioli <smxdev4@gmail.com>
Date:   Wed Dec 6 01:42:19 2023 +0100

  gdbserver/win32: fix crash on detach

-- 
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 server/31337] MinGW error on detach: gdbserver/inferiors.cc:160: A problem internal to GDBserver has been detected
  2024-02-05  9:22 [Bug server/31337] New: MinGW error on detach: gdbserver/inferiors.cc:160: A problem internal to GDBserver has been detected dmitry.neverov at jetbrains dot com
  2024-02-05  9:33 ` [Bug server/31337] " dmitry.neverov at jetbrains dot com
  2024-02-05 13:21 ` tromey at sourceware dot org
@ 2024-02-05 15:42 ` dmitry.neverov at jetbrains dot com
  2024-02-05 16:29 ` tromey at sourceware dot org
  3 siblings, 0 replies; 5+ messages in thread
From: dmitry.neverov at jetbrains dot com @ 2024-02-05 15:42 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #3 from Dmitry Neverov <dmitry.neverov at jetbrains dot com> ---
(In reply to Tom Tromey from comment #2)
> I think this was probably fixed by
> 
> commit fa659800b009df1f0bdb0c5d24eec047fb9c3fa0
> Author: Stefano Moioli <smxdev4@gmail.com>
> Date:   Wed Dec 6 01:42:19 2023 +0100
> 
>   gdbserver/win32: fix crash on detach

Thanks! Checked: this commit indeed fixes the problem.

-- 
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 server/31337] MinGW error on detach: gdbserver/inferiors.cc:160: A problem internal to GDBserver has been detected
  2024-02-05  9:22 [Bug server/31337] New: MinGW error on detach: gdbserver/inferiors.cc:160: A problem internal to GDBserver has been detected dmitry.neverov at jetbrains dot com
                   ` (2 preceding siblings ...)
  2024-02-05 15:42 ` dmitry.neverov at jetbrains dot com
@ 2024-02-05 16:29 ` tromey at sourceware dot org
  3 siblings, 0 replies; 5+ messages in thread
From: tromey at sourceware dot org @ 2024-02-05 16:29 UTC (permalink / raw)
  To: gdb-prs

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

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|UNCONFIRMED                 |RESOLVED
   Target Milestone|---                         |15.1

--- Comment #4 from Tom Tromey <tromey at sourceware dot org> ---
Fixed.

-- 
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:[~2024-02-05 16:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-05  9:22 [Bug server/31337] New: MinGW error on detach: gdbserver/inferiors.cc:160: A problem internal to GDBserver has been detected dmitry.neverov at jetbrains dot com
2024-02-05  9:33 ` [Bug server/31337] " dmitry.neverov at jetbrains dot com
2024-02-05 13:21 ` tromey at sourceware dot org
2024-02-05 15:42 ` dmitry.neverov at jetbrains dot com
2024-02-05 16:29 ` tromey at sourceware dot org

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).