NetBSD Problem Report #41095

From kardel@pip.acrys.com  Sun Mar 29 17:20:30 2009
Return-Path: <kardel@pip.acrys.com>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id BA94663B8A5
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 29 Mar 2009 17:20:30 +0000 (UTC)
Message-Id: <200903291612.n2TGCw2S001805@pip.acrys.com>
Date: Sun, 29 Mar 2009 18:12:58 +0200 (MEST)
From: kardel@pip.acrys.com
Reply-To: kardel@pip.acrys.com
To: gnats-bugs@gnats.NetBSD.org
Subject: ahcisata won't dump
X-Send-Pr-Version: 3.95

>Number:         41095
>Category:       kern
>Synopsis:       dumps via ahcisata fail
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    bouyer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Mar 29 17:25:00 +0000 2009
>Closed-Date:    Fri Apr 26 20:58:19 +0000 2013
>Last-Modified:  Sat Apr 27 13:45:04 +0000 2013
>Originator:     Frank Kardel
>Release:        NetBSD 5.99.8
>Organization:

>Environment:
System: NetBSD pip.kardel.name 5.99.8 NetBSD 5.99.8 (PIP) #28: Sun Mar 22 16:45:44 MET 2009 kardel@pip.kardel.name:/fs/raid1a/src/NetBSD/tc-merge/src/obj.i386/sys/arch/i386/compile/PIP i386
Architecture: i386
Machine: i386
>Description:
	On panic ahcisata failt to dump, well it spits out an error message:
	"ahcisata1 port 0 device connected, but communication not established"
	and then happily show the dump countdoen (hao much memors is still to be dumped)
	with a nice "success" at the end. After that dump fails
	with an error message as the FLUSH of the disk wouldn't work because of timeout.

	It looks like there is not much error checking goinf on and the device has
	not properly been initialized.

	ahcisata1 at pci0 dev 31 function 2: vendor 0x8086 product 0x2922
	ahcisata1: interrupting at ioapic0 pin 19
	ahcisata1: AHCI revision 1.2, 6 ports, 32 command slots, features 0xe722e0c0
	atabus4 at ahcisata1 channel 0
	atabus5 at ahcisata1 channel 1
	atabus6 at ahcisata1 channel 2
	atabus7 at ahcisata1 channel 3
	atabus8 at ahcisata1 channel 4
	atabus9 at ahcisata1 channel 5
	ahcisata1 port 5: device present, speed: 1.5Gb/s
	ahcisata1 port 1: device present, speed: 1.5Gb/s
	ahcisata1 port 0: device present, speed: 1.5Gb/s
	ahcisata1 port 4: device present, speed: 1.5Gb/s
	...
	wd2 at atabus4 drive 0: <WDC WD1500ADFD-00NLR5>
	wd2: drive supports 16-sector PIO transfers, LBA48 addressing
	wd2: 139 GB, 290721 cyl, 16 head, 63 sec, 512 bytes/sect x 293046768 sectors
	wd2: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133)
	wd2(ahcisata1:0:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133) (using DMA)

>How-To-Repeat:
	Attempt to get a crash dump via ahcisata1 port 0 (000:31:2: Intel 82801I AHCI SATA Controller w/ 6 ports (SATA mass storage, interface 0x01, revision 0x02))
	Watch the nice dump simulation. Nothing reaches the disk however.
>Fix:


>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: kern-bug-people->bouyer
Responsible-Changed-By: bouyer@NetBSD.org
Responsible-Changed-When: Wed, 03 Apr 2013 17:16:25 +0000
Responsible-Changed-Why:
I looked at this


State-Changed-From-To: open->feedback
State-Changed-By: bouyer@NetBSD.org
State-Changed-When: Wed, 03 Apr 2013 17:16:25 +0000
State-Changed-Why:
Hello,
hopefully I fixed this in head; can you try a recent HEAD kernel ?


From: "Manuel Bouyer" <bouyer@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/41095 CVS commit: src/sys/dev
Date: Wed, 3 Apr 2013 17:15:08 +0000

 Module Name:	src
 Committed By:	bouyer
 Date:		Wed Apr  3 17:15:07 UTC 2013

 Modified Files:
 	src/sys/dev/ata: ata.c atavar.h sata_subr.c satavar.h
 	src/sys/dev/ic: ahcisata_core.c mvsata.c siisata.c wdc.c
 	src/sys/dev/usb: umass_isdata.c

 Log Message:
 Fix kernel dump on ahci controller, by making sure we won't sleep
 while dumping:
 - introduce ata_delay() which either use delay() or kpause()
   depending on flags. use it in sata_reset_interface() and
   some ahci functions
 - kill ATA_NOSLEEP, it was tested but never set. use ATA_POLL instead.
 - reduce delay while polling in ahci, to speed up the dump

 Should fix PR kern/41095


 To generate a diff of this commit:
 cvs rdiff -u -r1.126 -r1.127 src/sys/dev/ata/ata.c
 cvs rdiff -u -r1.90 -r1.91 src/sys/dev/ata/atavar.h
 cvs rdiff -u -r1.20 -r1.21 src/sys/dev/ata/sata_subr.c
 cvs rdiff -u -r1.8 -r1.9 src/sys/dev/ata/satavar.h
 cvs rdiff -u -r1.46 -r1.47 src/sys/dev/ic/ahcisata_core.c
 cvs rdiff -u -r1.29 -r1.30 src/sys/dev/ic/mvsata.c
 cvs rdiff -u -r1.23 -r1.24 src/sys/dev/ic/siisata.c
 cvs rdiff -u -r1.277 -r1.278 src/sys/dev/ic/wdc.c
 cvs rdiff -u -r1.27 -r1.28 src/sys/dev/usb/umass_isdata.c

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

From: Frank Kardel <kardel@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: kern/41095 (dumps via ahcisata fail)
Date: Fri, 26 Apr 2013 21:58:41 +0200

 Works now. can be closed.

 Frank

State-Changed-From-To: feedback->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Fri, 26 Apr 2013 20:58:19 +0000
State-Changed-Why:
Confirmed fixed, thanks for the feedback!


From: matthew green <mrg@eterna.com.au>
To: gnats-bugs@NetBSD.org
Cc: bouyer@NetBSD.org, netbsd-bugs@netbsd.org, gnats-admin@netbsd.org,
    wiz@NetBSD.org, kardel@pip.acrys.com
Subject: re: kern/41095 (dumps via ahcisata fail)
Date: Sat, 27 Apr 2013 23:44:16 +1000

 > Synopsis: dumps via ahcisata fail
 > 
 > State-Changed-From-To: feedback->closed
 > State-Changed-By: wiz@NetBSD.org
 > State-Changed-When: Fri, 26 Apr 2013 20:58:19 +0000
 > State-Changed-Why:
 > Confirmed fixed, thanks for the feedback!

 is this pulled up to netbsd-6?  this is a pretty major issue
 with netbsd 6.0 -- the vast majority of x86 systems fail to
 dump...


 .mrg.

>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.