NetBSD Problem Report #60333

From www@netbsd.org  Mon Jun 15 07:53:11 2026
Return-Path: <www@netbsd.org>
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)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
	 client-signature RSA-PSS (2048 bits) client-digest SHA256)
	(Client CN "mail.netbsd.org", Issuer "R13" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id C73A51A923A
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 15 Jun 2026 07:53:10 +0000 (UTC)
Message-Id: <20260615075309.BEDC41A923B@mollari.NetBSD.org>
Date: Mon, 15 Jun 2026 07:53:09 +0000 (UTC)
From: vezhlys@gmail.com
Reply-To: vezhlys@gmail.com
To: gnats-bugs@NetBSD.org
Subject: sysinst(8): reproducible core dump when use default partitions selected on installation disk
X-Send-Pr-Version: www-1.0
X-From4GNATS: "vezhlys@gmail.com via gnats" <gnats-admin@NetBSD.org>

>Number:         60333
>Category:       install
>Synopsis:       sysinst(8): reproducible core dump when use default partitions selected on installation disk
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    martin
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 15 07:55:00 +0000 2026
>Closed-Date:    Tue Jul 07 21:39:57 +0000 2026
>Last-Modified:  Tue Jul 07 21:39:57 +0000 2026
>Originator:     Andrius V
>Release:        NetBSD 11.0 RC4
>Organization:
>Environment:
>Description:
There's an easily reproducible core dump when install disk is chosen as the one to install to and "Use default partition sizes" is selected.

I assume it is a bit invalid case use case, since the choice is likely trying to destroy root partition, nevertheless available to the user, and maybe it exposes some other bugs too? 

After the selection sysinst crash with error messages below:
assertion "parts->num_part == 0" failed: file "/usr/src/usr.sbin/sysinst/arch/amd64/../../bsddisklabel.c", line 1738, function "replace_by_default"
[1] Abort trap (core dump) ${cmd}


>How-To-Repeat:
Boot on amd64 USB flash drive flash drive (tried on BIOS boot)

Select options:
Installation messages in English
unchanged
Install NetBSD to hard disk
Yes
sd0 (install disk in my case)
This is the correct geometry
Use default partition sizes
Observe sysinst crash
>Fix:

>Release-Note:

>Audit-Trail:
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: install/60333: sysinst(8): reproducible core dump when use
 default partitions selected on installation disk
Date: Mon, 15 Jun 2026 10:05:27 +0200

 On Mon, Jun 15, 2026 at 07:55:01AM +0000, vezhlys@gmail.com via gnats wrote:
 > sd0 (install disk in my case)

 Just to make sure I understand correctly:

 sd0 is the USB stick you booted from?

 I wonder why that is offered at all (but have to check the amd64
 install image, it probably uses a ramdisk as root, which would explain
 this).

 Martin

From: Andrius V <vezhlys@gmail.com>
To: gnats-bugs@netbsd.org
Cc: install-manager@netbsd.org
Subject: Re: install/60333: sysinst(8): reproducible core dump when use
 default partitions selected on installation disk
Date: Mon, 15 Jun 2026 11:36:00 +0300

 On Mon, Jun 15, 2026 at 11:10=E2=80=AFAM Martin Husemann via gnats
 <gnats-admin@netbsd.org> wrote:
 >
 > The following reply was made to PR install/60333; it has been noted by GN=
 ATS.
 >
 > From: Martin Husemann <martin@duskware.de>
 > To: gnats-bugs@netbsd.org
 > Cc:
 > Subject: Re: install/60333: sysinst(8): reproducible core dump when use
 >  default partitions selected on installation disk
 > Date: Mon, 15 Jun 2026 10:05:27 +0200
 >
 >  On Mon, Jun 15, 2026 at 07:55:01AM +0000, vezhlys@gmail.com via gnats wr=
 ote:
 >  > sd0 (install disk in my case)
 >
 >  Just to make sure I understand correctly:
 >
 >  sd0 is the USB stick you booted from?
 >
 >  I wonder why that is offered at all (but have to check the amd64
 >  install image, it probably uses a ramdisk as root, which would explain
 >  this).
 >
 >  Martin
 >

 Yes, it was the same USB I was booted from.
 However, I think I also reproduced ot with two USB disks having NetBSD
 installation (it crashes on both the same way), so maybe it is related
 to install image layout...

From: Martin Husemann <martin@duskware.de>
To: Andrius V <vezhlys@gmail.com>
Cc: gnats-bugs@netbsd.org
Subject: Re: install/60333: sysinst(8): reproducible core dump when use
 default partitions selected on installation disk
Date: Mon, 15 Jun 2026 11:38:57 +0200

 On Mon, Jun 15, 2026 at 11:36:00AM +0300, Andrius V wrote:
 > However, I think I also reproduced ot with two USB disks having NetBSD
 > installation (it crashes on both the same way), so maybe it is related
 > to install image layout...

 Maybe related/duplicate of PR 60331?

 Martin

From: Andrius V <vezhlys@gmail.com>
To: Martin Husemann <martin@duskware.de>
Cc: gnats-bugs@netbsd.org
Subject: Re: install/60333: sysinst(8): reproducible core dump when use
 default partitions selected on installation disk
Date: Mon, 15 Jun 2026 10:06:14 +0000

 On Mon, Jun 15, 2026 at 12:39=E2=80=AFPM Martin Husemann <martin@duskware.d=
 e> wrote:
 >
 > On Mon, Jun 15, 2026 at 11:36:00AM +0300, Andrius V wrote:
 > > However, I think I also reproduced ot with two USB disks having NetBSD
 > > installation (it crashes on both the same way), so maybe it is related
 > > to install image layout...
 >
 > Maybe related/duplicate of PR 60331?
 >
 > Martin

 I am not sure, can be manifestation of the same in different ways.
 60331 mentions completing partitioning, in my case I just click on the
 menu item to list default partitions, and it fails immediately.
 If it is under the hood it is "completing partitioning", it can be
 same/similar issue. I use RC4 image, so hopefully easier to reproduce.

 I installed RC4 on nvme device yesterday, partitioning it had no
 issues for me (also selecting default partition sizes didn't cause a
 crash).
 So far I can reproduce it only with USB drives containing NetBSD install im=
 age.

 bt from the core dump:
 #0  0x0000700a5a52aeaa in _lwp_kill () from /usr/lib/libc.so.12
 #1  0x0000700a5a53a4b4 in abort () from /usr/lib/libc.so.12
 #2  0x0000700a5a4f195d in __assert13 () from /usr/lib/libc.so.12
 #3  0x00000000010110dd in make_bsd_partitions ()
 #4  0x0000000000ff12b7 in do_install ()
 #5  0x0000000000fec0d5 in opt_act_2_0 ()
 #6  0x0000000000fee741 in process_menu ()
 #7  0x0000000001020182 in main ()

From: Martin Husemann <martin@duskware.de>
To: Andrius V <vezhlys@gmail.com>
Cc: gnats-bugs@netbsd.org
Subject: Re: install/60333: sysinst(8): reproducible core dump when use
 default partitions selected on installation disk
Date: Mon, 15 Jun 2026 12:14:31 +0200

 On Mon, Jun 15, 2026 at 10:06:14AM +0000, Andrius V wrote:
 > So far I can reproduce it only with USB drives containing NetBSD install image.

 That is easy to test, I'll have a look at it!

 Martin

From: Martin Husemann <martin@duskware.de>
To: Andrius V <vezhlys@gmail.com>
Cc: gnats-bugs@netbsd.org
Subject: Re: install/60333: sysinst(8): reproducible core dump when use
 default partitions selected on installation disk
Date: Mon, 15 Jun 2026 20:34:45 +0200

 This seems to happen when you write a GPT image to a larger disk
 but do not use "gpt resizedisk" afterwards.

 The GPT code in sysinst should auto-detect this and offer to fix.

 Martin

Responsible-Changed-From-To: install-manager->martin
Responsible-Changed-By: martin@NetBSD.org
Responsible-Changed-When: Sun, 21 Jun 2026 20:03:48 +0000
Responsible-Changed-Why:
I dealt with it


State-Changed-From-To: open->feedback
State-Changed-By: martin@NetBSD.org
State-Changed-When: Sun, 21 Jun 2026 20:03:48 +0000
State-Changed-Why:
Should be fixed in -current, can you re-test?


From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/60333 CVS commit: src/usr.sbin/sysinst
Date: Sun, 21 Jun 2026 20:02:43 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Sun Jun 21 20:02:43 UTC 2026

 Modified Files:
 	src/usr.sbin/sysinst: gpt.c msg.mi.de msg.mi.en msg.mi.es msg.mi.fr
 	    msg.mi.pl

 Log Message:
 PR 60333: make the GPT reading code recognize when the GPT does not
 cover the whole disk (like after copying an install image to a device)
 and offer to fix it.


 To generate a diff of this commit:
 cvs rdiff -u -r1.32 -r1.33 src/usr.sbin/sysinst/gpt.c
 cvs rdiff -u -r1.56 -r1.57 src/usr.sbin/sysinst/msg.mi.de
 cvs rdiff -u -r1.57 -r1.58 src/usr.sbin/sysinst/msg.mi.en
 cvs rdiff -u -r1.47 -r1.48 src/usr.sbin/sysinst/msg.mi.es
 cvs rdiff -u -r1.50 -r1.51 src/usr.sbin/sysinst/msg.mi.fr
 cvs rdiff -u -r1.53 -r1.54 src/usr.sbin/sysinst/msg.mi.pl

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: Andrius V <vezhlys@gmail.com>
To: gnats-bugs@netbsd.org
Cc: martin@netbsd.org
Subject: Re: install/60333 (sysinst(8): reproducible core dump when use
 default partitions selected on installation disk)
Date: Mon, 22 Jun 2026 23:27:38 +0300

 On Sun, Jun 21, 2026 at 11:03=E2=80=AFPM <martin@netbsd.org> wrote:
 >
 > Synopsis: sysinst(8): reproducible core dump when use default partitions =
 selected on installation disk
 >
 > Responsible-Changed-From-To: install-manager->martin
 > Responsible-Changed-By: martin@NetBSD.org
 > Responsible-Changed-When: Sun, 21 Jun 2026 20:03:48 +0000
 > Responsible-Changed-Why:
 > I dealt with it
 >
 >
 > State-Changed-From-To: open->feedback
 > State-Changed-By: martin@NetBSD.org
 > State-Changed-When: Sun, 21 Jun 2026 20:03:48 +0000
 > State-Changed-Why:
 > Should be fixed in -current, can you re-test?
 >
 >
 >

 Hi,

 Looks good: suggested to fix the size and installed successfully.

State-Changed-From-To: feedback->closed
State-Changed-By: andvar@NetBSD.org
State-Changed-When: Tue, 07 Jul 2026 21:39:57 +0000
State-Changed-Why:
fixed by martin and pulled up to netbsd-11

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.