NetBSD Problem Report #54312
From wiz@yt.nih.at Wed Jun 19 19:45:21 2019
Return-Path: <wiz@yt.nih.at>
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 1C1C17A176
for <gnats-bugs@gnats.NetBSD.org>; Wed, 19 Jun 2019 19:45:21 +0000 (UTC)
Message-Id: <20190619194515.85F002AC103@yt.nih.at>
Date: Wed, 19 Jun 2019 21:45:15 +0200 (CEST)
From: Thomas Klausner <wiz@NetBSD.org>
Reply-To: Thomas Klausner <wiz@NetBSD.org>
To: gnats-bugs@NetBSD.org
Subject: gpt core dump
X-Send-Pr-Version: 3.95
>Number: 54312
>Category: bin
>Synopsis: gpt core dump
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: martin
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Jun 19 19:50:00 +0000 2019
>Closed-Date: Wed Jun 26 19:28:54 +0000 2019
>Last-Modified: Wed Jun 26 19:28:54 +0000 2019
>Originator: Thomas Klausner
>Release: NetBSD 8.99.46
>Organization:
Curiosity is the very basis of education and if you tell me that
curiosity killed the cat, I say only that the cat died nobly.
- Arnold Edinborough
>Environment:
Architecture: x86_64
Machine: amd64
-current as of today
>Description:
gpt dumps core in the following case.
>How-To-Repeat:
# gpt biosboot dk0
gpt: /dev/rld0: map entry doesn't fit media: new start + new size < start + size
(22 + 74706d4b < 22 + 74706d6d)
Memory fault (core dumped)
The backtrace is:
gpt_close()
cmd_biosboot()
main()
>Fix:
Not provided.
>Release-Note:
>Audit-Trail:
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: bin/54312: gpt core dump
Date: Thu, 20 Jun 2019 10:29:06 +0200
On Wed, Jun 19, 2019 at 07:50:01PM +0000, Thomas Klausner wrote:
> # gpt biosboot dk0
> gpt: /dev/rld0: map entry doesn't fit media: new start + new size < start + size
> (22 + 74706d4b < 22 + 74706d6d)
> Memory fault (core dumped)
Please provide a bit more info, like "gpt show ld0" before the command you
tried.
You are aware that this is not the intended usage?
Typical call would be "gpt biosboot -i 1 ld0".
Martin
From: Thomas Klausner <wiz@NetBSD.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: bin/54312: gpt core dump
Date: Thu, 20 Jun 2019 11:12:59 +0200
On Thu, Jun 20, 2019 at 08:30:01AM +0000, Martin Husemann wrote:
> Please provide a bit more info, like "gpt show ld0" before the command you
> tried.
Sure.
# gpt show
start size index contents
0 1 PMBR
1 1 Pri GPT header
2 32 Pri GPT table
34 1953525101 1 GPT part - NetBSD FFSv1/FFSv2
1953525135 32 Sec GPT table
1953525167 1 Sec GPT header
> You are aware that this is not the intended usage?
> Typical call would be "gpt biosboot -i 1 ld0".
Yes, I found that out a bit later :) That does indeed work.
Thomas
From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/54312 CVS commit: src/sbin/gpt
Date: Thu, 20 Jun 2019 10:41:58 +0000
Module Name: src
Committed By: martin
Date: Thu Jun 20 10:41:58 UTC 2019
Modified Files:
src/sbin/gpt: gpt.c
Log Message:
Do not try to close a NULL gpt. Fixes the core dump part of PR bin/54312
To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.78 src/sbin/gpt/gpt.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Responsible-Changed-From-To: bin-bug-people->martin
Responsible-Changed-By: martin@NetBSD.org
Responsible-Changed-When: Thu, 20 Jun 2019 10:58:24 +0000
Responsible-Changed-Why:
I think I fixed it
State-Changed-From-To: open->feedback
State-Changed-By: martin@NetBSD.org
State-Changed-When: Thu, 20 Jun 2019 10:58:24 +0000
State-Changed-Why:
Should work now, can you please test?
State-Changed-From-To: feedback->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Wed, 26 Jun 2019 19:28:54 +0000
State-Changed-Why:
Yes, fixed, thanks.
# gpt biosboot ld0
gpt: /dev/rld0: No bootable partition
# gpt biosboot dk0
/dev/rld0: Partition 1 marked as bootable
No core dump either way.
>Unformatted:
(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.