Bug 28010 - ver 10.2 error MacOS/11.4 "../../gdb/thread.c:95: internal-error: struct thread_info *inferior_thread(): Assertion `current_thread_ != nullptr' failed."
Summary: ver 10.2 error MacOS/11.4 "../../gdb/thread.c:95: internal-error: struct thr...
Status: RESOLVED DUPLICATE of bug 26912
Alias: None
Product: gdb
Classification: Unclassified
Component: gdb (show other bugs)
Version: HEAD
: P1 critical
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-24 17:17 UTC by Sam Warner
Modified: 2021-07-02 18:55 UTC (History)
3 users (show)

See Also:
Host: OS-x 11.4
Target: x86-64
Build: 10.2
Last reconfirmed:
Project(s) to access:
ssh public key:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Warner 2021-06-24 17:17:47 UTC
MacOs/11.4
GDB 10.2 from Homebrew
using either Eclipse/CDT 2021.06 or command-line

causing error:
(gdb) file /Users/sam/eclipse-workspace/Eclipse.HelloWorld.MacOS.Gcc/Debug/Eclipse.HelloWorld.MacOS.Gcc
Reading symbols from /Users/sam/eclipse-workspace/Eclipse.HelloWorld.MacOS.Gcc/Debug/Eclipse.HelloWorld.MacOS.Gcc...
../../gdb/thread.c:95: internal-error: struct thread_info *inferior_thread(): Assertion `current_thread_ != nullptr' failed.

yet, if I elect to not stop, and continue I can set breakpoints and control execution of the binary:
../../gdb/thread.c:95: internal-error: struct thread_info *inferior_thread(): Assertion `current_thread_ != nullptr' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Create a core file of GDB? (y or n) n
Command aborted.
(gdb) b main
Breakpoint 1 at 0x10000270f: file ../src/Eclipse.HelloWorld.MacOS.Gcc.temp.cpp, line 22.
(gdb) bl
Undefined command: "bl".  Try "help".
(gdb) run
Starting program: /Users/sam/eclipse-workspace/Eclipse.HelloWorld.MacOS.Gcc/Debug/Eclipse.HelloWorld.MacOS.Gcc 
[New Thread 0x2203 of process 4658]
[New Thread 0x1b03 of process 4658]
warning: unhandled dyld version (17)

Thread 2 hit Breakpoint 1, main (argc=1, argv=0x7ffeefbffa68) at ../src/Eclipse.HelloWorld.MacOS.Gcc.temp.cpp:22
22		 mainPhilosopher();
Comment 1 Sam Warner 2021-06-25 21:45:02 UTC
I should add that when I use GDB where I put the application to be debugged on the command line of a Terminal within OS-X, everything functions flawlessly.  It's only when I use the "file" command or the equivalent GDB/MI command that the 'null pointer" issue shows up.

( GDB app in my install has been fully enabled to execute with 'code signing' instructions.)

What prompted my investigation in narrowing down the problem was the GDB/MI seemed to be having some issue, later I found it was simply the 'file' command.

Sam
Comment 2 Sam Warner 2021-06-26 18:28:47 UTC
anything I should be doing to enable the status to change to "Confirmed"?
Comment 4 Sam Warner 2021-07-02 18:55:18 UTC
yes - 26912 (while different compilers/etc) is experiencing the same issue

*** This bug has been marked as a duplicate of bug 26912 ***