NetBSD Problem Report #53886

From martin@duskware.de  Thu Jan 17 11:33:00 2019
Return-Path: <martin@duskware.de>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 1A7397A154
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 17 Jan 2019 11:33:00 +0000 (UTC)
Message-Id: <20190117113251.540A35CC816@emmas.aprisoft.de>
Date: Thu, 17 Jan 2019 12:32:51 +0100 (CET)
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: gdb on aarch64 sometimes can not handle new threads
X-Send-Pr-Version: 3.95

>Number:         53886
>Category:       toolchain
>Synopsis:       gdb on aarch64 sometimes can not handle new threads
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jan 17 11:35:00 +0000 2019
>Originator:     Martin Husemann
>Release:        NetBSD 8.99.30
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD painkiller.duskware.de 8.99.30 NetBSD 8.99.30 (GENERIC64) #22: Mon Jan 14 14:13:30 CET 2019 martin@seven-days-to-the-wolves.aprisoft.de:/work/src/sys/arch/evbarm/compile/GENERIC64 evbarm
Architecture: aarch64
Machine: evbarm
>Description:

Trying to debug threaded programs someimes work (e.g. all pthread tests seem
to work just fine), but sometimes with more complex programs fails, the new
thread breakpoint in ld.elf_so is not properly recognized. When in this state
it is also impossible to kill the debuggee (maybe because it is still in
stopped state) or quit gdb (hangs on quit/^D).

Sample session:


[/tmp] martin@painkiller > gdb xfce4-session
GNU gdb (GDB) 8.0.1
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 "aarch64--netbsd".
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 xfce4-session...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/pkg/bin/xfce4-session 
[New LWP 1 of process 25997]

Thread 2 received signal SIGTRAP, Trace/breakpoint trap.
0x0000fffffbed0aa0 in _rtld_start () from /usr/libexec/ld.elf_so
(gdb) kill
Kill the program being debugged? (y or n) y
^Z
Suspended
[/tmp] martin@painkiller > kill -9 %1
[/tmp] martin@painkiller > [ 68873.4740244] sorry, pid 5813 was killed: orphaned traced process
[ 68873.4740244] sorry, pid 25997 was killed: orphaned traced process
[1]    Killed                        gdb xfce4-session
[/tmp] martin@painkiller > pgrep xfce4-session
[/tmp] martin@painkiller > 


>How-To-Repeat:
s/a

>Fix:
n/a

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.