NetBSD Problem Report #2659

From gnats  Thu Jul 25 23:39:20 1996
Received: from pci.on.ca by pain.lcs.mit.edu (8.7.5/8.7.3) with SMTP id XAA05340 for <gnats-bugs@gnats.netbsd.org>; Thu, 25 Jul 1996 23:20:57 -0400 (EDT)
Message-Id: <199607260314.XAA01660@repeat.pci.on.ca>
Date: Thu, 25 Jul 1996 23:14:15 -0400 (EDT)
From: David Gilbert <dgilbert@jaywon.pci.on.ca>
Reply-To: dgilbert@jaywon.pci.on.ca
To: gnats-bugs@NetBSD.ORG
Subject: disklabel dumps core trying to write certain label
X-Send-Pr-Version: 3.95

>Number:         2659
>Category:       bin
>Synopsis:       disklabel dumps core trying to write certain label
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    explorer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jul 25 23:50:04 +0000 1996
>Closed-Date:    Sat Aug 10 18:56:03 +0000 1996
>Last-Modified:  Sat Aug 10 18:56:23 +0000 1996
>Originator:     David Gilbert
>Release:        1.1ish sources, kernel is newer.
>Organization:
	Just me.
>Environment:

System: NetBSD repeat 1.2_ALPHA NetBSD 1.2_ALPHA (DEBUG2) #4: Wed Jul 24 12:47:22 EDT 1996 dgilbert@repeat:/u/dgilbert/downloads/bsd960626/src/sys/arch/sparc/compile/DEBUG2 sparc


>Description:
	I get the following gdb output:

[4:23:323]root@repeat:~> disklabel -R sd7 cdc.label 
Segmentation fault (core dumped)
[4:24:324]root@repeat:~> gdb disklabel disklabel.core 
GDB is free software and you are welcome to distribute copies of it
 under certain conditions; type "show copying" to see the conditions.
There is absolutely no warranty for GDB; type "show warranty" for details.
GDB 4.11 (sparc-netbsd), Copyright 1993 Free Software Foundation, Inc...
Core was generated by `disklabel'.
Program terminated with signal 11, Segmentation fault.
#0  0x6e34 in strcspn ()
(gdb) bt
#0  0x6e34 in strcspn ()
#1  0x4c3c in word (cp=0x0) at disklabel.c:950
#2  0x5df8 in getasciilabel (f=0x23cd0, lp=0x263c8) at disklabel.c:1193
#3  0x31ec in main (argc=2, argv=0xf7fff43c) at disklabel.c:290
(gdb) 

>How-To-Repeat:
	This is the disklabel (I got it from the disk):

# /dev/rsd7c:
type: SCSI
disk: SCSI disk
label: fictitious
flags:
bytes/sector: 512
sectors/track: 52
tracks/cylinder: 15
sectors/cylinder: 780
cylinders: 1632
total sectors: 1295850
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0		# milliseconds
track-to-track seek: 0	# milliseconds
drivedata: 0 

8 partitions:
#        size   offset    fstype   [fsize bsize   cpg]
  a:  1295850         0    4.2BSD        0     0       	# (Cyl.    0 - 688296*)
  c:  1295850         0
  g:  1295850         0    4.2BSD

>Fix:
	I have not looked at it yet.  I'm still trying to see if
changing the label itself will fix the problem.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->analyzed 
State-Changed-By: explorer 
State-Changed-When: Sat Aug 10 14:12:38 EDT 1996 
State-Changed-Why:  
I'm looking into this. 


Responsible-Changed-From-To: bin-bug-people->explorer 
Responsible-Changed-By: explorer 
Responsible-Changed-When: Sat Aug 10 14:12:38 EDT 1996 
Responsible-Changed-Why:  
I'm looking into this. 
State-Changed-From-To: analyzed->closed 
State-Changed-By: explorer 
State-Changed-When: Sat Aug 10 14:56:03 EDT 1996 
State-Changed-Why:  
Fix found and made. 
. 

From: Michael Graff <explorer@cygnus.com>
To: dgilbert@jaywon.pci.on.ca
Cc: gnats-bugs@NetBSD.ORG
Subject: Re: bin/2659 disklabel dumps core trying to write certain label
Date: Sat, 10 Aug 1996 14:55:10 -0400 (EDT)

 I suspect this is caused because you don't specify an fstype for
 partition c.  

 I have just committed changes which might fix this problem.  They're not
 suppable at this point, but if you would like to test them out I can
 mail you a new disklabel.c to drop in.  

 I get this as output from running disklabel on the sample you
 submitted:

 disklabel: line 22: warning, unknown filesystem type: (empty)
 disklabel: line 22: too few fields
 disklabel: line 23: too few fields

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.49 2026/05/14 01:52:41 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.