From nobody@FreeBSD.org  Sat Aug 15 16:08:00 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 81BD51065692
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 15 Aug 2009 16:08:00 +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 7028E8FC43
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 15 Aug 2009 16:08:00 +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 n7FG80Bk016407
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 15 Aug 2009 16:08:00 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n7FG80Rg016406;
	Sat, 15 Aug 2009 16:08:00 GMT
	(envelope-from nobody)
Message-Id: <200908151608.n7FG80Rg016406@www.freebsd.org>
Date: Sat, 15 Aug 2009 16:08:00 GMT
From: Nathaniel Filardo <nwf@cs.jhu.edu>
To: freebsd-gnats-submit@FreeBSD.org
Subject: -CURRENT on sparc64 immediate "panic: mtx_init: mtx_lock not aligned for turnstile chain: 0xc06489f8"
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         137800
>Category:       kern
>Synopsis:       [panic] -CURRENT on sparc64/ia64 immediate "panic: mtx_init: mtx_lock not aligned for turnstile chain: 0xc06489f8"
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    attilio
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Aug 15 16:10:01 UTC 2009
>Closed-Date:    Mon Aug 09 12:37:42 UTC 2010
>Last-Modified:  Mon Aug 09 12:37:42 UTC 2010
>Originator:     Nathaniel Filardo
>Release:        -CURRENT
>Organization:
>Environment:
FreeBSD hydra.priv.oc.ietfng.org 8.0-CURRENT-200906 FreeBSD 8.0-CURRENT-200906 #0: Thu Jun 11 15:23:43 UTC 2009     root@araz.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  sparc64

>Description:
SVN r196226 added ASSERT_ATOMIC_LOAD to check that values could be atomically loaded.  On sparc64, _ALIGN() masks off 0xF but the compiler seems to think that the alignment requirement is only 0x7 as printing "&( ((struct foo *)(NULL))->...)" for each of a,b,c,d,e,f in  "struct foo { long a; char b; long c; void *d; char e; void *f; };" seems to produces "0 8 16 24 32 40"

I don't know what the right fix is or even which one is in error.  Thoughts?
>How-To-Repeat:
Build a kernel on sparc64 later than r196226.  It is unclear to me if other details of kernel configuration matter.
>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-sparc64 
Responsible-Changed-By: gavin 
Responsible-Changed-When: Sat Aug 15 20:49:56 UTC 2009 
Responsible-Changed-Why:  
I suspect that this is some MD problem on sparc64, and not directly 
related to the commit that triggers the problem. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=137800 
Responsible-Changed-From-To: freebsd-sparc64->bz 
Responsible-Changed-By: bz 
Responsible-Changed-When: Sat Aug 15 21:46:12 UTC 2009 
Responsible-Changed-Why:  
Mine. I got input form kib on why it's an issue for sparc64 and I think 
ia64 might have the same problem.  We'll either disable the check or 
find something better that actually works on all platforms. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=137800 
Responsible-Changed-From-To: bz->attilio 
Responsible-Changed-By: bz 
Responsible-Changed-When: Sun Aug 16 17:21:11 UTC 2009 
Responsible-Changed-Why:  
Thanks for handling this. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=137800 
State-Changed-From-To: open->closed 
State-Changed-By: attilio 
State-Changed-When: Mon Aug 9 12:34:30 UTC 2010 
State-Changed-Why:  
This has been fixed with r196334. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=137800 
>Unformatted:
