Re: debug of multithreaded program turns to be impossible during execution

Pedro Alves <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
On 08/14/2014 04:52 PM, Avi Gozlan wrote:
> GDB 7.8 yields a similar behavior:
> 
> (gdb) c
> Continuing.
> ...
> [New Thread 0x43c05940 (LWP 3311)]
> [New Thread 0x44606940 (LWP 3312)]
> ...
> [Thread 0x44606940 (LWP 3312) exited]
> [Switching to Thread 0x43c05940 (LWP 3311)]
> Cannot remove breakpoints because program is no longer writable.
> Further execution is probably impossible.
> 0x00002aaaab98348f in start_thread () from /lib64/libpthread.so.0
> ptrace: No such process.
> (gdb) [Thread 0x46409940 (LWP 3315) exited]
> [Thread 0x45a08940 (LWP 3314) exited]
> [Thread 0x43c05940 (LWP 3311) exited]
> [Inferior 1 (process 3268) exited normally]
> 
> The only difference is that in 7.8 case, GDB continues automatically after giving the ptrace message.

Any chance you could try your reproducer with a more recent
system?  Mainly, I'm wondering whether kernel/glibc are at play here.

Also, a run with:

 set debug infrun 1
 set debug target 1
 set debug lin-lwp 1

may help diagnose the issue.

Thanks,
Pedro Alves
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.