Hi there colleagues, atapci3: <nVidia nForce MCP55 SATA300 controller> port 0xbc00-0xbc07,0xb880-0xb883,0xb800-0xb807,0xb480-0xb483,0xb400-0xb40f mem 0xefcb3000-0xefcb3fff irq 23 at device 5.2 on pci0 atacontrol detach ata7 - insert ATA disk (ad14) atacontrol attach ata7 pinics with Fatal trap 12: page fault while in kernel mode (kgdb) bt #0 doadump () at pcpu.h:196 #1 0xc0533227 in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:418 #2 0xc0533535 in panic (fmt=Variable "fmt" is not available. ) at /usr/src/sys/kern/kern_shutdown.c:574 #3 0xc06cfca3 in trap_fatal (frame=0xfcb0aa7c, eva=40) at /usr/src/sys/i386/i386/trap.c:939 #4 0xc06cff00 in trap_pfault (frame=0xfcb0aa7c, usermode=0, eva=40) at /usr/src/sys/i386/i386/trap.c:852 #5 0xc06d08a6 in trap (frame=0xfcb0aa7c) at /usr/src/sys/i386/i386/trap.c:530 #6 0xc06b5b1b in calltrap () at /usr/src/sys/i386/i386/exception.s:159 #7 0xc055b69c in device_attach (dev=0xcc58e480) at /usr/src/sys/kern/subr_bus.c:279 #8 0xc055c96d in device_probe_and_attach (dev=0xcc58e480) at /usr/src/sys/kern/subr_bus.c:2366 #9 0xc055ca59 in bus_generic_attach (dev=0xc5167100) at /usr/src/sys/kern/subr_bus.c:2905 #10 0xc04796f0 in ata_identify (dev=0xc5167100) at /usr/src/sys/dev/ata/ata-all.c:723 #11 0xc0479fe4 in ata_attach (dev=0xc5167100) at /usr/src/sys/dev/ata/ata-all.c:150 #12 0xc047a93a in ata_ioctl (dev=0xc510e200, cmd=2147770627, data=0xd2f6cb80 "\a", flag=3, td=0xcd32c690) at /usr/src/sys/dev/ata/ata-all.c:387 #13 0xc04f6497 in giant_ioctl (dev=0xc510e200, cmd=2147770627, data=0xd2f6cb80 "\a", fflag=3, td=0xcd32c690) at /usr/src/sys/kern/kern_conf.c:398 #14 0xc04d5f87 in devfs_ioctl_f (fp=0xcce31e8c, com=2147770627, data=0xd2f6cb80, cred=0xc6897700, td=0xcd32c690) at /usr/src/sys/fs/devfs/devfs_vnops.c:602 #15 0xc056d4e5 in kern_ioctl (td=0xcd32c690, fd=3, com=2147770627, data=0xd2f6cb80 "\a") at file.h:269 #16 0xc056d63f in ioctl (td=0xcd32c690, uap=0xfcb0acfc) at /usr/src/sys/kern/sys_generic.c:570 #17 0xc06d0248 in syscall (frame=0xfcb0ad38) at /usr/src/sys/i386/i386/trap.c:1090 #18 0xc06b5b80 in Xint0x80_syscall () at /usr/src/sys/i386/i386/exception.s:255 #19 0x00000033 in ?? () Previous frame inner to this frame (corrupt stack?) (kgdb) up 7 #7 0xc055b69c in device_attach (dev=0xcc58e480) at /usr/src/sys/kern/subr_bus.c:279 279 if (dev->sysctl_tree != NULL) -- Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] [ FreeBSD committer: marck@FreeBSD.org ] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------
Dmitry Morozovsky wrote:> Hi there colleagues, > > atapci3: <nVidia nForce MCP55 SATA300 controller> port > 0xbc00-0xbc07,0xb880-0xb883,0xb800-0xb807,0xb480-0xb483,0xb400-0xb40f mem > 0xefcb3000-0xefcb3fff irq 23 at device 5.2 on pci0 > > > atacontrol detach ata7 > - insert ATA disk (ad14) > atacontrol attach ata7 > > pinics with Fatal trap 12: page fault while in kernel modeAny kernel verbose messages before it? -- Alexander Motin
On Wed, 1 Apr 2009, Alexander Motin wrote: AM> Dmitry Morozovsky wrote: AM> > Hi there colleagues, AM> > AM> > atapci3: <nVidia nForce MCP55 SATA300 controller> port AM> > 0xbc00-0xbc07,0xb880-0xb883,0xb800-0xb807,0xb480-0xb483,0xb400-0xb40f mem AM> > 0xefcb3000-0xefcb3fff irq 23 at device 5.2 on pci0 AM> > AM> > AM> > atacontrol detach ata7 AM> > - insert ATA disk (ad14) AM> > atacontrol attach ata7 AM> > AM> > pinics with Fatal trap 12: page fault while in kernel mode AM> AM> Any kernel verbose messages before it? Nope. Just ata7: [ITHREAD]^M ^M ^M Fatal trap 12: page fault while in kernel mode^M cpuid = 0; apic id = 00^M fault virtual address = 0x28^M fault code = supervisor read, page not present^M instruction pointer = 0x20:0xc055b69c^M stack pointer = 0x28:0xfcb0aabc^M frame pointer = 0x28:0xfcb0aaf8^M code segment = base 0x0, limit 0xfffff, type 0x1b^M = DPL 0, pres 1, def32 1, gran 1^M processor eflags = interrupt enabled, resume, IOPL = 0^M current process = 3725 (atacontrol)^M trap number = 12^M panic: page fault^M and approx 15 seconds of wait between ata channel detection and the panic. -- Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] [ FreeBSD committer: marck@FreeBSD.org ] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------
On Wed, 1 Apr 2009, Dmitry Morozovsky wrote: DM> AM> > atapci3: <nVidia nForce MCP55 SATA300 controller> port DM> AM> > 0xbc00-0xbc07,0xb880-0xb883,0xb800-0xb807,0xb480-0xb483,0xb400-0xb40f mem DM> AM> > 0xefcb3000-0xefcb3fff irq 23 at device 5.2 on pci0 DM> AM> > DM> AM> > DM> AM> > atacontrol detach ata7 DM> AM> > - insert ATA disk (ad14) DM> AM> > atacontrol attach ata7 DM> AM> > DM> AM> > pinics with Fatal trap 12: page fault while in kernel mode DM> AM> DM> AM> Any kernel verbose messages before it? DM> DM> Nope. Just DM> DM> ata7: [ITHREAD]^M DM> ^M DM> ^M DM> Fatal trap 12: page fault while in kernel mode^M DM> cpuid = 0; apic id = 00^M DM> fault virtual address = 0x28^M DM> fault code = supervisor read, page not present^M DM> instruction pointer = 0x20:0xc055b69c^M DM> stack pointer = 0x28:0xfcb0aabc^M DM> frame pointer = 0x28:0xfcb0aaf8^M DM> code segment = base 0x0, limit 0xfffff, type 0x1b^M DM> = DPL 0, pres 1, def32 1, gran 1^M DM> processor eflags = interrupt enabled, resume, IOPL = 0^M DM> current process = 3725 (atacontrol)^M DM> trap number = 12^M DM> panic: page fault^M DM> DM> and approx 15 seconds of wait between ata channel detection and the panic. What I possibly missed is that it is not guaranteed panic, and seems to be dependent on parameters of disk inserted: e.g. I usually have this particular machine panicked with WD320, and no panics with Seagate 7200.11/750G -- Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] [ FreeBSD committer: marck@FreeBSD.org ] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------
Dmitry Morozovsky wrote:> On Wed, 1 Apr 2009, Alexander Motin wrote: > AM> Dmitry Morozovsky wrote: > AM> > Hi there colleagues, > AM> > > AM> > atapci3: <nVidia nForce MCP55 SATA300 controller> port > AM> > 0xbc00-0xbc07,0xb880-0xb883,0xb800-0xb807,0xb480-0xb483,0xb400-0xb40f mem > AM> > 0xefcb3000-0xefcb3fff irq 23 at device 5.2 on pci0 > AM> > > AM> > > AM> > atacontrol detach ata7 > AM> > - insert ATA disk (ad14) > AM> > atacontrol attach ata7 > AM> > > AM> > pinics with Fatal trap 12: page fault while in kernel mode > AM> > AM> Any kernel verbose messages before it? > > Nope. Just > > ata7: [ITHREAD]^M > ^M > ^M > Fatal trap 12: page fault while in kernel mode^M > > and approx 15 seconds of wait between ata channel detection and the panic.Are you sure that you have verbose messages enabled during boot or via sysctl? It looks a bit too quiet. RELENG_7 branch ATA maintenance is a bit difficult for me now due to big differences from the HEAD. It makes me wish to sync them as there is still too much time before 7.x EOL. May be I will do it after the 7.2 release process finished. Now is probably not the best time to do it. -- Alexander Motin
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^MThis 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^MIt looks alike to crash I have already fixed on CURRENT: http://svn.freebsd.org/changeset/base/188464 -- Alexander Motin
On Thu, 2 Apr 2009, Alexander Motin wrote: AM> > ata7: reset tp2 stat0=50 stat1=00 devices=0x1<ATA_MASTER>^M AM> > ata7-master: pio=PIO4 wdma=WDMA2 udma=UDMA133 cable=40 wire^M AM> > ata7-master: pio=PIO4 wdma=WDMA2 udma=UDMA133 cable=40 wire^M AM> > ad: ad14 already exists; skipping it^M AM> > ad: ad14 already exists; skipping it^M AM> > ^M AM> > ^M AM> > Fatal trap 12: page fault while in kernel mode^M AM> AM> It looks alike to crash I have already fixed on CURRENT: AM> http://svn.freebsd.org/changeset/base/188464 Seems to be. Would you please ask re@ for MFC approval? Thanks! -- Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] [ FreeBSD committer: marck@FreeBSD.org ] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------