NetBSD Problem Report #57698
From www@netbsd.org Wed Nov 15 13:40:43 2023
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))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id CCB8E1A9238
for <gnats-bugs@gnats.NetBSD.org>; Wed, 15 Nov 2023 13:40:43 +0000 (UTC)
Message-Id: <20231115134042.8262B1A9239@mollari.NetBSD.org>
Date: Wed, 15 Nov 2023 13:40:42 +0000 (UTC)
From: brandon@burn.net
Reply-To: brandon@burn.net
To: gnats-bugs@NetBSD.org
Subject: Installer utility partition disk segfaults
X-Send-Pr-Version: www-1.0
>Number: 57698
>Category: port-sparc
>Synopsis: Installer utility partition disk segfaults
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: martin
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Nov 15 13:45:00 +0000 2023
>Closed-Date: Sun Nov 26 12:58:30 +0000 2023
>Last-Modified: Sun Nov 26 12:58:30 +0000 2023
>Originator: Brandon Applegate
>Release: 9.3
>Organization:
>Environment:
N/A
>Description:
In the installer (I don't think it matters but I'm booting from an ISO / CDROM) there is a utility menu that includes an option to partition disks. Going through this progresses until it's time to write the disklabel at which time it segfaults. This happens on 9.3 as well as 10.0 RC1 still.
>How-To-Repeat:
Boot installers, choose utilities menu, choose partition disk, attempt to partition a disk.
>Fix:
>Release-Note:
>Audit-Trail:
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: port-sparc/57698: Installer utility partition disk segfaults
Date: Wed, 15 Nov 2023 20:14:21 +0100
I can not reproduce this, please provide more details:
- what was on the disk you partitioned initially
- what partitions did you add
- what path exactly did you use when you were done
I started with an empty 20G disk, added a 10G ffsv2 partition
(selecting disklabel as partitioning scheme), selected "h) save
results" and then "x) finish partitioning" and then left the utility
menu and the installer. Checking the disk with "disklabel" shows the
expected results.
Martin
From: Brandon Applegate <brandon@burn.net>
To: gnats-bugs@netbsd.org
Cc: port-sparc-maintainer@netbsd.org,
gnats-admin@netbsd.org,
netbsd-bugs@netbsd.org
Subject: Re: port-sparc/57698: Installer utility partition disk segfaults
Date: Wed, 15 Nov 2023 14:46:52 -0500
Hey Martin - thanks for the quick reply.
The machine referenced below is an SS20, with 2 x real mechanical HDDs =
in it (both 18G).
Originally the disk had NetBSD 9.3 on it. However I dropped to shell =
and did:
dd if=3D/dev/zero of=3D/dev/rsd0 bs=3D1m count=3D64
This is my attempt at getting rid of the existing disk label. After =
doing this the partitioning utility shows the disk with no partitions as =
expected.
I tried to keep everything as default as possible. So add a partition =
=E2=80=98a=E2=80=99, everything else default (FFSv2, newfs, use all =
space)
I also made another attempt where I changed units to GB and tried to =
make a 12 GB partition - same result.
> "what path exactly did you use when you were done=E2=80=9D
Not quite sure I understand this one, as soon as I try to commit the =
changes it segfaults.
I have also tried this on another machine - an SS10 using a Zuluscsi =
emultator. This has 2 x 8gb =E2=80=9Cdisks=E2=80=9D on it. It behaves =
the same way (segfault).
I know this isn=E2=80=99t ideal, but since this is all on console and I =
don=E2=80=99t have any video capture gear - I could take a short video =
with my phone and upload it somewhere (I would probably do imgur unless =
you have another preference).
Let me know if you=E2=80=99d like me to do this.
Thanks.
--
Brandon Applegate - CCIE 10273
PGP Key fingerprint:
0641 D285 A36F 533A 73E5 2541 4920 533C C616 703A
"For thousands of years men dreamed of pacts with demons.
Only now are such things possible."
From: Martin Husemann <martin@duskware.de>
To: Brandon Applegate <brandon@burn.net>
Cc: gnats-bugs@netbsd.org
Subject: Re: port-sparc/57698: Installer utility partition disk segfaults
Date: Wed, 15 Nov 2023 21:23:38 +0100
On Wed, Nov 15, 2023 at 02:46:52PM -0500, Brandon Applegate wrote:
> Not quite sure I understand this one, as soon as I try to commit the changes it segfaults.
I'm not sure I understand how you try to commit the changes.
I tested with the 10.0_RC1 installer, it probably differs slightly from
the 9.3 one (but you initially said it happens there too).
I tried to follow exactly the recipe you gave (utility menu, partition a
disk, ....).
Martin
From: Brandon Applegate <brandon@burn.net>
To: gnats-bugs@netbsd.org
Cc: port-sparc-maintainer@netbsd.org, gnats-admin@netbsd.org,
netbsd-bugs@netbsd.org, brandon@burn.net
Subject: Re: port-sparc/57698: Installer utility partition disk segfaults
Date: Wed, 15 Nov 2023 15:41:38 -0500 (EST)
I've uploaded a video of this. Hopefully it's legible/readable. I tried
to go a bit slow to linger on screens to make sure it's clear what options
and selections I'm making.
https://imgur.com/a/V67eFPr
From: Martin Husemann <martin@duskware.de>
To: Brandon Applegate <brandon@burn.net>
Cc: gnats-bugs@netbsd.org
Subject: Re: port-sparc/57698: Installer utility partition disk segfaults
Date: Thu, 16 Nov 2023 20:30:52 +0100
On Wed, Nov 15, 2023 at 03:41:38PM -0500, Brandon Applegate wrote:
> I've uploaded a video of this. Hopefully it's legible/readable. I tried to
> go a bit slow to linger on screens to make sure it's clear what options and
> selections I'm making.
>
> https://imgur.com/a/V67eFPr
Thanks for the video - I see what you do and the core dump, but I really
can not reproduce it locally.
I thought it may be a difference with the crunched binary on the ramdisk,
so I tried that, but it still works fine for me. I'm a bit puzzled...
Martin
From: Brandon Applegate <brandon@burn.net>
To: gnats-bugs@netbsd.org
Cc: port-sparc-maintainer@netbsd.org, gnats-admin@netbsd.org,
netbsd-bugs@netbsd.org
Subject: Re: port-sparc/57698: Installer utility partition disk segfaults
Date: Thu, 16 Nov 2023 14:39:15 -0500 (EST)
On Thu, 16 Nov 2023, Martin Husemann wrote:
> Thanks for the video - I see what you do and the core dump, but I really
> can not reproduce it locally.
>
> I thought it may be a difference with the crunched binary on the ramdisk,
> so I tried that, but it still works fine for me. I'm a bit puzzled...
>
Yep no worries. Certainly not a showstopper bug, I just wanted to open a
PR in case it was a prevalent issue and not known.
I did wonder if it could be hardware issues (all hardware in the sparc
port is pretty old by definition of course). But I think it's strange it
happens on my SS20 + real HDDs as well as the SS10 + Zuluscsi (emultated
"drives").
Thanks
From: Martin Husemann <martin@duskware.de>
To: Brandon Applegate <brandon@burn.net>
Cc: gnats-bugs@netbsd.org
Subject: Re: port-sparc/57698: Installer utility partition disk segfaults
Date: Thu, 16 Nov 2023 20:40:58 +0100
On Thu, Nov 16, 2023 at 02:39:15PM -0500, Brandon Applegate wrote:
> I did wonder if it could be hardware issues (all hardware in the sparc port
> is pretty old by definition of course). But I think it's strange it happens
> on my SS20 + real HDDs as well as the SS10 + Zuluscsi (emultated "drives").
I'll try in an emulator next - not yet giving up!
Martin
From: Ramiro Aceves <ea1abz@gmail.com>
To: gnats-bugs@netbsd.org
Cc: port-sparc-maintainer@netbsd.org, gnats-admin@netbsd.org,
netbsd-bugs@netbsd.org, brandon@burn.net
Subject: Re: port-sparc/57698: Installer utility partition disk segfaults
Date: Fri, 17 Nov 2023 09:59:06 +0100
Hi,
Just if helps (or adds more confusion, who knows ;-) ). Several weeks
before I installed NetBSD 9.3 in my amd64 IntelNuc 8i7. That machine
has got a nvme disk with a Debian swap and root partitions. On NetBSD
that drive is "ld0". I had a spare hard disk drive lying around that I
removed from a Acer Aspire One laptop (I placed a new SDD unit on the
Acer) and I decided it was perfect to install NetBSD on it. That "wd0"
drive is the second disk on the Intel Nuc 8i7 now.
If I recall correctly, the installer said that could not detect a
proper disk geometry for wd0. I press enter several times accepting
default geometry values and start NetBSD install using MBR
partitioning. That ended with a segmentation fault. I recall trying it
several times, deleting everything and adding new partitions with no
luck ending in the same segfault.
I switched to GPT partitioning and I could install NetBSD 9.3 with no issue=
s.
That is all that my poor memory remembers. I have several screen shots
on my phone just in case they are useful (I doubt it), I can put them
on my little WEB server.
Thanks you much.
Regards.
El jue, 16 nov 2023 a las 20:45, Martin Husemann
(<martin@duskware.de>) escribi=C3=B3:
>
> The following reply was made to PR port-sparc/57698; it has been noted by=
GNATS.
>
> From: Martin Husemann <martin@duskware.de>
> To: Brandon Applegate <brandon@burn.net>
> Cc: gnats-bugs@netbsd.org
> Subject: Re: port-sparc/57698: Installer utility partition disk segfaults
> Date: Thu, 16 Nov 2023 20:40:58 +0100
>
> On Thu, Nov 16, 2023 at 02:39:15PM -0500, Brandon Applegate wrote:
> > I did wonder if it could be hardware issues (all hardware in the sparc=
port
> > is pretty old by definition of course). But I think it's strange it h=
appens
> > on my SS20 + real HDDs as well as the SS10 + Zuluscsi (emultated "driv=
es").
>
> I'll try in an emulator next - not yet giving up!
>
> Martin
>
Responsible-Changed-From-To: port-sparc-maintainer->martin
Responsible-Changed-By: martin@NetBSD.org
Responsible-Changed-When: Thu, 23 Nov 2023 18:21:09 +0000
Responsible-Changed-Why:
Have working debug environment - take
From: Martin Husemann <martin@duskware.de>
To: Brandon Applegate <brandon@burn.net>
Cc: gnats-bugs@netbsd.org
Subject: Re: port-sparc/57698: Installer utility partition disk segfaults
Date: Thu, 23 Nov 2023 19:21:13 +0100
On Thu, Nov 16, 2023 at 08:40:58PM +0100, Martin Husemann wrote:
> I'll try in an emulator next - not yet giving up!
I can reproduce it in qemu - now for the debugging fun...
Martin
From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/57698 CVS commit: src/usr.sbin/sysinst
Date: Sat, 25 Nov 2023 19:43:26 +0000
Module Name: src
Committed By: martin
Date: Sat Nov 25 19:43:26 UTC 2023
Modified Files:
src/usr.sbin/sysinst: partman.c
Log Message:
PR 57698: avoid a few potential sysinst crashes in environments where
not all binaries are available - e.g. w/o cgdconfig(8) the "cgds" pointer
would be NULL (as there can't be any) and we crashed when naively
dereferencing it.
To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/usr.sbin/sysinst/partman.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->pending-pullups
State-Changed-By: martin@NetBSD.org
State-Changed-When: Sat, 25 Nov 2023 19:47:45 +0000
State-Changed-Why:
[pullup-10 #474]
From: "Manuel Bouyer" <bouyer@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/57698 CVS commit: [netbsd-10] src/usr.sbin/sysinst
Date: Sun, 26 Nov 2023 12:53:08 +0000
Module Name: src
Committed By: bouyer
Date: Sun Nov 26 12:53:08 UTC 2023
Modified Files:
src/usr.sbin/sysinst [netbsd-10]: partman.c
Log Message:
Pull up following revision(s) (requested by martin in ticket #474):
usr.sbin/sysinst/partman.c: revision 1.57
PR 57698: avoid a few potential sysinst crashes in environments where
not all binaries are available - e.g. w/o cgdconfig(8) the "cgds" pointer
would be NULL (as there can't be any) and we crashed when naively
dereferencing it.
To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.56.2.1 src/usr.sbin/sysinst/partman.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: pending-pullups->closed
State-Changed-By: martin@NetBSD.org
State-Changed-When: Sun, 26 Nov 2023 12:58:30 +0000
State-Changed-Why:
Fixed, thanks for the report!
>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-2023
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.