NetBSD Problem Report #55557

From gson@gson.org  Sun Aug  9 09:13:17 2020
Return-Path: <gson@gson.org>
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 C82761A9239
	for <gnats-bugs@gnats.NetBSD.org>; Sun,  9 Aug 2020 09:13:17 +0000 (UTC)
Message-Id: <20200809091312.A7224253EDE@guava.gson.org>
Date: Sun,  9 Aug 2020 12:13:12 +0300 (EEST)
From: gson@gson.org (Andreas Gustafsson)
Reply-To: gson@gson.org (Andreas Gustafsson)
To: gnats-bugs@NetBSD.org
Subject: Releases should include kernel debug symbols
X-Send-Pr-Version: 3.95

>Number:         55557
>Category:       toolchain
>Synopsis:       Releases should include kernel debug symbols
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    toolchain-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sun Aug 09 09:15:00 +0000 2020
>Last-Modified:  Sun Aug 09 21:40:01 +0000 2020
>Originator:     Andreas Gustafsson
>Release:        NetBSD-current
>Organization:
>Environment:
System: NetBSD
Architecture: all
Machine: all
>Description:

The official NetBSD binary releases have now included debug symbols
for userland programs for some time, in the optional "debug" sets,
but they do not include debug symbols for the kernel(s).

This seems backwards to me - I think kernel debug symbols are both
more important to have, and less costly in terms of space on the
install media, so if we include only one kind, it should be the kernel
ones.  And in most cases we probably could, and should, include both.

PR 50128 is somewhat related to this, but narrower in scope; that PR
is about having a way to do private release builds with kernel debug
symbols for a specific port, but having them in the official releases
for all ports would bring a far greater benefit by making it easier to
analyze kernel bugs when they impact users who have installed a binary
release.  Also, one reason why no progress has been made on 50128 may
be the difficulty of choosing between many different possible
solutions, and restricting the solution space to those that what will
work for the official releases may make the choice easier.

>How-To-Repeat:

>Fix:

>Audit-Trail:
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: toolchain/55557: Releases should include kernel debug symbols
Date: Sun, 9 Aug 2020 11:45:11 +0200

 On Sun, Aug 09, 2020 at 09:15:00AM +0000, Andreas Gustafsson wrote:
 > PR 50128 is somewhat related to this, but narrower in scope

 Building debug info for the kernel(s) is enabled by adding
 MKKDEBUG=yes (I have it in /etc/mk.conf, but should work as well if
 passed via -V on the build.sh command line). For each netbsd
 kernel generated, it creates an additional netbsd.gdb.
 But this is not installed / packaged anywheree.

 Christos recently added .debug files for modules, so with MKDEBUG=yes you
 should have all symbols in the build results.

 So we need to somehow package the netbsd.gdb files and make them available
 in the release dir.

 Martin

From: matthew green <mrg@eterna.com.au>
To: gnats-bugs@netbsd.org, martin@duskware.de
Cc: toolchain-manager@netbsd.org, gnats-admin@netbsd.org,
    netbsd-bugs@netbsd.org, gson@gson.org (Andreas Gustafsson)
Subject: re: toolchain/55557: Releases should include kernel debug symbols
Date: Mon, 10 Aug 2020 06:15:08 +1000

 thanks Andreas.

 we really should have a better solution around this.

 Martin Husemann writes:
 > So we need to somehow package the netbsd.gdb files and make them available
 > in the release dir.

 the big difference between these netbsd.gdb files and the
 foo.debug files in the debug sets is that netbsd.gdb has
 the full kernel *and* debug info, ie, it's a super set of
 the kernel itself.  for standard installs, we could have
 a normal path and debug-link link from /netbsd to the
 netbsd.debug, but managing those for multiple installs
 sounds difficult (eg, you want netbsd.old to point to the
 netbsd.old.debug you some how created.)

 or we could simply eat the space (but it's a lot of you
 have a lot of kernels!)


 .mrg.

From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: toolchain/55557: Releases should include kernel debug symbols
Date: Sun, 9 Aug 2020 23:37:28 +0200

 On Sun, Aug 09, 2020 at 08:20:01PM +0000, matthew green wrote:
 >  the big difference between these netbsd.gdb files and the
 >  foo.debug files in the debug sets is that netbsd.gdb has
 >  the full kernel *and* debug info, ie, it's a super set of
 >  the kernel itself.

 Yes. And it is not clear for which media/images/install types the full
 debug info kernel would be usefull, so we should not change that.

 But having an easy way to download the matching netbsd.gdb for releases
 (and "daily" builds) would be great.

 I'm not sure that would be enough to resolve this PR, but it is a very simple
 step forward.

 Martin

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.