Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 May 2015 18:06:38 +0200
From:      Tijl Coosemans <tijl@FreeBSD.org>
To:        Jason Woodward <woodwardj@averesystems.com>
Cc:        freebsd-ports@freebsd.org, jhb@FreeBSD.org
Subject:   Re: gdb in ports
Message-ID:  <20150512180638.6202c711@kalimero.tijl.coosemans.org>
In-Reply-To: <CANybJcwyvTKFwmhpAQdKPwd42eGE_8MkiM2n-Ghf7Rfgqd1oFw@mail.gmail.com>
References:  <CANybJcwyvTKFwmhpAQdKPwd42eGE_8MkiM2n-Ghf7Rfgqd1oFw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 11 May 2015 16:21:42 -0400 Jason Woodward <woodwardj@averesystems.com> wrote:
> Hi all,
> 
> I had sent this to Luca but maybe others might have an idea...
> 
> 
> I'm running into some difficulty debugging a live, multithreaded
> application.  This seems to be the case with the 7.8.x gdbs and 7.9 (both
> 9.2 and 10 release).  When I attach, I see duplicates for the first thread:
> 
>   5    Thread 817ff2c00 (LWP 100541) 0x000000080bd6286c in poll () at
> poll.S:3
>   4    Thread 80efe8c00 (LWP 100546) 0x000000080bd6286c in poll () at
> poll.S:3
>   3    Thread 80efe9000 (LWP 100878) 0x000000080bd6286c in poll () at
> poll.S:3
> * 2    Thread 80efe9400 (LWP 101124) 0x000000080bd6286c in poll () at
> poll.S:3
> * 1    Thread 80efe9400 (LWP 101124) 0x000000080bd6286c in poll () at
> poll.S:3
> 
> Trying to select 1 or 2 always ends up selecting 2:
> 
> (gdb) thread 1
> [Switching to thread 2 (Thread 80efe9400 (LWP 101124))]
> #0  0x000000080bd6286c in poll () at poll.S:3
> 3       in poll.S
> (gdb) thread 2
> [Switching to thread 2 (Thread 80efe9400 (LWP 101124))]
> #0  0x000000080bd6286c in poll () at poll.S:33       in poll.S
> (gdb)
> 
> On top of this, when stepping through it seems threads that start and stop
> quickly have some sort of race condition that results in the thread
> tracking getting messed up.  Sometimes I'll end up on thread 74, other
> times I will be on a thread that has gone away and "info threads" does not
> show me associated with any of the active threads.  With 7.8.x I would see:
> 
>   Id   Target Id         Frame
>   75   Cannot find thread, Thread ID=101080, no thread to satisfy query
> 
> 
> Unsure if related, but after stepping through with 7.9, the following
> happens in fbsd_thread_wait():
> 
> infrun.c:5530: internal-error: switch_back_to_stepped_thread: Assertion
> `!tp->control.trap_expected' 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/>.
> 
> infrun.c:5530: internal-error: switch_back_to_stepped_thread: Assertion
> `!tp->control.trap_expected' failed.
> A problem internal to GDB has been detected,further debugging may prove
> unreliable.
> Create a core file of GDB? (y or n) n

CC jhb.  Maybe he can help.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150512180638.6202c711>