Status of PCIe Hotplug?
Jan Henrik Sylvester
me at janh.de
Wed Sep 28 09:36:40 UTC 2016
On 09/28/2016 10:32, Hans Petter Selasky wrote:
> Can you compile your kernel with debugging enabled so that we get the
> sourcelines in the dump below. Also please include some parts of the
The kernel is from the yet-to-be-released 11.0-RELEASE installed by
freebsd-update. Now I have extracted kernel-dbg.txz, base-dbg.txz, and
lib32-dbg.txz from the 11.0-RELEAESE distribution, but the backtrace
still looks similar. Do have have to do anything else to use the debug
symbols or do I really have to compile a new kernel?
The panic I got now is different though:
fault code = supervisor read data, page not present
instruction pointer = 0x20:0xffffffff80b252e7
stack pointer = 0x28:0xfffffe022f04ba10
frame pointer = 0x28:0xfffffe022f04ba50
code segment = base 0x0, limit 0xfffff, type 0x1b
= DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags = interrupt enabled, resume, IOPL = 0
current process = 14 (usbus2)
trap number = 12
panic: page fault
cpuid = 3
And the backtrace has something else for #4 to #6 from below:
#4 0xffffffff80fa0f23 at trap_pfault+0x1e3
#5 0xffffffff80fa04cc at trap+0x26c
#6 0xffffffff80f84141 at calltrap+0x8
#7 0xffffffff80b14a80 at device_dekete_child+0x120
#8 0xffffffff808f2fe4 at usb_detach_device+0x174
> preceeding dmesg.
pci7: <ACPI PCI bus> on pcib5
xhci0: <XHCI (generic) USB 3.0 controller> mem 0xf0000000-0xf0001fff at
device 0.0 on pci7
xhci0: 64 bytes context size, 64-bit DMA
xhci0: Unable to map MSI-X table
usbus2 on xhci0
usbus2: 5.0Gbps Super Speed USB v3.0
ugen2.1: <0x1912> at usbus2
uhub4: <0x1912 XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus2
uhub4: 4 ports with 4 removable, self powered
> Do you have USB compiled into the kernel or loaded as a module?
It is the GENERIC 11.0-RELEASE kernel, it has uhci, ohci, ehci, xhci,
and usb compiled in (with USB_DEBUG).
> What does kldstat output after you plug the card?
Plugging the card in does not change kldstat:
Id Refs Address Size Name
1 62 0xffffffff80200000 1fa7c38 kernel
2 1 0xffffffff821a9000 237b8 geom_journal.ko
3 2 0xffffffff821cd000 9b748 linux.ko
4 3 0xffffffff82269000 de28 linux_common.ko
5 1 0xffffffff82277000 8780 acpi_video.ko
6 1 0xffffffff82280000 b570 sem.ko
7 1 0xffffffff8228c000 7d868 vboxdrv.ko
8 1 0xffffffff8230a000 b3e8 aesni.ko
9 1 0xffffffff82316000 e137c0 nvidia.ko
10 1 0xffffffff8312a000 8080 acpi_ibm.ko
11 1 0xffffffff83221000 10582 geom_eli.ko
12 1 0xffffffff83232000 3710 ums.ko
13 1 0xffffffff83236000 2a05 uhid.ko
14 1 0xffffffff83239000 677b u3g.ko
15 1 0xffffffff83240000 53df ucom.ko
16 1 0xffffffff83246000 4fac ng_ubt.ko
17 5 0xffffffff8324b000 befc netgraph.ko
18 1 0xffffffff83257000 a58f ng_hci.ko
19 3 0xffffffff83262000 107c ng_bluetooth.ko
20 1 0xffffffff83264000 d57d ng_l2cap.ko
21 1 0xffffffff83272000 1b187 ng_btsocket.ko
22 1 0xffffffff8328e000 393d ng_socket.ko
23 1 0xffffffff83292000 389f4 linux64.ko
> What is the dmesg leading up to this?
See above.
dmesg after devctl detach xhci0 (to avoid the panic):
ugen2.1: <0x1912> at usbus2 (disconnected)
unknown: at usbus2, port 1, addr 1 (disconnected)
usbus2: detached
xhci0: detached
And after the successful removal:
pci7: detached
kldstat does not change at any time.
Cheers,
Jan Henrik
> The bug looks like some .ko was unloaded too early, due to refcounts
> dropping incorrectly.
>
> --HPS
>
>>
>>
>> Fatal trap 9: general protection fault while in kernel mode
>> cpuid = 1; acpic id = 01
>> instruction pointer = 0x20:0xffffffff80b1549c
>> stack pointer = 0x28:0xfffffe022f62ca00
>> frame pointer = 0x28:0xfffffe022f62ca70
>> code segment = base 0x0, limit 0xfffff, type 0x1b
>> = DPL 0, pres 1, long 1, def32 0, gran 1
>> processor eflags = interrupt enabled, resume, IOPL = 0
>> current process = 14 (usbus1)
>> trap number = 9
>> panic: general protection fault
>> cpuid = 1
>> KDB: stack backtrace:
>> #0 0xffffffff80b24077 at kdb_backtrace+0x67
>> #1 0xffffffff80ad93e2 at vpanic+0x182
>> #2 0xffffffff80ad9253 at panic+0x43
>> #3 0xffffffff80fa0d31 at trap_fatal+0x351
>> #4 0xffffffff80fa09c8 at trap+0x768
>> #5 0xffffffff80f84141 at calltrap+0x8
>> #6 0xffffffff808f2f63 at usb_detach_device+0xf3
>> #7 0xffffffff808f1d5b at usb_unconfigure+0x2b
>> #8 0xffffffff808f5623 at usb_free_device+0x103
>> #9 0xffffffff808f58b1 at usb_bus_detach+0x161
>> #10 0xffffffff80903e95 at usb_process+0x125
>> #11 0xffffffff80a90055 at fork_exit+0x85
>> #12 0xffffffff80f8467e at fork_trampoline+0xe
>> Uptime: 18m27s
>> Automatic reboot in 15 seconds - press a key on the console to abort
More information about the freebsd-usb
mailing list