This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: internal-error inferior_thread(): Assertion `tp' failed


On 2017-04-20 12:07, Luke Dalessandro wrote:
To reproduce using two shells:

<shell 1>

$ cat hello.cpp
#include <iostream>
#include <thread>
using namespace std;
int main() {
  thread([](){ cout << "hello world\n”; }).join();
  return 0;
}

$ g++ -pthread -o hello hello.cpp

$ ./hello
hello world

$ valgrind --vgdb-error=0 ./hello
==10408== Memcheck, a memory error detector
==10408== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al. ==10408== Using Valgrind-3.13.0.SVN and LibVEX; rerun with -h for copyright info
==10408== Command: ./hello
==10408==
==10408== (action at startup) vgdb me ...
==10408==
==10408== TO DEBUG THIS PROCESS USING GDB: start GDB like this
==10408==   /path/to/gdb ./hello
==10408== and then give GDB the following command
==10408==   target remote |
/u/ldalessa/.local/modules/valgrind/HEAD/lib/valgrind/../../bin/vgdb
--pid=10408
==10408== --pid is optional if only one valgrind process is running
==10408==

<shell 2>

$ gdb ./hello
GNU gdb (GDB) 8.0.50.20170420-git
Copyright (C) 2017 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 "x86_64-pc-linux-gnu".
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"...
Reading symbols from ./hello...(no debugging symbols found)…done.

(gdb) target remote |
/u/ldalessa/.local/modules/valgrind/HEAD/lib/valgrind/../../bin/vgdb
--pid=10408
Remote debugging using |
/u/ldalessa/.local/modules/valgrind/HEAD/lib/valgrind/../../bin/vgdb
--pid=10408
relaying data between gdb and process 10408
warning: remote target does not support file transfer, attempting to
access files from local filesystem.
Reading symbols from /lib64/ld-linux-x86-64.so.2...Reading symbols
from /usr/lib/debug//lib/x86_64-linux-gnu/ld-2.19.so...done.
done.
0x00000000040012d0 in _start () from /lib64/ld-linux-x86-64.so.2

(gdb) c
Continuing.
thread.c:100: internal-error: thread_info* inferior_thread():
Assertion `tp' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) y

This is a bug, please report it.  For instructions, see:
<http://www.gnu.org/software/gdb/bugs/>.

thread.c:100: internal-error: thread_info* inferior_thread():
Assertion `tp' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Create a core file of GDB? (y or n) y
Aborted (core dumped)

I've tried those steps and the program runs to completion normally.

I am using valgrind-3.10.1 and 8.0.50.20170420-git.

If this is really a bug I can just report along with the gdb stack
trace via bugzilla. I just wanted to verify that there’s not something
obvious on my end that would cause this.

An internal error from GDB is always a bug. If you could report it in bugzilla with as much details as you can, it would be appreciated.

Thanks!

Simon


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]