From nobody@FreeBSD.org  Tue Sep 22 10:20:32 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 601211065672
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 22 Sep 2009 10:20:32 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 4F35C8FC1B
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 22 Sep 2009 10:20:32 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n8MAKUBx045647
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 22 Sep 2009 10:20:30 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n8MAKUHB045646;
	Tue, 22 Sep 2009 10:20:30 GMT
	(envelope-from nobody)
Message-Id: <200909221020.n8MAKUHB045646@www.freebsd.org>
Date: Tue, 22 Sep 2009 10:20:30 GMT
From: rene <710@gmx.de>
To: freebsd-gnats-submit@FreeBSD.org
Subject: ciss device freeze during 8.0_BETA_3 bootsequenz....
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         139053
>Category:       kern
>Synopsis:       [ciss] [patch] [panic] panic during 8.0_BETA_3 boot on "error sending 195 LUN command"
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gavin
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Sep 22 10:30:02 UTC 2009
>Closed-Date:    Thu Dec 31 12:59:51 UTC 2009
>Last-Modified:  Thu Dec 31 13:00:14 UTC 2009
>Originator:     rene
>Release:        8.0_BETA_3
>Organization:
privat
>Environment:
8.0 Beta 3
>Description:
during the bootup following Message comes:

cciss0: error sending 195 LUN command (35)
panic: mutex cissmtx not owned at/usr/src/kern_mutex.c:140
cpuid = 0
KBD: enter: panic
[therad pid 0 tid 100000]
Stopped at kbd_enter+0x3a: movl $0,kbd_why

then Freeze the Box.

the Error is permanent. I try to install new from CD or update the System from 7.1, it comes the same Errors.

I use an Proliant ML350 G3 with SMA 5300 (for the Bootdisk) and an SMA P600 for Data Disks.
Single Xeon 2400Mhz
2GB Ram
36GB SCSI Disk Raid1

regards r
>How-To-Repeat:
Install or update from 7.1, after the First reboot the Message comes.
>Fix:


>Release-Note:
>Audit-Trail:

From: rene reckschwardt <reckschwardt@gmx.de>
To: FreeBSD-gnats-submit@FreeBSD.org, freebsd-i386@FreeBSD.org
Cc:  
Subject: Re: i386/139053: ciss device freeze during 8.0_BETA_3 bootsequenz....
Date: Tue, 22 Sep 2009 18:05:51 +0200

 Hello,
 
 if i should test a Patch, i am your Man.
 
 regards Ren
 
 
State-Changed-From-To: open->feedback 
State-Changed-By: gavin 
State-Changed-When: Wed Sep 23 08:14:31 UTC 2009 
State-Changed-Why:  
To submitter: by "freeze the box" do you mean that you can not enter 
anything with the keyboard?  If you are using a USB keyboard, can you 
try to update to more recent 8.0 (we're at RC1 now), you may find that 
your keyboard works after the panic.  You may also find a PS2 keyboard 
works where USB doesn't, or might find that a serial console works for 
you.  Basically, it would help if, at the "db" prompt, you could give 
the "bt" command and show the output.  Thanks! 



Responsible-Changed-From-To: freebsd-i386->gavin 
Responsible-Changed-By: gavin 
Responsible-Changed-When: Wed Sep 23 08:14:31 UTC 2009 
Responsible-Changed-Why:  
Track 

http://www.freebsd.org/cgi/query-pr.cgi?pr=139053 

From: Gavin Atkinson <gavin@FreeBSD.org>
To: rene <710@gmx.de>, bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/139053: [ciss] painc during 8.0_BETA_3 bootsequence on
 "error sending 195 LUN command"
Date: Wed, 23 Sep 2009 09:47:45 +0100 (BST)

 Hi,
 
 Don't worry about providing a backtrace, I can see what is happening. 
 Can you try the patch at http://people.freebsd.org/~gavin/PRs/139053.diff ?
 This should at least fix the panic you are seeing.  Do you have any 
 devices attached to your ciss controller?  If so, can you provide a dmesg 
 from 7.x please?
 
 Thanks,
 
 Gavin

From: rene <rene@reckschwardt.de>
To: Gavin Atkinson <gavin@FreeBSD.org>
Cc:  
Subject: Re: kern/139053: [ciss] painc during 8.0_BETA_3 bootsequence on "error
 sending 195 LUN command"
Date: Wed, 23 Sep 2009 17:08:09 +0200

 Hello,
 
 you DMESG from 7.1
 
 regards
 
 Gavin Atkinson schrieb:
 > 
 > Hi,
 > 
 > Don't worry about providing a backtrace, I can see what is happening. 
 > Can you try the patch at http://people.freebsd.org/~gavin/PRs/139053.diff ?
 > This should at least fix the panic you are seeing.  Do you have any 
 > devices attached to your ciss controller?  If so, can you provide a 
 > dmesg from 7.x please?
 > 
 > Thanks,
 > 
 > Gavin
 
 Copyright (c) 1992-2009 The FreeBSD Project.
 Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
 	The Regents of the University of California. All rights reserved.
 FreeBSD is a registered trademark of The FreeBSD Foundation.
 FreeBSD 7.1-RELEASE #2: Sun Sep 20 20:55:05 CEST 2009
      root@file.menny.local:/usr/obj/usr/src/sys/MYKERNEL
 Timecounter "i8254" frequency 1193182 Hz quality 0
 CPU: Intel(R) Xeon(TM) CPU 2.40GHz (2392.26-MHz 686-class CPU)
    Origin = "GenuineIntel"  Id = 0xf27  Stepping = 7
  
 Features=0xbfebf9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
    Features2=0x4400<CNXT-ID,xTPR>
    Logical CPUs per core: 2
 real memory  = 2147459072 (2047 MB)
 avail memory = 2093953024 (1996 MB)
 kbd1 at kbdmux0
 ath_hal: 0.9.20.3 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413)
 acpi0: <COMPAQ D14> on motherboard
 acpi0: [ITHREAD]
 acpi0: Power Button (fixed)
 Timecounter "ACPI-safe" frequency 3579545 Hz quality 850
 acpi_timer0: <32-bit timer at 3.579545MHz> port 0x920-0x923 on acpi0
 pcib0: <ACPI Host-PCI bridge> on acpi0
 pci0: <ACPI PCI bus> on pcib0
 pcib1: <PCI-PCI bridge> at device 1.0 on pci0
 pci1: <PCI bus> on pcib1
 vgapci0: <VGA-compatible display> port 0x3000-0x30ff mem 
 0xf6000000-0xf6ffffff,0xf5ff0000-0xf5ff0fff at device 0.0 on pci1
 pci1: <base peripheral> at device 1.0 (no driver attached)
 pci1: <memory> at device 2.0 (no driver attached)
 pci1: <memory> at device 4.0 (no driver attached)
 pci0: <base peripheral> at device 5.0 (no driver attached)
 isab0: <PCI-ISA bridge> at device 15.0 on pci0
 isa0: <ISA bus> on isab0
 atapci0: <ServerWorks CSB5 UDMA100 controller> port 
 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0x2000-0x200f at device 15.1 on pci0
 ata0: <ATA channel 0> on atapci0
 ata0: [ITHREAD]
 ata1: <ATA channel 1> on atapci0
 ata1: [ITHREAD]
 ohci0: <OHCI (generic) USB controller> mem 0xf3fd0000-0xf3fd0fff irq 10 
 at device 15.2 on pci0
 ohci0: [GIANT-LOCKED]
 ohci0: [ITHREAD]
 usb0: OHCI version 1.0, legacy support
 usb0: SMM does not respond, resetting
 usb0: <OHCI (generic) USB controller> on ohci0
 usb0: USB revision 1.0
 uhub0: <(0x1166) OHCI root hub, class 9/0, rev 1.00/1.00, addr 1> on usb0
 uhub0: 4 ports with 4 removable, self powered
 pcib2: <ACPI Host-PCI bridge> on acpi0
 pci2: <ACPI PCI bus> on pcib2
 ciss0: <Compaq Smart Array 5300> port 0x4000-0x40ff mem 
 0xf7dc0000-0xf7dfffff,0xf7c00000-0xf7cfffff irq 5 at device 1.0 on pci2
 ciss0: [ITHREAD]
 pcib3: <ACPI Host-PCI bridge> on acpi0
 pci_link5: BIOS IRQ 3 for 5.2.INTA is invalid
 pci_link4: BIOS IRQ 3 for 5.2.INTB is invalid
 pci5: <ACPI PCI bus> on pcib3
 ciss1: <HP Smart Array P600> port 0x5000-0x50ff mem 
 0xf7ff0000-0xf7ff1fff,0xf7f80000-0xf7fbffff irq 11 at device 1.0 on pci5
 ciss1: [ITHREAD]
 em0: <Intel(R) PRO/1000 Network Connection 6.9.6> port 0x5400-0x543f mem 
 0xf7f60000-0xf7f7ffff,0xf7f00000-0xf7f3ffff irq 9 at device 2.0 on pci5
 em0: [FILTER]
 em0: Ethernet address: 00:11:0a:58:8b:d0
 em1: <Intel(R) PRO/1000 Network Connection 6.9.6> port 0x5440-0x547f mem 
 0xf7ee0000-0xf7efffff irq 5 at device 2.1 on pci5
 em1: [FILTER]
 em1: Ethernet address: 00:11:0a:58:8b:d1
 acpi_tz0: <Thermal Zone> on acpi0
 atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
 atkbd0: <AT Keyboard> irq 1 on atkbdc0
 kbd0 at atkbd0
 atkbd0: [GIANT-LOCKED]
 atkbd0: [ITHREAD]
 sio0: <Standard PC COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
 sio0: type 16550A
 sio0: [FILTER]
 fdc0: <floppy drive controller (FDE)> port 0x3f2-0x3f5 irq 6 drq 2 on acpi0
 fdc0: [FILTER]
 fd0: <1440-KB 3.5" drive> on fdc0 drive 0
 cpu0: <ACPI CPU> on acpi0
 p4tcc0: <CPU Frequency Thermal Control> on cpu0
 pmtimer0 on isa0
 orm0: <ISA Option ROMs> at iomem 
 0xc0000-0xc7fff,0xc8000-0xcbfff,0xcc000-0xcffff,0xd0000-0xd17ff,0xee000-0xeffff 
 pnpid ORM0000 on isa0
 ppc0: <Parallel port> at port 0x378-0x37f irq 7 on isa0
 ppc0: Generic chipset (NIBBLE-only) in COMPATIBLE mode
 ppbus0: <Parallel port bus> on ppc0
 ppbus0: [ITHREAD]
 ppi0: <Parallel I/O> on ppbus0
 plip0: <PLIP network interface> on ppbus0
 plip0: WARNING: using obsoleted IFF_NEEDSGIANT flag
 lpt0: <Printer> on ppbus0
 lpt0: Interrupt-driven port
 ppc0: [GIANT-LOCKED]
 ppc0: [ITHREAD]
 sc0: <System console> at flags 0x100 on isa0
 sc0: VGA <16 virtual consoles, flags=0x300>
 sio1: configured irq 3 not in bitmap of probed irqs 0
 sio1: port may not be enabled
 vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
 Timecounter "TSC" frequency 2392256236 Hz quality 800
 Timecounters tick every 1.000 msec
 acd0: CDROM <HL-DT-ST CD-ROM GCR-8480B/2.05> at ata0-master PIO4
 da0 at ciss0 bus 0 target 0 lun 0
 da0: <COMPAQ RAID 1  VOLUME inte> Fixed Direct Access SCSI-0 device
 da0: 135.168MB/s transfers
 da0: 34731MB (71130720 512 byte sectors: 255H 32S/T 8717C)
 da1 at ciss1 bus 0 target 0 lun 0
 da1: <COMPAQ RAID 5  VOLUME OK> Fixed Direct Access SCSI-5 device
 da1: 135.168MB/s transfers
 da1: 2861512MB (5860378032 512 byte sectors: 255H 32S/T 65535C)
 GEOM: da1: corrupt or invalid GPT detected.
 GEOM: da1: GPT rejected -- may not be recoverable.
 Trying to mount root from ufs:/dev/da0s1a
 This module (opensolaris) contains code covered by the
 Common Development and Distribution License (CDDL)
 see http://opensolaris.org/os/licensing/opensolaris_license/
 WARNING: ZFS is considered to be an experimental feature in FreeBSD.
 ZFS filesystem version 6
 ZFS storage pool version 6
 GEOM: da1: corrupt or invalid GPT detected.
 GEOM: da1: GPT rejected -- may not be recoverable.
 em0: link state changed to UP
 pid 31677 (conftest), uid 0: exited on signal 11 (core dumped)

From: Gavin Atkinson <gavin@FreeBSD.org>
To: rene@reckschwardt.de
Cc: bug-followup@FreeBSD.org
Subject: Re: kern/139053: [ciss] painc during 8.0_BETA_3 bootsequence
	on	"error sending 195 LUN command"
Date: Thu, 24 Sep 2009 17:26:51 +0100

 Thanks for your feedback.  The other thing that would be very useful is
 a copy of all of the "ciss"-related boot messages from the 8.0 system.
 
 Lastly, could you please try selecting the "escape to loader prompt"
 from the initial boot menu, and entering 
 
 set hw.ciss.force_interrupt=1
 set hw.ciss.force_transport=1
 boot
 
 and seeing if that makes any difference at all?  It appears that both of
 those tunables have changed their defaults between 7.x and 8.x.  If
 changing them fixes the issues, please just try changing one to
 establish which of them is responsible.
 
 Thanks,
 
 Gavin

From: Gavin Atkinson <gavin@FreeBSD.org>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/139053: [ciss] painc during 8.0_BETA_3 bootsequence on
 "error sending 195 LUN command" (fwd)
Date: Tue, 6 Oct 2009 22:41:44 +0100 (BST)

 Submitter does not have the ability to test the patch to make sure that 
 fixes the panic.
 
 However, the submitter can confirm that setting hw.ciss.force_transport=1
 allows his devices to appear again.
State-Changed-From-To: feedback->feedback  
State-Changed-By: gavin 
State-Changed-When: Tue Oct 6 21:54:19 UTC 2009 
State-Changed-Why:  
To submitter: The need to set hw.ciss.force_transport=1 is believed to  
have been fixed around RC1.  Please can you update your machine to the 
current 8.x code and see if you still need to set that variable?  Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=139053 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/139053: commit references a PR
Date: Thu, 17 Dec 2009 17:46:33 +0000 (UTC)

 Author: gavin
 Date: Thu Dec 17 17:46:08 2009
 New Revision: 200637
 URL: http://svn.freebsd.org/changeset/base/200637
 
 Log:
   Don't panic due to unlocking an unowned mutex if we fail during attach.
   
   PR:		kern/139053
   Reviewed by:	scottl
   Approved by:	ed (mentor)
   MFC after:	2 weeks
 
 Modified:
   head/sys/dev/ciss/ciss.c
 
 Modified: head/sys/dev/ciss/ciss.c
 ==============================================================================
 --- head/sys/dev/ciss/ciss.c	Thu Dec 17 17:44:34 2009	(r200636)
 +++ head/sys/dev/ciss/ciss.c	Thu Dec 17 17:46:08 2009	(r200637)
 @@ -418,6 +418,7 @@ ciss_attach(device_t dev)
  
      sc = device_get_softc(dev);
      sc->ciss_dev = dev;
 +    mtx_init(&sc->ciss_mtx, "cissmtx", NULL, MTX_DEF);
  
      /*
       * Do PCI-specific init.
 @@ -430,7 +431,6 @@ ciss_attach(device_t dev)
       */
      ciss_initq_free(sc);
      ciss_initq_notify(sc);
 -    mtx_init(&sc->ciss_mtx, "cissmtx", NULL, MTX_DEF);
      callout_init_mtx(&sc->ciss_periodic, &sc->ciss_mtx, 0);
  
      /*
 @@ -496,8 +496,11 @@ ciss_attach(device_t dev)
  
      error = 0;
   out:
 -    if (error != 0)
 +    if (error != 0) {
 +	/* ciss_free() expects the mutex to be held */
 +	mtx_lock(&sc->ciss_mtx);
  	ciss_free(sc);
 +    }
      return(error);
  }
  
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: feedback->patched 
State-Changed-By: gavin 
State-Changed-When: Thu Dec 17 17:50:06 UTC 2009 
State-Changed-Why:  
A fix for the panic has been committed as r200637.  It is believed 
that the original cause for the failure has also been fixed before 
8.0 was released. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=139053 
State-Changed-From-To: patched->closed 
State-Changed-By: gavin 
State-Changed-When: Thu Dec 31 12:59:25 UTC 2009 
State-Changed-Why:  
MFC'd as r201341 

http://www.freebsd.org/cgi/query-pr.cgi?pr=139053 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/139053: commit references a PR
Date: Thu, 31 Dec 2009 12:58:23 +0000 (UTC)

 Author: gavin
 Date: Thu Dec 31 12:58:08 2009
 New Revision: 201341
 URL: http://svn.freebsd.org/changeset/base/201341
 
 Log:
   MFC 200637:
   
   Don't panic due to unlocking an unowned mutex if we fail during attach.
   
   PR:		kern/139053
   Reviewed by:	scottl
   Approved by:	ed (mentor)
 
 Modified:
   stable/8/sys/dev/ciss/ciss.c
 Directory Properties:
   stable/8/sys/   (props changed)
   stable/8/sys/amd64/include/xen/   (props changed)
   stable/8/sys/cddl/contrib/opensolaris/   (props changed)
   stable/8/sys/contrib/dev/acpica/   (props changed)
   stable/8/sys/contrib/pf/   (props changed)
   stable/8/sys/dev/xen/xenpci/   (props changed)
 
 Modified: stable/8/sys/dev/ciss/ciss.c
 ==============================================================================
 --- stable/8/sys/dev/ciss/ciss.c	Thu Dec 31 12:17:38 2009	(r201340)
 +++ stable/8/sys/dev/ciss/ciss.c	Thu Dec 31 12:58:08 2009	(r201341)
 @@ -418,6 +418,7 @@ ciss_attach(device_t dev)
  
      sc = device_get_softc(dev);
      sc->ciss_dev = dev;
 +    mtx_init(&sc->ciss_mtx, "cissmtx", NULL, MTX_DEF);
  
      /*
       * Do PCI-specific init.
 @@ -430,7 +431,6 @@ ciss_attach(device_t dev)
       */
      ciss_initq_free(sc);
      ciss_initq_notify(sc);
 -    mtx_init(&sc->ciss_mtx, "cissmtx", NULL, MTX_DEF);
      callout_init_mtx(&sc->ciss_periodic, &sc->ciss_mtx, 0);
  
      /*
 @@ -496,8 +496,11 @@ ciss_attach(device_t dev)
  
      error = 0;
   out:
 -    if (error != 0)
 +    if (error != 0) {
 +	/* ciss_free() expects the mutex to be held */
 +	mtx_lock(&sc->ciss_mtx);
  	ciss_free(sc);
 +    }
      return(error);
  }
  
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
>Unformatted:
