From root@palm.cise.ufl.edu  Fri Aug 18 07:56:50 2000
Return-Path: <root@palm.cise.ufl.edu>
Received: from palm.cise.ufl.edu (palm.cise.ufl.edu [128.227.205.231])
	by hub.freebsd.org (Postfix) with ESMTP id AC16A37B423
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 18 Aug 2000 07:56:49 -0700 (PDT)
Received: (from root@localhost)
	by palm.cise.ufl.edu (8.9.3/8.9.3) id KAA00964;
	Fri, 18 Aug 2000 10:56:48 -0400 (EDT)
	(envelope-from root)
Message-Id: <200008181456.KAA00964@palm.cise.ufl.edu>
Date: Fri, 18 Aug 2000 10:56:48 -0400 (EDT)
From: Charlie Root <root@palm.cise.ufl.edu>
Reply-To: root@palm.cise.ufl.edu
To: FreeBSD-gnats-submit@freebsd.org
Subject: vinum create can cause kernel panic
X-Send-Pr-Version: 3.2

>Number:         20700
>Category:       kern
>Synopsis:       vinum create can cause kernel panic
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    grog
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Aug 18 08:00:04 PDT 2000
>Closed-Date:    Sat Aug 19 21:59:59 PDT 2000
>Last-Modified:  Sat Aug 19 22:03:19 PDT 2000
>Originator:     Jim Hranicky (jfh@cise.ufl.edu)
>Release:        FreeBSD 4.1-STABLE i386
>Organization:
University of Florida CISE Department
>Environment:

  OS ver:
	FreeBSD 4.1-STABLE #0

  CPU info:
	CPU: Pentium III/Pentium III Xeon/Celeron (646.67-MHz 686-class CPU)
  	Origin = "GenuineIntel"  Id = 0x683  Stepping = 3
  	Features=0x383fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,
		 MCA,CMOV,PAT,PSE36,MMX,FXSR,XMM>
	real memory  = 268369920 (262080K bytes)


  SCSI Adapter:
	ahc1: <Adaptec aic7896/97 Ultra2 SCSI adapter> port 0x2400-0x24ff mem 
	      0xf4101000-0xf4101fff irq 11 at device 12.1 on pci0
	ahc1: aic7896/97 Wide Channel B, SCSI Id=7, 16/255 SCBs

  Disk type:
	da1: <IBM DMVS36D 0250> Fixed Direct Access SCSI-3 device 
	da1: 40.000MB/s transfers (20.000MHz, offset 31, 16bit), Tagged Queueing Enabled
	da1: 35003MB (71687340 512 byte sectors: 255H 63S/T 4462C)

>Description:

  The command "vinum create -f /var/tmp/vinum.conf" causes a kernel panic
  when accessing a drive set up using the "disklabel" command, and not
  /stand/sysinstall :

	<root@birch:~> # vinum create -f /var/tmp/vinum.conf 
	Fatal double fault:
	eip = 0xc02f18e9
	esp = 0xd6affd7c
	ebp = 0xd6affd90
	panic: double fault
	Debugger("panic")
	Stopped at      Debugger+0x34:  movb    $0,0xc03b3be0
	db> trace
	Debugger(c03328a3) at Debugger+0x34
	panic(c0360043,c03605f0,d6affd90,c03605e4,d6affd7c) at panic+0x70
	dblfault_handler(0,0,0,0,0) at dblfault_handler+0x47

  vinum.conf:
	drive d1 device /dev/da1s1e
	volume tmpvol
	  plex name tmpvol.p0 org concat
	    sd name tmpvol.p0.s0 length 1g drive d1

>How-To-Repeat:

	$ ( cd /dev ; ./MAKEDEV da1s1a )
	$ disklabel -w -r da1 auto
	$ disklabel -e -r da1

	  Resulting disklabel:
	    # /dev/da1c:
	    type: SCSI
	    disk: IBM     
	    label: 
	    flags:
	    bytes/sector: 512
	    sectors/track: 63
	    tracks/cylinder: 255
	    sectors/cylinder: 16065
	    cylinders: 4462
	    sectors/unit: 71687340
	    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 bps/cpg]
	    c: 71687340        0    unused        0     0         # (Cyl.    0 - 4462*)
	    e: 71687340        0     vinum                        # (Cyl.    0 - 4462*)

	$ vinum create -f /var/tmp/vinum.conf

  One of three things have been observed at this point:

	1) kernel panic
	2) vinum dumps core (I still have the core file)
	3) creation of volume with faulty objects, message "Device da1s1e not configured"

  However, when the disk config is viewed using /stand/sysinstall fdisk, the partition
  is listed as "unused". Apparently, more needs to be done using disklabel, or 
  /stand/sysinstall must be used to set up disks.

>Fix:

	1) Use /stand/sysinstall fdisk to label the disk (I selected "Use entire 
	   partition", type 165 ). 
	2) disklabel -e -r daX , create vinum partition 
	3) run "vinum create"


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->grog 
Responsible-Changed-By: grog 
Responsible-Changed-When: Fri Aug 18 19:03:33 PDT 2000 
Responsible-Changed-Why:  
grog handles Vinum PRs 

http://www.freebsd.org/cgi/query-pr.cgi?pr=20700 
State-Changed-From-To: open->feedback 
State-Changed-By: grog 
State-Changed-When: Fri Aug 18 19:08:59 PDT 2000 
State-Changed-Why:  
Waiting for feedback from submitter 


http://www.freebsd.org/cgi/query-pr.cgi?pr=20700 
State-Changed-From-To: feedback->closed 
State-Changed-By: grog 
State-Changed-When: Sat Aug 19 21:59:59 PDT 2000 
State-Changed-Why:  
Problem solved. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=20700 
>Unformatted:
Greg Lehey, 19 August 2000

	You don't show the fdisk output, nor the disklabel output for
	das1.  It looks as if your disk layout is confused in some
	way.  That shouldn't explain a panic, of course, but it you're
	having problems of this nature, it seems a good place to
	start.  Don't use sysinstall; that just confuses the issue.

Greg Lehey, 20 August 2000

	After feedback from the submitter, it appears that the
	specified slices did not exist (specifically, the drive
	contained no partition table).  A bug in Vinum, fixed in
	revision 1.61, caused Vinum to panic under those
	circumstances.

PR closed.
