Subject: Re: disklabel bug?
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: port-i386
Date: 01/23/2003 23:45:36
On Tue, Jan 21, 2003 at 09:30:33PM -0500, der Mouse wrote:
> I'm putting some replacement disks into a machine and just got a
> repeatable kernel divide-by-zero trap on boot.
> 
> On investigation, it turns out that in readdisklabel (i386/disksubr.c),
> lp->d_secpercyl was zero.  This appears to be due to the way
> wdgetdisklabel calls readdisklabel twice, with the second call blindly
> assuming the first call's values are suitable.  Looking at recent
> -current (from just before the cvs merge - I haven't updated my cvs
> fetch for the merge) makes me think the bug was probably still present
> then.
> 
> This can't be right.  Repeatable divide-by-zero crashes just because a
> disk happens to have the wrong garbage on it are...undesirable.
> 
> Am I hallucinating, or is there really a bug here?  Worth a send-pr?

Yes, probably. I've been in touch with a user which was probably hit by this
bug, but I couldn't get enouth data to track it down.

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 24 ans d'experience feront toujours la difference
--