NetBSD Problem Report #53833
From gson@gson.org Fri Jan 4 18:13:12 2019
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 274EA7A180
for <gnats-bugs@gnats.NetBSD.org>; Fri, 4 Jan 2019 18:13:12 +0000 (UTC)
Message-Id: <20190104181307.F302F9892E9@guava.gson.org>
Date: Fri, 4 Jan 2019 20:13:07 +0200 (EET)
From: gson@gson.org (Andreas Gustafsson)
Reply-To: gson@gson.org (Andreas Gustafsson)
To: gnats-bugs@NetBSD.org
Subject: Booting sparc64 install ISO prints disklabel warnings
X-Send-Pr-Version: 3.95
>Number: 53833
>Category: kern
>Synopsis: Booting sparc64 install ISO prints disklabel warnings
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: jdolecek
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Jan 04 18:15:00 +0000 2019
>Closed-Date: Tue Jan 08 12:39:31 +0000 2019
>Last-Modified: Tue Jan 08 12:39:31 +0000 2019
>Originator: Andreas Gustafsson
>Release: NetBSD-current, source date >= 2018.11.12.20.54.03
>Organization:
>Environment:
System: NetBSD
Architecture: sparc64
Machine: sparc64
>Description:
Booting a NetBSD-current/sparc64 install CD image in qemu prints some
warning messages about the cd0 disklabel:
[ 7.3040075] atapibus0 at atabus1: 2 targets
[ 7.3040075] cd0 at atapibus0 drive 0: <QEMU DVD-ROM, QM00003, 2.5+> cdrom removable
[ 7.3980303] WARNING: 1 error while detecting hardware; check system log.
[ 7.4320367] WARNING: cd0: total sector size in disklabel (640640) != the size of cd0 (160160)
[ 7.4320367] WARNING: cd0: end of partition `a' exceeds the size of cd0 (160160)
[ 7.4320367] WARNING: cd0: end of partition `f' exceeds the size of cd0 (160160)
[ 7.4449390] root on cd0a dumps on cd0b
[ 7.4566987] WARNING: cd0: total sector size in disklabel (640640) != the size of cd0 (160160)
[ 7.4566987] WARNING: cd0: end of partition `a' exceeds the size of cd0 (160160)
[ 7.4566987] WARNING: cd0: end of partition `f' exceeds the size of cd0 (160160)
[ 7.4869062] root file system type: cd9660
Since 640640 is exactly four times 160160, perhaps there is some kind
of confusion between 512 and 2048 byte sectors.
The warnings appeared with the commits:
2018.11.12.20.54.03 jdolecek src/sys/dev/ic/mvsata.c 1.46
2018.11.12.20.54.03 jdolecek src/sys/dev/scsipi/atapi_wdc.c 1.133
Before that, a different warning was printed instead:
[ 8.5335726] cd0: 25955248 trailing sectors not covered by disklabel
Installation succeeds despite the warnings.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: port-sparc64-maintainer->jdolecek
Responsible-Changed-By: martin@NetBSD.org
Responsible-Changed-When: Sat, 05 Jan 2019 15:13:28 +0000
Responsible-Changed-Why:
Generic kernel issue (though sun CD roms having 2048 byte sectors is a bit
MD...)
State-Changed-From-To: open->closed
State-Changed-By: jdolecek@NetBSD.org
State-Changed-When: Mon, 07 Jan 2019 21:27:23 +0000
State-Changed-Why:
Fix committed in rev. 1.105 of dev/dksubr.c. The atapi_wdc.c 1.133 was not
really at fault - it merely fixed the cd(4) identify to actually report
correct values, see PR kern/53724 for details.
I.e the previous '25955248 trailing sectors' warning was also bogus, and
result of same bug as kern/53724.
Kernels built from previous release branches did not show this warning
simply because it's only executed #ifdef DIAGNOSTIC, but the code there
is broken all the same. IMO this is small enough issue to not really need
pullups.
From: =?UTF-8?B?SmFyb23DrXIgRG9sZcSNZWs=?= <jaromir.dolecek@gmail.com>
To: "gnats-bugs@NetBSD.org" <gnats-bugs@netbsd.org>
Cc:
Subject: Re: kern/53833 (Booting sparc64 install ISO prints disklabel warnings)
Date: Mon, 7 Jan 2019 22:28:47 +0100
---------- Forwarded message ---------
From: Jaromir Dolecek <jdolecek@netbsd.org>
Date: lun. 7 janv. 2019 =C3=A0 22:04
Subject: CVS commit: src/sys/dev
To: <source-changes@netbsd.org>
Module Name: src
Committed By: jdolecek
Date: Mon Jan 7 21:04:35 UTC 2019
Modified Files:
src/sys/dev: dksubr.c
Log Message:
convert the sector counts for label sanity checks to use same unit (DEV_BSI=
ZE),
so that the check is meaningful if disklabel sector size and disk geometry
sector size differ - for example 512 disklabel vs 2048 for sparc cd(4)
conversion assumes that the sector sizes are multiples of DEV_BSIZE (512)
fixes kern/53833 by Andreas Gustafsson
Note: the checks are executed #ifdef DIAGNOSTIC, that's why nothing
is printed by 8.0 kernel, or anything built from release branches
To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/sys/dev/dksubr.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: closed->feedback
State-Changed-By: jdolecek@NetBSD.org
State-Changed-When: Mon, 07 Jan 2019 22:37:49 +0000
State-Changed-Why:
Better if you review this, had one bug in there already. Can you confirm
it works for you with rev. 1.106 of dksubr.c?
From: "Jaromir Dolecek" <jdolecek@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/53833 CVS commit: src/sys/dev
Date: Mon, 7 Jan 2019 22:35:55 +0000
Module Name: src
Committed By: jdolecek
Date: Mon Jan 7 22:35:55 UTC 2019
Modified Files:
src/sys/dev: dksubr.c
Log Message:
fix the disklabel sanity check coversion for case when both disklabel
and disk geometry are > DEV_BSIZE, such as fictitious cd(4) disklabel
still part of PR kern/53833
To generate a diff of this commit:
cvs rdiff -u -r1.105 -r1.106 src/sys/dev/dksubr.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: jdolecek@NetBSD.org, Andreas Gustafsson <gson@gson.org>
Subject: Re: kern/53833 (Booting sparc64 install ISO prints disklabel
warnings)
Date: Tue, 8 Jan 2019 11:09:22 +0100
I tested on real hardware:
cd0 at scsibus0 target 6 lun 0: <TOSHIBA, XM-5401TASUN4XCD, 3485> cdrom removable
With yesterdays install CD image:
[ 29.0000144] WARNING: cd0: total sector size in disklabel (856320) != the size of cd0 (214080)
[ 29.1000124] WARNING: cd0: end of partition `a' exceeds the size of cd0 (214080)
[ 29.1900134] WARNING: cd0: end of partition `f' exceeds the size of cd0 (214080)
and nothing with todays. Disklabel looks like:
# /dev/rcd0c:
type: SCSI
disk: optical media
label:
flags: removable
bytes/sector: 512
sectors/track: 640
tracks/cylinder: 1
sectors/cylinder: 640
cylinders: 1338
total sectors: 856320
rpm: 300
interleave: 0
trackskew: 0
cylinderskew: 0
headswitch: 0 # microseconds
track-to-track seek: 0 # microseconds
drivedata: 0
8 partitions:
# size offset fstype [fsize bsize cpg/sgs]
a: 853760 0 ISO9660 0 # (Cyl. 0 - 1333)
f: 2560 853760 4.2BSD 1024 8192 16 # (Cyl. 1334 - 1337)
I also tested on qemu and the messages are gone:
# dmesg|fgrep cd0
[ 7.196135] cd0 at atapibus0 drive 0: <QEMU DVD-ROM, QM00003, 2.5+> cdrom removable
[ 7.215925] cd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)
[ 7.215925] cd0(cmdide0:1:0): using PIO mode 4, Ultra-DMA mode 2 (Ultra/33) (using DMA)
[ 7.282799] root on cd0a dumps on cd0b
and disklabel says:
# /dev/rcd0:
type: ATAPI
disk: optical media
label:
flags: removable
bytes/sector: 512
sectors/track: 640
tracks/cylinder: 1
sectors/cylinder: 640
cylinders: 1338
total sectors: 856320
rpm: 300
interleave: 0
trackskew: 0
cylinderskew: 0
headswitch: 0 # microseconds
track-to-track seek: 0 # microseconds
drivedata: 0
8 partitions:
# size offset fstype [fsize bsize cpg/sgs]
a: 853760 0 ISO9660 0 # (Cyl. 0 - 1333)
f: 2560 853760 4.2BSD 1024 8192 16 # (Cyl. 1334 - 1337)
Martin
State-Changed-From-To: feedback->closed
State-Changed-By: gson@NetBSD.org
State-Changed-When: Tue, 08 Jan 2019 12:39:31 +0000
State-Changed-Why:
I can confirm that the warnings messages are gone, and installation still
succeeds.
>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.