Re: Kernel page fault with non-sleepable locks held error with kernel r270837

From: John-Mark Gurney <jmg_at_funkthat.com>
Date: Sat, 30 Aug 2014 23:47:18 -0700
Hiroo Ono (????????????) wrote this message on Sun, Aug 31, 2014 at 14:01 +0900:
> During upgrading world and kernel from r26939 to r270837, I got the
> following problem.
> a) the arch is i386
> b) kernel is of r270837, userland is of r26939 (make kernel is done
> and rebooted, make installworld not yet).
> c) booting in single user mode is OK.
> d) during startup of multi-user mode, when dhclient is run, the
> following message appears, and the system freezes:
> 
> Starting devd.
> wlan0: link state changed to UP
> Starting webcamd.
> Attached to ugen4.2[0]
> Starting webcready running for ugen4.2.0
> /usr/local/etc/rc.d/webcamd: WARNING: failed to start webcamd
> Starting dhclient.
> DHCPREQUEST on wlan0 to 255.255.255.255 port 67
> DHCPACK from 192.168.8.2
> Kernel page fault with the following non-sleepable locks held:
> exclusive sleep mutex so_rcv (so_rcv) r = 0 (0xc713f078) locked _at_
> /usr/src/sys/kern/kern_event.c:2005

I'm puzzled by this line number...  This line number doesn't do any
locks, it is in the function knlist_remove_inevent...

> KDB stack backtrace:
>  rapper+0x2d/frame 0xe8f42710
> kdb_backtrace(c11aaf80,0,c713f078,c119a9e8,7d5,...) at 0xc0b4b160 =
> kdb_backtrace+0x30/frame 0xe8f42778
> witness_warn(5,0,c136b0a0,76fb000,c1833d58,...) at 0xc8b68a52 =
> witness_warn+0x402/frame 0xe8f427c8
> trap_pfault(18,3fd,c0dcc2d0,c1f64a80,c75fa000,...) at 0xc102f46b =
> trap_pfault+0x5b/frame 0xe8f42840
> trap(e8f42988) at 0xc102edcf = trap+0x6cf/frame 0xe8f4297c
> calltrap() at 0xc1017c4c = calltrap+0x6/frame 0xe8f4297c
> filt_soread(c75f7828,0,c119a9e8,48d,0,...) at 0xc0b9837d =
> filt_soread+0x9d/frame 0xe8f429f0
> kqueue_register(c6f59310,1,1,4f5,0,...) at 0xc0ad1457 =
> kqueue_register+0x807/frame 0xe8f42a68
> kern_kevent(c6f59310,7,12c217ce1 = Xint0x80), eip =

But notice the knlist_remove_inevent doesn't appear in the back
trace...

Can you confirm that your kern_event.c is:
__FBSDID("$FreeBSD: head/sys/kern/kern_event.c 268843 2014-07-18 14:27:04Z bapt
$");

> instruction poi         = 0x28:0xe8f429f0     fff, type 0x1b
> DHCPREQUEST on wlan0 to 255.255.255.255 port 67
> DHCPACK from 192.168.8.2
> 
> e) kernel configuration differs from GENERIC on the following point
> options      VIMAGE
> options      DDB_NUMSYM
> nocpu        I486_CPU
> nooptions  VESA
> 
> Does the problem come from kernel and userland not in sync? or there
> are other problems?
> Is there any workaround?
> Attached is the dmesg of r270837 on the machine.

> Copyright (c) 1992-2014 The FreeBSD Project.
> Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
> 	The Regents of the University of California. All rights reserved.
> FreeBSD is a registered trademark of The FreeBSD Foundation.
> FreeBSD 11.0-CURRENT #6 r270837: Sun Aug 31 11:32:20 JST 2014
>     root_at_krokinole.oikumene.ukehi.net:/usr/obj/usr/local/poudriere/jails/head/usr/src/sys/OIKUMENE i386
> FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
> WARNING: WITNESS option enabled, expect reduced performance.
> VT: running with driver "vga".
> info: [drm] Initialized drm 1.1.0 20060810
> CPU: Intel(R) Atom(TM) CPU N270   _at_ 1.60GHz (1596.04-MHz 686-class CPU)
>   Origin="GenuineIntel"  Id=0x106c2  Family=0x6  Model=0x1c  Stepping=2
>   Features=0xbfe9fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
>   Features2=0x40c39d<SSE3,DTES64,MON,DS_CPL,EST,TM2,SSSE3,xTPR,PDCM,MOVBE>
>   AMD Features2=0x1<LAHF>
>   TSC: P-state invariant, performance statistics
> real memory  = 1073741824 (1024 MB)
> avail memory = 1013121024 (966 MB)
> Event timer "LAPIC" quality 400
> ACPI APIC Table: <ACRSYS ACRPRDCT>
> FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
> FreeBSD/SMP: 1 package(s) x 1 core(s) x 2 HTT threads
>  cpu0 (BSP): APIC ID:  0
>  cpu1 (AP/HT): APIC ID:  1
> WARNING: VIMAGE (virtualized network stack) is a highly experimental feature.
> ioapic0: Changing APIC ID to 4
> ioapic0 <Version 2.0> irqs 0-23 on motherboard
> Cuse v0.1.34 _at_ /dev/cuse
> kbd1 at kbdmux0
> random: <Software, Yarrow> initialized
> acpi0: <ACRSYS ACRPRDCT> on motherboard
> acpi0: Power Button (fixed)
> cpu0: <ACPI CPU> on acpi0
> cpu1: <ACPI CPU> on acpi0
> atrtc0: <AT realtime clock> port 0x70-0x77 on acpi0
> atrtc0: Warning: Couldn't map I/O.
> Event timer "RTC" frequency 32768 Hz quality 0
> hpet0: <High Precision Event Timer> iomem 0xfed00000-0xfed003ff irq 0,8 on acpi0
> Timecounter "HPET" frequency 14318180 Hz quality 950
> Event timer "HPET" frequency 14318180 Hz quality 450
> Event timer "HPET1" frequency 14318180 Hz quality 440
> Event timer "HPET2" frequency 14318180 Hz quality 440
> attimer0: <AT timer> port 0x40-0x43,0x50-0x53 on acpi0
> Timecounter "i8254" frequency 1193182 Hz quality 0
> Event timer "i8254" frequency 1193182 Hz quality 100
> Timecounter "ACPI-fast" frequency 3579545 Hz quality 900
> acpi_timer0: <24-bit timer at 3.579545MHz> port 0x408-0x40b on acpi0
> acpi_ec0: <Embedded Controller: GPE 0x17> port 0x62,0x66 on acpi0
> acpi_button0: <Power Button> on acpi0
> acpi_lid0: <Control Method Lid Switch> on acpi0
> acpi_button1: <Sleep Button> on acpi0
> battery0: <ACPI Control Method Battery> on acpi0
> acpi_acad0: <AC Adapter> on acpi0
> pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
> pci0: <ACPI PCI bus> on pcib0
> vgapci0: <VGA-compatible display> port 0x60c0-0x60c7 mem 0x58480000-0x584fffff,0x40000000-0x4fffffff,0x58500000-0x5853ffff irq 16 at device 2.0 on pci0
> agp0: <Intel 945GME SVGA controller> on vgapci0
> agp0: aperture size is 256M, detected 7932k stolen memory
> drmn0: <Intel i945GME> on vgapci0
> info: [drm] AGP at 0x40000000 256MB
> iicbus0: <Philips I2C bus> on iicbb0 addr 0xc1
> iic0: <I2C generic I/O> on iicbus0
> iic1: <I2C generic I/O> on iicbus1
> iicbus2: <Philips I2C bus> on iicbb1 addr 0x0
> iic2: <I2C generic I/O> on iicbus2
> iic3: <I2C generic I/O> on iicbus3
> iicbus4: <Philips I2C bus> on iicbb2 addr 0x0
> iic4: <I2C generic I/O> on iicbus4
> iic5: <I2C generic I/O> on iicbus5
> iicbus6: <Philips I2C bus> on iicbb3 addr 0x0
> iic6: <I2C generic I/O> on iicbus6
> iic7: <I2C generic I/O> on iicbus7
> iicbus8: <Philips I2C bus> on iicbb4 addr 0x0
> iic8: <I2C generic I/O> on iicbus8
> iic9: <I2C generic I/O> on iicbus9
> iicbus10: <Philips I2C bus> on iicbb5 addr 0x0
> iic10: <I2C generic I/O> on iicbus10
> iic11: <I2C generic I/O> on iicbus11
> iicbus12: <Philips I2C bus> on iicbb6 addr 0x0
> iic12: <I2C generic I/O> on iicbus12
> iic13: <I2C generic I/O> on iicbus13
> iicbus14: <Philips I2C bus> on iicbb7 addr 0x0
> iic14: <I2C generic I/O> on iicbus14
> iic15: <I2C generic I/O> on iicbus15
> info: [drm] Supports vblank timestamp caching Rev 1 (10.10.2010).
> info: [drm] Driver supports precise vblank timestamp query.
> info: [drm] failed to find VBIOS tables
> drmn0: taking over the fictitious range 0x40000000-0x4ffff000
> info: [drm] initialized overlay support
> fbd0 on drmn0
> VT: Replacing driver "vga" with new "fb".
> info: [drm] Initialized i915 1.6.0 20080730
> vgapci0: Boot video device
> vgapci1: <VGA-compatible display> mem 0x58400000-0x5847ffff at device 2.1 on pci0
> hdac0: <Intel 82801G HDA Controller> mem 0x58540000-0x58543fff irq 16 at device 27.0 on pci0
> pcib1: <ACPI PCI-PCI bridge> at device 28.0 on pci0
> pci1: <ACPI PCI bus> on pcib1
> pcib2: <ACPI PCI-PCI bridge> at device 28.1 on pci0
> pci2: <ACPI PCI bus> on pcib2
> re0: <RealTek 810xE PCIe 10/100baseTX> port 0x3000-0x30ff mem 0x51010000-0x51010fff,0x51000000-0x5100ffff irq 17 at device 0.0 on pci2
> re0: Using 1 MSI-X message
> re0: turning off MSI enable bit.
> re0: ASPM disabled
> re0: Chip rev. 0x24800000
> re0: MAC rev. 0x00200000
> miibus0: <MII bus> on re0
> rlphy0: <RTL8201L 10/100 media interface> PHY 1 on miibus0
> rlphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto, auto-flow
> re0: Ethernet address: 00:23:8b:03:eb:24
> pcib3: <ACPI PCI-PCI bridge> at device 28.2 on pci0
> pci3: <ACPI PCI bus> on pcib3
> ath0: <Atheros 5424/2424> mem 0x55200000-0x5520ffff irq 18 at device 0.0 on pci3
> ath0: AR2425 mac 14.2 RF5424 phy 7.0
> ath0: 2GHz radio: 0x0000; 5GHz radio: 0x00a2
> pcib4: <ACPI PCI-PCI bridge> at device 28.3 on pci0
> pcib4: failed to allocate initial I/O port window: 0x1000-0x1fff
> pci4: <ACPI PCI bus> on pcib4
> sdhci_pci0: <JMicron JMB38X SD> mem 0x54100200-0x541002ff irq 19 at device 0.2 on pci4
> sdhci_pci0: 1 slot(s) allocated
> uhci0: <Intel 82801G (ICH7) USB controller USB-A> port 0x6080-0x609f irq 16 at device 29.0 on pci0
> uhci0: LegSup = 0x2f00
> usbus0 on uhci0
> uhci1: <Intel 82801G (ICH7) USB controller USB-B> port 0x6060-0x607f irq 17 at device 29.1 on pci0
> uhci1: LegSup = 0x2f00
> usbus1 on uhci1
> uhci2: <Intel 82801G (ICH7) USB controller USB-C> port 0x6040-0x605f irq 18 at device 29.2 on pci0
> uhci2: LegSup = 0x2f00
> usbus2 on uhci2
> uhci3: <Intel 82801G (ICH7) USB controller USB-D> port 0x6020-0x603f irq 19 at device 29.3 on pci0
> uhci3: LegSup = 0x2f00
> usbus3 on uhci3
> ehci0: <Intel 82801GB/R (ICH7) USB 2.0 controller> mem 0x58544400-0x585447ff irq 16 at device 29.7 on pci0
> usbus4: EHCI version 1.0
> usbus4 on ehci0
> pcib5: <ACPI PCI-PCI bridge> at device 30.0 on pci0
> pci5: <ACPI PCI bus> on pcib5
> isab0: <PCI-ISA bridge> at device 31.0 on pci0
> isa0: <ISA bus> on isab0
> atapci0: <Intel ICH7M SATA150 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0x60a0-0x60af irq 17 at device 31.2 on pci0
> ata0: <ATA channel> at channel 0 on atapci0
> ata1: <ATA channel> at channel 1 on atapci0
> atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
> atkbd0: <AT Keyboard> irq 1 on atkbdc0
> kbd0 at atkbd0
> atkbd0: [GIANT-LOCKED]
> psm0: <PS/2 Mouse> irq 12 on atkbdc0
> psm0: [GIANT-LOCKED]
> psm0: model Generic PS/2 mouse, device ID 0
> pmtimer0 on isa0
> orm0: <ISA Option ROM> at iomem 0xcf000-0xcffff pnpid ORM0000 on isa0
> ppc0: parallel port not found.
> est0: <Enhanced SpeedStep Frequency Control> on cpu0
> est1: <Enhanced SpeedStep Frequency Control> on cpu1
> Timecounters tick every 1.000 msec
> hdacc0: <Realtek ALC268 HDA CODEC> at cad 0 on hdac0
> hdaa0: <Realtek ALC268 Audio Function Group> at nid 1 on hdacc0
> pcm0: <Realtek ALC268 (Analog 2.0+HP/2.0)> at nid 20,21 and 18 on hdaa0
> pcm1: <Realtek ALC268 (Left Analog Mic)> at nid 24 on hdaa0
> random: unblocking device.
> usbus0: 12Mbps Full Speed USB v1.0
> usbus1: 12Mbps Full Speed USB v1.0
> usbus2: 12Mbps Full Speed USB v1.0
> usbus3: 12Mbps Full Speed USB v1.0
> usbus4: 480Mbps High Speed USB v2.0
> ugen4.1: <Intel> at usbus4
> uhub0: <Intel EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus4
> ugen3.1: <Intel> at usbus3
> uhub1: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus3
> ugen2.1: <Intel> at usbus2
> uhub2: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus2
> ugen1.1: <Intel> at usbus1
> uhub3: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus1
> ugen0.1: <Intel> at usbus0
> uhub4: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus0
> uhub1: 2 ports with 2 removable, self powered
> uhub2: 2 ports with 2 removable, self powered
> uhub3: 2 ports with 2 removable, self powered
> uhub4: 2 ports with 2 removable, self powered
> ada0 at ata0 bus 0 scbus0 target 0 lun 0
> ada0: <WDC WD1600BEVT-22ZCT0 11.01A11> ATA-8 SATA 2.x device
> ada0: Serial Number WD-WXE908P42038
> ada0: 150.000MB/s transfers (SATA, UDMA5, PIO 8192bytes)
> ada0: 152627MB (312581808 512 byte sectors: 16H 63S/T 16383C)
> ada0: Previously was known as ad0
> SMP: AP CPU #1 Launched!
> WARNING: WITNESS option enabled, expect reduced performance.
> Root mount waiting for: usbus4
> Root mount waiting for: usbus4
> uhub0: 8 ports with 8 removable, self powered
> Root mount waiting for: usbus4
> ugen4.2: <SuYin> at usbus4
> Trying to mount root from ufs:/dev/ada0p2 [rw]...
> ugen4.3: <UFD 2.0> at usbus4
> umass0: <UFD 2.0 Silicon-Power32G, class 0/0, rev 2.00/1.00, addr 3> on usbus4
> umass0:  SCSI over Bulk-Only; quirks = 0x4100
> umass0:2:0: Attached to scbus2
> da0 at umass-sim0 bus 0 scbus2 target 0 lun 0
> da0: <UFD 2.0 Silicon-Power32G PMAP> Removable Direct Access SCSI-4 device 
> da0: Serial Number 12060164020E60026880FB18954
> da0: 40.000MB/s transfers
> da0: 29557MB (60532992 512 byte sectors: 255H 63S/T 3768C)
> da0: quirks=0x2<NO_6_BYTE>

> _______________________________________________
> freebsd-current_at_freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe_at_freebsd.org"

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."
Received on Sun Aug 31 2014 - 04:47:24 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:51 UTC