NetBSD Problem Report #39141

From taca@back-street.net  Sun Jul 13 12:42:27 2008
Return-Path: <taca@back-street.net>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id 48BD763B880
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 13 Jul 2008 12:42:27 +0000 (UTC)
Message-Id: <20080713124218.9ABCA496D9@edge.back-street.net>
Date: Sun, 13 Jul 2008 21:42:18 +0900 (JST)
From: taca@back-street.net
Reply-To: taca@back-street.net
To: gnats-bugs@gnats.NetBSD.org
Subject: kernel crash on shutdown when system power off
X-Send-Pr-Version: 3.95

>Number:         39141
>Category:       kern
>Synopsis:       kernel crash on shutdown when system power off
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jul 13 12:45:00 +0000 2008
>Closed-Date:    Tue Jun 21 02:42:19 +0000 2011
>Last-Modified:  Tue Jun 21 02:42:19 +0000 2011
>Originator:     Takahiro Kambe
>Release:        NetBSD 4.99.69
>Organization:
Takahiro Kambe
>Environment:


System: NetBSD edge.back-street.net 4.99.69 NetBSD 4.99.69 (CF-R) #112: Sat Jul 12 10:50:38 JST 2008 taca@reef.back-street.net:/var/obj/sys/arch/i386/compile/CF-R i386
Architecture: i386
Machine: i386
>Description:
	kernel crash on shutdown when system power off.
	kenrel panic after ACPI S5 state?

syncing disks... done
unmounting file systems... done
acpi0: entering state 5
panic: cpu_switchto: switching above IPL_SCHED (8)
_prop_array_pool(0,0,0,0,cc2830a0,c08c4a80,cc2830a0,0,0,0) at 0xcc2af5fc
cpu_info_primary(c1cec804,c08512a8,a08501c0,c085fa80,0,30757063,0,0,0,c1cec800)
at 0xc085fac0
Ent traceback...

dumping to dev p.1 offset 2118375

	And freeze, no crash dump advanced.

>How-To-Repeat:
	# shutdown -p now
>Fix:
	Unkown.

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->feedback
State-Changed-By: drochner@NetBSD.org
State-Changed-When: Tue, 31 Mar 2009 17:20:38 +0000
State-Changed-Why:
can you try with OsdSchedule.c rev. 1.10?


From: Matthias Drochner <drochner@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/39141 CVS commit: src/sys/dev/acpi/acpica
Date: Tue, 31 Mar 2009 17:17:47 +0000

 Module Name:	src
 Committed By:	drochner
 Date:		Tue Mar 31 17:17:47 UTC 2009

 Modified Files:
 	src/sys/dev/acpi/acpica: OsdSchedule.c OsdSynch.c

 Log Message:
 avoid tsleep also during shutdown (and in particular ACPI poweroff),
 should fix PR kern/39141 by Takahiro Kambe and PR port-i386/41110
 by Reinoud Zandijk


 To generate a diff of this commit:
 cvs rdiff -u -r1.9 -r1.10 src/sys/dev/acpi/acpica/OsdSchedule.c
 cvs rdiff -u -r1.11 -r1.12 src/sys/dev/acpi/acpica/OsdSynch.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: Takahiro Kambe <taca@back-street.net>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/39141 (kernel crash on shutdown when system power off)
Date: Thu, 02 Apr 2009 12:29:37 +0900 (JST)

 In message <20090331172040.4A7C763B8C8@www.NetBSD.org>
 	on Tue, 31 Mar 2009 17:20:40 +0000 (UTC),
 	drochner@NetBSD.org wrote:
 > Synopsis: kernel crash on shutdown when system power off
 > 
 > State-Changed-From-To: open->feedback
 > State-Changed-By: drochner@NetBSD.org
 > State-Changed-When: Tue, 31 Mar 2009 17:20:38 +0000
 > State-Changed-Why:
 > can you try with OsdSchedule.c rev. 1.10?
 Sadly, no change.

 unmounting file systems... done
 acpi0: entering state 5
 panic: cpu_switchto: switching above IPL_SCHED (8)
 ...

 % ident /netbsd|egrep OsdSchedule.c  
      $NetBSD: OsdSchedule.c,v 1.10 2009/03/31 17:17:47 drochner Exp $

 -- 
 Takahiro Kambe <taca@back-street.net>

State-Changed-From-To: feedback->open
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sun, 05 Apr 2009 04:19:50 +0000
State-Changed-Why:
feedback received, problem still appears


From: Jukka Ruohonen <jruohonen@iki.fi>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/39141 (kernel crash on shutdown when system power off)
Date: Tue, 6 Jul 2010 13:11:03 +0300

 On Thu, Apr 02, 2009 at 03:30:02AM +0000, Takahiro Kambe wrote:
 >  Sadly, no change.
 >  
 >  unmounting file systems... done
 >  acpi0: entering state 5
 >  panic: cpu_switchto: switching above IPL_SCHED (8)
 >  ...

 Can you try the following patch?

 This is a *wild* guess based on the traces posted in the thread:

 http://mail-index.netbsd.org/current-users/2008/11/22/msg006196.html

 Index: acpi.c
 ===================================================================
 RCS file: /cvsroot/src/sys/dev/acpi/acpi.c,v
 retrieving revision 1.205
 diff -u -p -r1.205 acpi.c
 --- acpi.c	2 Jul 2010 05:18:38 -0000	1.205
 +++ acpi.c	6 Jul 2010 10:07:13 -0000
 @@ -1481,6 +1481,11 @@ acpi_enter_sleep_state(struct acpi_softc
  			break;
  		}

 +		/*
 +		 * Ensure that all GPEs are disabled before entering S5.
 +		 */
 +		AcpiDisableAllGpes();
 +
  		DELAY(1000000);

  		sc->sc_sleepstate = state;

State-Changed-From-To: open->feedback
State-Changed-By: jruoho@NetBSD.org
State-Changed-When: Fri, 25 Mar 2011 04:00:19 +0000
State-Changed-Why:

I fixed one locking error in the shutdown procedure some time ago.
Can you verify that the problem is still present in recent HEAD?



State-Changed-From-To: feedback->closed
State-Changed-By: jruoho@NetBSD.org
State-Changed-When: Tue, 21 Jun 2011 02:42:19 +0000
State-Changed-Why:

Feedback timeout. I believe this is fixed, but please reply if this is not
the case with >= 5.99.53.



>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.