* [Bug remote/17397] i686-w64-mingw32 remote multiprocess debugging: thread.c:1002: internal-error: switch_to_thread: Assertion `inf != NULL' failed.
2014-09-16 13:13 [Bug remote/17397] New: i686-w64-mingw32 remote multiprocess debugging: thread.c:1002: internal-error: switch_to_thread: Assertion `inf != NULL' failed jerome.gardou at reactos dot org
@ 2015-02-26 19:44 ` jerome.gardou at reactos dot org
2015-02-27 10:08 ` jerome.gardou at reactos dot org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jerome.gardou at reactos dot org @ 2015-02-26 19:44 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=17397
--- Comment #2 from jerome.gardou at reactos dot org ---
Created attachment 8149
--> https://sourceware.org/bugzilla/attachment.cgi?id=8149&action=edit
GDB backtrace
Here is a relevant backtrace from the crashed GDB session.
i686-w64-mingw32-gdb --version
GNU gdb (GDB) 7.8
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-unknown-linux-gnu
--target=i686-w64-mingw32".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug remote/17397] i686-w64-mingw32 remote multiprocess debugging: thread.c:1002: internal-error: switch_to_thread: Assertion `inf != NULL' failed.
2014-09-16 13:13 [Bug remote/17397] New: i686-w64-mingw32 remote multiprocess debugging: thread.c:1002: internal-error: switch_to_thread: Assertion `inf != NULL' failed jerome.gardou at reactos dot org
2015-02-26 19:44 ` [Bug remote/17397] " jerome.gardou at reactos dot org
@ 2015-02-27 10:08 ` jerome.gardou at reactos dot org
2015-02-27 11:45 ` palves at redhat dot com
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jerome.gardou at reactos dot org @ 2015-02-27 10:08 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=17397
jerome.gardou at reactos dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #7788|0 |1
is obsolete| |
--- Comment #3 from jerome.gardou at reactos dot org ---
Created attachment 8150
--> https://sourceware.org/bugzilla/attachment.cgi?id=8150&action=edit
GDB log triggering the crash
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug remote/17397] i686-w64-mingw32 remote multiprocess debugging: thread.c:1002: internal-error: switch_to_thread: Assertion `inf != NULL' failed.
2014-09-16 13:13 [Bug remote/17397] New: i686-w64-mingw32 remote multiprocess debugging: thread.c:1002: internal-error: switch_to_thread: Assertion `inf != NULL' failed jerome.gardou at reactos dot org
2015-02-26 19:44 ` [Bug remote/17397] " jerome.gardou at reactos dot org
2015-02-27 10:08 ` jerome.gardou at reactos dot org
@ 2015-02-27 11:45 ` palves at redhat dot com
2015-02-27 12:01 ` jerome.gardou at reactos dot org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: palves at redhat dot com @ 2015-02-27 11:45 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=17397
Pedro Alves <palves at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |palves at redhat dot com
--- Comment #4 from Pedro Alves <palves at redhat dot com> ---
I suspect this is fixed in more recent GDB. Could you try mainline?
Also, can you debug GDB a little? What was the ptid of the thread that
GDB was expecting to find in the thread list, but isn't there? And why isn't
it there anymore? The ptid is unfortunately not visible here (frame #6):
...
#4 0x00000000006336b9 in internal_verror (file=<optimized out>,
line=<optimized out>, fmt=<optimized out>, ap=ap@entry=0x7fff7cd84ac8)
at utils.c:803
#5 0x0000000000633762 in internal_error (file=file@entry=0x771a62 "thread.c",
line=line@entry=1002, string=<optimized out>) at utils.c:813
#6 0x000000000056a6df in switch_to_thread (ptid=...) at thread.c:1002
#7 0x000000000056b607 in print_thread_info (uiout=0x2233590,
requested_threads=0x226f8e0 "1", pid=-1) at thread.c:928
#8 0x00000000004aa601 in mi_cmd_execute (parse=0x2228820)
at ./mi/mi-main.c:2253
#9 captured_mi_execute_command (context=0x2228820, uiout=0x2233590)
at ./mi/mi-main.c:1988
#10 mi_execute_command (cmd=0x22701c0 "23-thread-info 1",
from_tty=<optimized out>) at ./mi/mi-main.c:2116
...
Please get a backtrace with "set print frame-arguments all".
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug remote/17397] i686-w64-mingw32 remote multiprocess debugging: thread.c:1002: internal-error: switch_to_thread: Assertion `inf != NULL' failed.
2014-09-16 13:13 [Bug remote/17397] New: i686-w64-mingw32 remote multiprocess debugging: thread.c:1002: internal-error: switch_to_thread: Assertion `inf != NULL' failed jerome.gardou at reactos dot org
` (2 preceding siblings ...)
2015-02-27 11:45 ` palves at redhat dot com
@ 2015-02-27 12:01 ` jerome.gardou at reactos dot org
2015-02-27 12:03 ` jerome.gardou at reactos dot org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jerome.gardou at reactos dot org @ 2015-02-27 12:01 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=17397
--- Comment #5 from jerome.gardou at reactos dot org ---
Created attachment 8151
--> https://sourceware.org/bugzilla/attachment.cgi?id=8151&action=edit
GDB 7.9 crash log
I tried with GDB 7.9, with debugging (-g3) enabled and disabled optimizations.
There is still an assert failing, but quite different this time. I don't know
if this is a different symptom of the same bug, or another one.
Here is the log triggering the crash.
I will try to compile mainline as soon as I can.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug remote/17397] i686-w64-mingw32 remote multiprocess debugging: thread.c:1002: internal-error: switch_to_thread: Assertion `inf != NULL' failed.
2014-09-16 13:13 [Bug remote/17397] New: i686-w64-mingw32 remote multiprocess debugging: thread.c:1002: internal-error: switch_to_thread: Assertion `inf != NULL' failed jerome.gardou at reactos dot org
` (3 preceding siblings ...)
2015-02-27 12:01 ` jerome.gardou at reactos dot org
@ 2015-02-27 12:03 ` jerome.gardou at reactos dot org
2015-02-27 14:02 ` jerome.gardou at reactos dot org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jerome.gardou at reactos dot org @ 2015-02-27 12:03 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=17397
--- Comment #6 from jerome.gardou at reactos dot org ---
Created attachment 8152
--> https://sourceware.org/bugzilla/attachment.cgi?id=8152&action=edit
GDB 7.9 crash dump
GDB 7.9 core analysis.
Please let me know if you need some more info from a particular frame.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug remote/17397] i686-w64-mingw32 remote multiprocess debugging: thread.c:1002: internal-error: switch_to_thread: Assertion `inf != NULL' failed.
2014-09-16 13:13 [Bug remote/17397] New: i686-w64-mingw32 remote multiprocess debugging: thread.c:1002: internal-error: switch_to_thread: Assertion `inf != NULL' failed jerome.gardou at reactos dot org
` (4 preceding siblings ...)
2015-02-27 12:03 ` jerome.gardou at reactos dot org
@ 2015-02-27 14:02 ` jerome.gardou at reactos dot org
2015-02-27 16:48 ` jerome.gardou at reactos dot org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jerome.gardou at reactos dot org @ 2015-02-27 14:02 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=17397
jerome.gardou at reactos dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #8151|0 |1
is obsolete| |
--- Comment #7 from jerome.gardou at reactos dot org ---
Created attachment 8153
--> https://sourceware.org/bugzilla/attachment.cgi?id=8153&action=edit
GDB 7.9 log triggering the crash
Sorry, attached wrong file.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug remote/17397] i686-w64-mingw32 remote multiprocess debugging: thread.c:1002: internal-error: switch_to_thread: Assertion `inf != NULL' failed.
2014-09-16 13:13 [Bug remote/17397] New: i686-w64-mingw32 remote multiprocess debugging: thread.c:1002: internal-error: switch_to_thread: Assertion `inf != NULL' failed jerome.gardou at reactos dot org
` (5 preceding siblings ...)
2015-02-27 14:02 ` jerome.gardou at reactos dot org
@ 2015-02-27 16:48 ` jerome.gardou at reactos dot org
2015-03-19 11:26 ` palves at redhat dot com
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jerome.gardou at reactos dot org @ 2015-02-27 16:48 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=17397
--- Comment #8 from jerome.gardou at reactos dot org ---
I've tried today's git (commit ID 96c20bc18d71ca5ae3335d48ff2b459d495032d3),
the same problem occurs.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug remote/17397] i686-w64-mingw32 remote multiprocess debugging: thread.c:1002: internal-error: switch_to_thread: Assertion `inf != NULL' failed.
2014-09-16 13:13 [Bug remote/17397] New: i686-w64-mingw32 remote multiprocess debugging: thread.c:1002: internal-error: switch_to_thread: Assertion `inf != NULL' failed jerome.gardou at reactos dot org
` (6 preceding siblings ...)
2015-02-27 16:48 ` jerome.gardou at reactos dot org
@ 2015-03-19 11:26 ` palves at redhat dot com
2015-04-04 14:59 ` jerome.gardou at reactos dot org
2015-04-07 8:35 ` palves at redhat dot com
9 siblings, 0 replies; 11+ messages in thread
From: palves at redhat dot com @ 2015-03-19 11:26 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=17397
--- Comment #9 from Pedro Alves <palves at redhat dot com> ---
Thanks. I can reproduce this with GNU/Linux gdbserver.
On one shell:
$ gdbserver --multi :9999 a.out
On another, connect with extended-remote, so we can start
two processes under the same gdbserver:
$ gdb a.out -ex "tar extended-remote :9999"
...
GNU gdb (GDB) 7.9.50.20150318-cvs
...
Reading symbols from ./a.out...done.
Remote debugging using :9999
...
0x0000003615a011f0 in _start () from /lib64/ld-linux-x86-64.so.2
(gdb) info inferiors
Num Description Executable
* 1 process 24970 a.out
(gdb) add-inferior
Added inferior 2
(gdb) inferior 2
[Switching to inferior 2 [<null>] (<noexec>)]
(gdb) info inferiors
Num Description Executable
* 2 <null>
1 process 24970 a.out
(gdb) file a.out
Reading symbols from a.out...done.
(gdb) info inferiors
Num Description Executable
* 2 <null> a.out
1 process 24970 a.out
(gdb) start
Temporary breakpoint 1 at 0x411b67: main. (2 locations)
Starting program: /home/pedro/a.out
Temporary breakpoint 1, main (argc=1, argv=0x7fffffffd908) at
/home/pedro/foo.c:10
10 return 0;
(gdb) info inferiors
Num Description Executable
* 2 process 24977 a.out
1 process 24970 a.out
Now, disconnect, and reconnect, to emulate the OPs use case.
(gdb) disconnect
Ending remote debugging.
(gdb) info inferiors
Num Description Executable
* 2 <null> a.out
1 <null> a.out
(gdb) tar remote :9999
Remote debugging using :9999
Reading symbols from /lib64/libdl.so.2...Reading symbols from /usr/lib/debug
(...)
main (argc=1, argv=0x7fffffffd908) at /home/pedro/foo.c:10
10 return 0;
(gdb) info inferiors
Num Description Executable
* 2 process 24977 a.out
1 <null> a.out
(gdb) info threads
Id Target Id Frame
* 2 Thread 24977 main (argc=1, argv=0x7fffffffd908) at
/home/pedro/foo.c:10
1 Thread 24970
/home/pedro/gdb/mygit/src/gdb/thread.c:1182: internal-error: switch_to_thread:
Assertion `inf != NULL' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n)
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug remote/17397] i686-w64-mingw32 remote multiprocess debugging: thread.c:1002: internal-error: switch_to_thread: Assertion `inf != NULL' failed.
2014-09-16 13:13 [Bug remote/17397] New: i686-w64-mingw32 remote multiprocess debugging: thread.c:1002: internal-error: switch_to_thread: Assertion `inf != NULL' failed jerome.gardou at reactos dot org
` (7 preceding siblings ...)
2015-03-19 11:26 ` palves at redhat dot com
@ 2015-04-04 14:59 ` jerome.gardou at reactos dot org
2015-04-07 8:35 ` palves at redhat dot com
9 siblings, 0 replies; 11+ messages in thread
From: jerome.gardou at reactos dot org @ 2015-04-04 14:59 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=17397
--- Comment #10 from jerome.gardou at reactos dot org ---
Thanks for looking into this.
Quoting you: "Now, disconnect, and reconnect, to emulate the OPs use case." I
guess this is the way you "emulate" the fact that processes were created before
the GDB connection, or is there something wrong in the way the stub talks to
GDB ?
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug remote/17397] i686-w64-mingw32 remote multiprocess debugging: thread.c:1002: internal-error: switch_to_thread: Assertion `inf != NULL' failed.
2014-09-16 13:13 [Bug remote/17397] New: i686-w64-mingw32 remote multiprocess debugging: thread.c:1002: internal-error: switch_to_thread: Assertion `inf != NULL' failed jerome.gardou at reactos dot org
` (8 preceding siblings ...)
2015-04-04 14:59 ` jerome.gardou at reactos dot org
@ 2015-04-07 8:35 ` palves at redhat dot com
9 siblings, 0 replies; 11+ messages in thread
From: palves at redhat dot com @ 2015-04-07 8:35 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=17397
--- Comment #11 from Pedro Alves <palves at redhat dot com> ---
> Quoting you: "Now, disconnect, and reconnect, to emulate the OPs use case." I
> guess this is the way you "emulate" the fact that processes were created before
> the GDB connection,
Correct.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread