NetBSD Problem Report #55908
From martin@duskware.de Mon Jan 4 16:58:48 2021
Return-Path: <martin@duskware.de>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_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 B15CB1A9217
for <gnats-bugs@gnats.NetBSD.org>; Mon, 4 Jan 2021 16:58:48 +0000 (UTC)
Date: Mon, 04 Jan 2021 17:58:45 CET
From: martin@NetBSD.org
Reply-To: martin
To: gnats-bugs@NetBSD.org
Subject: gdb does not work for mips64 with 32bit userland
X-Send-Pr-Version: 3.95
>Number: 55908
>Notify-List: riastradh@NetBSD.org
>Category: bin
>Synopsis: gdb does not work for mips64 with 32bit userland
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: needs-pullups
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Jan 04 17:00:01 +0000 2021
>Closed-Date:
>Last-Modified: Sat Apr 19 09:57:18 +0000 2025
>Originator: Martin Husemann
>Release: NetBSD 9.99.77
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD supremacy.duskware.de 9.99.77 NetBSD 9.99.77 (OCTEON) #2: Sun Jan 3 14:18:28 CET 2021 martin@seven-days-to-the-wolves.aprisoft.de:/work/src/sys/arch/evbmips/compile/OCTEON evbmips
Architecture: mips64eb
Machine: evbmips
>Description:
On an ELRIT3 (mips64 with 32bit userland) gdb is not mapping text addresses
correctly:
GNU gdb (GDB) 11.0.50.20200914-git
[..]
Reading symbols from dhcpcd...
Reading symbols from /usr/libdata/debug//sbin/dhcpcd.debug...
(gdb) set verbose
(gdb) run -6
Starting program: /sbin/dhcpcd -6
Using PIE (Position Independent Executable) displacement 0x10000 for "/sbin/dhcpcd".
Reading symbols from /libexec/ld.elf_so...
Reading symbols from /usr/libdata/debug//libexec/ld.elf_so.debug...
Reading in symbols for /work/src/libexec/ld.elf_so/rtld.c...
Program received signal SIGSEGV, Segmentation fault.
0x785f9f20 in ?? (warning: GDB can't find the start of the function at 0x785f9f20.
>How-To-Repeat:
s/a
>Fix:
n/a
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: martin@NetBSD.org
State-Changed-When: Mon, 04 Jan 2021 19:39:17 +0000
State-Changed-Why:
The ptrace problem has been fixed and this symptom is gone,
it still does not work - see PR 55908 for gdb or aux vector
fallout
State-Changed-From-To: closed->open
State-Changed-By: martin@NetBSD.org
State-Changed-When: Tue, 05 Jan 2021 09:55:59 +0000
State-Changed-Why:
Ooops, confused the two PRs - this one is supposed to track the
aux vector or gdb lossage that is remaining, after ptrace fallout
in PR 54524 has been fixed.
From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@netbsd.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,
martin@NetBSD.org
Cc:
Subject: Re: bin/55908 (gdb does not work for mips64 with 32bit userland)
Date: Tue, 5 Jan 2021 10:17:19 -0500
On Jan 5, 9:56am, martin@NetBSD.org (martin@NetBSD.org) wrote:
-- Subject: Re: bin/55908 (gdb does not work for mips64 with 32bit userland)
| Synopsis: gdb does not work for mips64 with 32bit userland
|
| State-Changed-From-To: closed->open
| State-Changed-By: martin@NetBSD.org
| State-Changed-When: Tue, 05 Jan 2021 09:55:59 +0000
| State-Changed-Why:
| Ooops, confused the two PRs - this one is supposed to track the
| aux vector or gdb lossage that is remaining, after ptrace fallout
| in PR 54524 has been fixed.
How do I reproduce? I tried both a core file and running with breakpoints
and it works.
christos
From: Martin Husemann <martin@duskware.de>
To: Christos Zoulas <christos@zoulas.com>
Cc: gnats-bugs@netbsd.org
Subject: Re: bin/55908 (gdb does not work for mips64 with 32bit userland)
Date: Tue, 5 Jan 2021 16:23:15 +0100
On Tue, Jan 05, 2021 at 10:17:19AM -0500, Christos Zoulas wrote:
> How do I reproduce? I tried both a core file and running with breakpoints
> and it works.
It depends on the binary, with "ls" everything seems to work,
with "dhcpcd" it fails for me (this is with -current as of last weekend).
Martin
State-Changed-From-To: open->feedback
State-Changed-By: riastradh@NetBSD.org
State-Changed-When: Thu, 17 Apr 2025 21:54:55 +0000
State-Changed-Why:
Is this still an issue? I bet it was fixed by:
https://mail-index.netbsd.org/source-changes/2025/04/16/msg156417.html
(ld.elf_so: Teach this to handle MIPS PIE rtld debug data.)
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: bin/55908 (gdb does not work for mips64 with 32bit userland)
Date: Fri, 18 Apr 2025 11:18:12 +0200
On Thu, Apr 17, 2025 at 09:54:55PM +0000, riastradh@NetBSD.org wrote:
> Is this still an issue? I bet it was fixed by:
> https://mail-index.netbsd.org/source-changes/2025/04/16/msg156417.html
> (ld.elf_so: Teach this to handle MIPS PIE rtld debug data.)
I would guess so too, but I can not quickly/easily test right now.
Martin
From: Rin Okuyama <rokuyama.rk@gmail.com>
To: gnats-bugs@netbsd.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,
martin@netbsd.org, Taylor R Campbell <riastradh@NetBSD.org>
Cc:
Subject: Re: bin/55908 (gdb does not work for mips64 with 32bit userland)
Date: Sat, 19 Apr 2025 12:23:36 +0900
Hi,
On 2025/04/18 18:20, Martin Husemann via gnats wrote:
> On Thu, Apr 17, 2025 at 09:54:55PM +0000, riastradh@NetBSD.org wrote:
> > Is this still an issue? I bet it was fixed by:
> > https://mail-index.netbsd.org/source-changes/2025/04/16/msg156417.html
> > (ld.elf_so: Teach this to handle MIPS PIE rtld debug data.)
>
> I would guess so too, but I can not quickly/easily test right now.
The example described in PR works just fine for me on my ERLite-3
(with HAVE_JEMALLOC=510 userland):
https://gist.github.com/rokuyama/e356a2faa395e16290f6b0d04d45e72e
Thanks riastradh@ for working on this!!
rin
State-Changed-From-To: feedback->needs-pullups
State-Changed-By: riastradh@NetBSD.org
State-Changed-When: Sat, 19 Apr 2025 09:57:18 +0000
State-Changed-Why:
fixed in HEAD, needs pullup-9 and pullup-10, same as PR 59296
https://mail-index.netbsd.org/source-changes/2025/04/16/msg156417.html
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2025
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.