From tdb@paladin.sixth.bishnet.net  Fri Jul  9 08:15:48 2010
Return-Path: <tdb@paladin.sixth.bishnet.net>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 999D1106564A
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  9 Jul 2010 08:15:48 +0000 (UTC)
	(envelope-from tdb@paladin.sixth.bishnet.net)
Received: from carrick.bishnet.net (carrick.bishnet.net [IPv6:2a01:348:132::1])
	by mx1.freebsd.org (Postfix) with ESMTP id 5B9608FC08
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  9 Jul 2010 08:15:47 +0000 (UTC)
Received: from paladin.sixth.bishnet.net ([2a01:348:131:1:20e:cff:fe7f:ced1])
	by carrick.bishnet.net with esmtps (TLSv1:AES256-SHA:256)
	(Exim 4.66 (FreeBSD))
	(envelope-from <tdb@paladin.sixth.bishnet.net>)
	id 1OX8kE-0005H2-JE
	for FreeBSD-gnats-submit@freebsd.org; Fri, 09 Jul 2010 09:15:38 +0100
Received: from tdb by paladin.sixth.bishnet.net with local (Exim 4.72 (FreeBSD))
	(envelope-from <tdb@paladin.sixth.bishnet.net>)
	id 1OX8k9-0000dl-3s
	for FreeBSD-gnats-submit@freebsd.org; Fri, 09 Jul 2010 09:15:33 +0100
Message-Id: <E1OX8k9-0000dl-3s@paladin.sixth.bishnet.net>
Date: Fri, 09 Jul 2010 09:15:33 +0100
From: Tim Bishop <tim@bishnet.net>
Sender: "T.D.Bishop" <tdb@paladin.sixth.bishnet.net>
Reply-To: Tim Bishop <tim@bishnet.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Panic at boot in twa on recent 7-STABLE
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         148464
>Category:       kern
>Synopsis:       [twa] Panic at boot in twa on recent 7-STABLE
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    delphij
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jul 09 08:20:01 UTC 2010
>Closed-Date:    Fri Jul 09 20:44:56 UTC 2010
>Last-Modified:  Fri Jul  9 20:50:03 UTC 2010
>Originator:     Tim Bishop
>Release:        FreeBSD 7.3-STABLE amd64
>Organization:
>Environment:
System: FreeBSD paladin.sixth.bishnet.net 7.3-STABLE FreeBSD 7.3-STABLE #18: Tue Jun 8 16:19:07 BST 2010 tdb@paladin.sixth.bishnet.net:/usr/obj/usr/src/sys/PALADIN amd64


	FreeBSD 7.3-STABLE with 3ware 9690SA RAID card.
>Description:
	I updated the kernel from one on approx June 8th to July
	8th. On bootup with the June kernel I see this at bootup:

	3ware device driver for 9000 series storage controllers, version: 3.70.05.001
	twa0: <3ware 9000 series Storage Controller> port 0xb800-0xb8ff mem 0xce000000-0xcfffffff,0xfbfff000-0xfbffffff irq 16 at device 0.0 on pci1
	twa0: [ITHREAD]
	twa0: INFO: (0x15: 0x1300): Controller details:: Model 9690SA-8I, 128 ports, Firmware FH9X 4.04.00.016, BIOS BE9X 4.04.00.003

	With the July kernel I get the following:

	3ware device driver for 9000 series storage controllers, version: 3.70.05.008
	twa0: <3ware 9000 series Storage Controller> port 0xb800-0xb8ff mem 0xce000000-0xcfffffff,0xfbfff000-0xfbffffff irq 16 at device 0.0 on pci1
	twa0: [ITHREAD]
	panic: mtx_init: mtx_lock not aligned for tw_cl_gen_lock:0xffffff800022e0ea cpuid = 0
	KDB: enter: panic
	[thread pid - tid 100000 ]
	Stopped at      kdb_enter_why+0x3d:      movq      $0,0x41c798(%rip)
	db> 

	I'm unsure what the cause is. Rolling back to the June kernel worked.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->delphij 
Responsible-Changed-By: delphij 
Responsible-Changed-When: Fri Jul 9 18:14:23 UTC 2010 
Responsible-Changed-Why:  
Take. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=148464 
State-Changed-From-To: open->closed 
State-Changed-By: delphij 
State-Changed-When: Fri Jul 9 20:44:21 UTC 2010 
State-Changed-Why:  
A patch have been applied against 7-STABLE. 

Thanks for your submission! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/148464: commit references a PR
Date: Fri,  9 Jul 2010 20:44:17 +0000 (UTC)

 Author: delphij
 Date: Fri Jul  9 20:43:57 2010
 New Revision: 209863
 URL: http://svn.freebsd.org/changeset/base/209863
 
 Log:
   MFC r209860:
   
   Don't use pack() for structures that is used purely for software state.
   Otherwise the resulting, unaligned mutex structure would trigger panic.
   
   Submitted by:		Tom Cough <tom.couch lsi.com>
   Reported/Tested by:	jhb
   PR:			kern/148464
 
 Modified:
   stable/7/sys/dev/twa/tw_cl.h
   stable/7/sys/dev/twa/tw_cl_share.h
 Directory Properties:
   stable/7/sys/   (props changed)
   stable/7/sys/cddl/contrib/opensolaris/   (props changed)
   stable/7/sys/contrib/dev/acpica/   (props changed)
   stable/7/sys/contrib/pf/   (props changed)
 
 Modified: stable/7/sys/dev/twa/tw_cl.h
 ==============================================================================
 --- stable/7/sys/dev/twa/tw_cl.h	Fri Jul  9 20:05:56 2010	(r209862)
 +++ stable/7/sys/dev/twa/tw_cl.h	Fri Jul  9 20:43:57 2010	(r209863)
 @@ -74,7 +74,6 @@
  #define TW_CLI_PCI_CONFIG_STATUS_OFFSET		0x6 /* status register offset */
  #endif /* TW_OSL_PCI_CONFIG_ACCESSIBLE */
  
 -#pragma pack(1)
  
  #ifdef TW_OSL_DEBUG
  struct tw_cli_q_stats {
 @@ -206,7 +205,6 @@ struct tw_cli_ctlr_context {
  #endif /* TW_OSL_DEBUG */
  };
  
 -#pragma pack()
  
  
  /*
 
 Modified: stable/7/sys/dev/twa/tw_cl_share.h
 ==============================================================================
 --- stable/7/sys/dev/twa/tw_cl_share.h	Fri Jul  9 20:05:56 2010	(r209862)
 +++ stable/7/sys/dev/twa/tw_cl_share.h	Fri Jul  9 20:43:57 2010	(r209863)
 @@ -125,7 +125,6 @@
  #define TW_CL_SEVERITY_DEBUG_STRING	"DEBUG"
  
  
 -#pragma pack(1)
  
  /*
   * Structure, a pointer to which is used as the controller handle in
 @@ -190,6 +189,7 @@ struct tw_cl_req_packet {
  };
  
  
 +#pragma pack(1)
  /*
   * Packet that describes an AEN/error generated by the controller,
   * Common Layer, or even the OS Layer.
 @@ -206,6 +206,7 @@ struct tw_cl_event_packet {
  	TW_UINT32	event_src;
  	TW_UINT8	severity_str[20];
  };
 +#pragma pack()
  
  
  /* Structure to link 2 adjacent elements in a list. */
 @@ -215,6 +216,7 @@ struct tw_cl_link {
  };
  
  
 +#pragma pack(1)
  /* Scatter/Gather list entry with 32 bit addresses. */
  struct tw_cl_sg_desc32 {
  	TW_UINT32	address;
 _______________________________________________
 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:
