Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 02 Apr 2009 16:36:28 +0300
From:      Alexander Motin <mav@FreeBSD.org>
To:        Dmitry Morozovsky <marck@rinet.ru>
Cc:        stable@freebsd.org
Subject:   Re: RELENG_7 ata panic on atacontrol attach
Message-ID:  <49D4BF5C.4010509@FreeBSD.org>
In-Reply-To: <alpine.BSF.2.00.0904021716510.19163@woozle.rinet.ru>
References:  <alpine.BSF.2.00.0903311417251.60285@woozle.rinet.ru> <49D29097.9040701@FreeBSD.org> <alpine.BSF.2.00.0904010330360.32133@woozle.rinet.ru> <49D3BD14.9070505@FreeBSD.org> <alpine.BSF.2.00.0904021154020.32133@woozle.rinet.ru> <alpine.BSF.2.00.0904021716510.19163@woozle.rinet.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
Dmitry Morozovsky wrote:
> On Thu, 2 Apr 2009, Dmitry Morozovsky wrote:
> 
> DM> AM> > AM> > AM> > atapci3: <nVidia nForce MCP55 SATA300 controller> port
> DM> AM> > AM> >
> DM> AM> > 0xbc00-0xbc07,0xb880-0xb883,0xb800-0xb807,0xb480-0xb483,0xb400-0xb40f mem
> DM> AM> > AM> > 0xefcb3000-0xefcb3fff irq 23 at device 5.2 on pci0
> DM> AM> > AM> > AM> > AM> > atacontrol detach ata7
> DM> AM> > AM> > - insert ATA disk (ad14)
> DM> AM> > AM> > atacontrol attach ata7
> DM> AM> > AM> > AM> > pinics with Fatal trap 12: page fault while in kernel mode
> DM> AM> > AM> AM> Any kernel verbose messages before it?
> 
> got it:
> 
> ata7: SATA connect time=0ms^M
> ata7: reset tp1 mask=01 ostat0=50 ostat1=00^M
> ata7: stat0=0x50 err=0x01 lsb=0x00 msb=0x00^M
> ata7: reset tp2 stat0=50 stat1=00 devices=0x1<ATA_MASTER>^M
> ata7: [MPSAFE]^M
> ata7: [ITHREAD]^M
> ata7-master: pio=PIO4 wdma=WDMA2 udma=UDMA133 cable=40 wire^M
> ad14: 715404MB <Seagate ST3750330AS SD04> at ata7-master SATA300^M
> ad14: 1465149168 sectors [1453521C/16H/63S] 16 sectors/interrupt 1 depth 
> queue^M
> GEOM: new disk ad14^M
> GEOM_LABEL: Label for provider ad14a is ufs/moose09.^M
> GEOM_LABEL: Label ufs/moose09 removed.^M
> [-- MARK -- Thu Apr  2 17:00:00 2009]
> GEOM_LABEL: Label for provider ad14a is ufs/moose09.^M
> GEOM_LABEL: Label ufs/moose09 removed.^M
> ata7: SATA connect time=0ms^M
> ata7: reset tp1 mask=01 ostat0=50 ostat1=00^M
> ata7: stat0=0x80 err=0x01 lsb=0x00 msb=0x00^M
> ata7: stat0=0x80 err=0x01 lsb=0x00 msb=0x00^M
> ata7: stat0=0x80 err=0x01 lsb=0x00 msb=0x00^M
> ata7: stat0=0x80 err=0x01 lsb=0x00 msb=0x00^M
> ata7: stat0=0x80 err=0x01 lsb=0x00 msb=0x00^M
> ata7: stat0=0x80 err=0x01 lsb=0x00 msb=0x00^M
> ata7: stat0=0x80 err=0x01 lsb=0x00 msb=0x00^M
> ata7: stat0=0x80 err=0x01 lsb=0x00 msb=0x00^M
> ata7: stat0=0x80 err=0x01 lsb=0x00 msb=0x00^M
> ata7: stat0=0x80 err=0x01 lsb=0x00 msb=0x00^M
> ata7: stat0=0x80 err=0x01 lsb=0x00 msb=0x00^M
> ata7: stat0=0x80 err=0x01 lsb=0x00 msb=0x00^M
> ata7: stat0=0x50 err=0x01 lsb=0x00 msb=0x00^M
> ata7: reset tp2 stat0=50 stat1=00 devices=0x1<ATA_MASTER>^M
> ata7: ata7: [MPSAFE]^M
> CONNECT requested^M
> ata7: [ITHREAD]^M
> ata7: CONNECTED^M
> ata7: SATA connect time=0ms^M
> ata7: reset tp1 mask=01 ostat0=50 ostat1=00^M
> ata7: DISCONNECT requested^M
> ata7: CONNECT requested^M
> ata7: stat0=0x80 err=0x00 lsb=0x00 msb=0x00^M
> ata7: stat0=0x80 err=0x00 lsb=0x00 msb=0x00^M
> ata7: DISCONNECT requested^M
> ata7: stat0=0x80 err=0x00 lsb=0x00 msb=0x00^M
> ata7: CONNECT requested^M
> ata7: stat0=0x80 err=0x00 lsb=0x00 msb=0x00^M
> ata7: stat0=0x80 err=0x00 lsb=0x00 msb=0x00^M
> ata7: DISCONNECT requested^M
> ata7: CONNECT requested^M
> ata7: stat0=0x80 err=0x00 lsb=0x00 msb=0x00^M
> ata7: stat0=0x80 err=0x00 lsb=0x00 msb=0x00^M
> ata7: DISCONNECT requested^M
> ata7: CONNECT requested^M
> ata7: stat0=0x80 err=0x00 lsb=0x00 msb=0x00^M
> ata7: stat0=0x80 err=0x00 lsb=0x00 msb=0x00^M
> ata7: DISCONNECT requested^M
> ata7: stat0=0x80 err=0x00 lsb=0x00 msb=0x00^M
> ata7: CONNECT requested^M
> ata7: stat0=0x80 err=0x00 lsb=0x00 msb=0x00^M
> 
> ata7: stat0=0x80 err=0x00 lsb=0x00 msb=0x00^M
> ata7: stat0=0x80 err=0x00 lsb=0x00 msb=0x00^M
> ata7: stat0=0x50 err=0x01 lsb=0x00 msb=0x00^M

This looks like race between PATA reset sequence and SATA hot plug
events. For AHCI it is handled by masking interrupts during reset. How
it is expected to be done here, I am not sure. You can just disable hot
plug by commenting respective part of of ata_sata_phy_check_events()
function.

> ata7: reset tp2 stat0=50 stat1=00 devices=0x1<ATA_MASTER>^M
> ata7-master: pio=PIO4 wdma=WDMA2 udma=UDMA133 cable=40 wire^M
> ata7-master: pio=PIO4 wdma=WDMA2 udma=UDMA133 cable=40 wire^M
> ad: ad14 already exists; skipping it^M
> ad: ad14 already exists; skipping it^M
> ^M
> ^M
> Fatal trap 12: page fault while in kernel mode^M

It looks alike to crash I have already fixed on CURRENT:
http://svn.freebsd.org/changeset/base/188464

-- 
Alexander Motin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?49D4BF5C.4010509>