[haiku-bugs] [Haiku] #14460: Failure to load XHCI results in kernel panic

  • From: "Haiku" <trac@xxxxxxxxxxxx>
  • To: undisclosed-recipients: ;
  • Date: Fri, 07 Sep 2018 20:27:12 -0000

#14460: Failure to load XHCI results in kernel panic
---------------------------+------------------------------
 Reporter:  kallisti5      |        Owner:  nobody
     Type:  bug            |       Status:  new
 Priority:  low            |    Milestone:  Unscheduled
Component:  System/Kernel  |      Version:  R1/Development
 Keywords:  bus_managers   |   Blocked By:
 Blocking:                 |  Has a Patch:  0
 Platform:  All            |
---------------------------+------------------------------
 {{{
 usb xhci: no devices found
 PANIC: ref count of B_KEEP_LOADED module bus_managers/pci/v1 dropped to 0!
 Welcome to Kernel Debugging Land...
 Thread 161 "net_server" running on CPU 0
 stack trace for thread 161 "net_server"
     kernel stack: 0xffffffff81e8a000 to 0xffffffff81e8f000
       user stack: 0x00007fc4a48ae000 to 0x00007fc4a58ae000
 frame                       caller             <image>:function + offset
  0 ffffffff81e8e6f8 (+  24) ffffffff8014be1c   <kernel_x86_64>
 arch_debug_call_with_fault_handler + 0x16
  1 ffffffff81e8e710 (+  80) ffffffff800acfc8   <kernel_x86_64>
 debug_call_with_fault_handler + 0x68
  2 ffffffff81e8e760 (+  96) ffffffff800ae971   <kernel_x86_64>
 kernel_debugger_loop(char const*, char const*, __va_list_tag*, int) + 0xf1
  3 ffffffff81e8e7c0 (+  80) ffffffff800aec7e   <kernel_x86_64>
 kernel_debugger_internal(char const*, char const*, __va_list_tag*, int) +
 0x6e
  4 ffffffff81e8e810 (+ 256) ffffffff800aefe2   <kernel_x86_64> panic +
 0xb2
  5 ffffffff81e8e910 (+  48) ffffffff80066db6   <kernel_x86_64> put_module
 + 0x1e6
  6 ffffffff81e8e940 (+  80) ffffffff85caab45   </boot/system/add-
 ons/kernel/busses/usb/xhci> XHCI::AddTo(Stack*) + 0x225
  7 ffffffff81e8e990 (+ 112) ffffffff85d41923   </boot/system/add-
 ons/kernel/bus_managers/usb> Stack::Stack() + 0x163
  8 ffffffff81e8ea00 (+  48) ffffffff85d40baa   </boot/system/add-
 ons/kernel/bus_managers/usb> bus_std_ops(int, ...) + 0xba
  9 ffffffff81e8ea30 (+ 176) ffffffff800673a3   <kernel_x86_64> get_module
 + 0x563
 10 ffffffff81e8eae0 (+  48) ffffffff85ce7003   </boot/system/add-
 ons/kernel/drivers/dev/net/pegasus> init_driver + 0x23
 11 ffffffff81e8eb10 (+  80) ffffffff800d25cf   <kernel_x86_64>
 load_driver(_GLOBAL__N_1::legacy_driver*, legacy_driver, ???) + 0x18f
 12 ffffffff81e8eb60 (+ 224) ffffffff800d2ab6   <kernel_x86_64>
 add_driver(char const*, int) + 0x266
 13 ffffffff81e8ec40 (+ 368) ffffffff800d3ed9   <kernel_x86_64>
 legacy_driver_probe + 0x719
 14 ffffffff81e8edb0 (+  96) ffffffff800cdebc   <kernel_x86_64>
 scan_for_drivers_if_needed(_GLOBAL__N_1::devfs_vnode*, devfs_vnode, ???) +
 0x12c
 15 ffffffff81e8ee10 (+  80) ffffffff800cdf32   <kernel_x86_64>
 devfs_open_dir(fs_volume*, fs_vnode*, void**) + 0x52
 16 ffffffff81e8ee60 (+  64) ffffffff800fcb18   <kernel_x86_64>
 open_dir_vnode(vnode*, bool) + 0x38
 17 ffffffff81e8eea0 (+  48) ffffffff801037bb   <kernel_x86_64>
 dir_open(int, char*, bool) + 0x4b
 18 ffffffff81e8eed0 (+  80) ffffffff8010a4aa   <kernel_x86_64>
 _user_open_dir + 0xba
 19 ffffffff81e8ef20 (+  16) ffffffff8014d7c8   <kernel_x86_64>
 x86_64_syscall_entry + 0xfb
 user iframe at 0xffffffff81e8ef30 (end = 0xffffffff81e8eff8)
  rax 0x6d                  rbx 0x0                   rcx 0x1daea2493f4
  rdx 0x0                   rsi 0x10b3d9a97a9         rdi 0xffffffff
  rbp 0x7fc4a58aca00         r8 0x1d                   r9 0xc
  r10 0x1daea2493d4         r11 0x3246                r12 0x7fc4a58acac0
  r13 0x10b3d9a97a9         r14 0x7fc4a58acdc0        r15 0x0
  rip 0x1daea2493f4         rsp 0x7fc4a58ac9c8     rflags 0x3246
  vector: 0x63, error code: 0x0
 20 ffffffff81e8ef30 (+140484683094736) 000001daea2493f4   <libroot.so>
 _kern_open_dir + 0x0c
 21 00007fc4a58aca00 (+  48) 000000a2285a776e   <libbe.so>
 BDirectory::BDirectory(char const*) + 0x4e
 22 00007fc4a58aca30 (+ 672) 0000010b3d9a39b4   <_APP_>
 NetServer::_ConfigureDevices(char const*, BMessage*) + 0x34
 23 00007fc4a58accd0 (+ 512) 0000010b3d9a3ce3   <_APP_>
 NetServer::_BringUpInterfaces() + 0x193
 24 00007fc4a58aced0 (+  64) 0000010b3d9a3db1   <_APP_>
 NetServer::ReadyToRun() + 0x41
 25 00007fc4a58acf10 (+ 592) 000000a2284ae92c   <libbe.so>
 BApplication::DispatchMessage(BMessage*, BHandler*) + 0x41c
 26 00007fc4a58ad160 (+  80) 000000a2284b61a4   <libbe.so>
 BLooper::task_looper() + 0x284
 27 00007fc4a58ad1b0 (+  32) 000000a2284ab647   <libbe.so>
 BApplication::Run() + 0x47
 28 00007fc4a58ad1d0 (+ 848) 0000010b3d9a099f   <_APP_> main + 0x7f
 29 00007fc4a58ad520 (+  48) 0000010b3d9a0ae1   <_APP_> _start + 0x51
 30 00007fc4a58ad550 (+  48) 00000195a8b90fd2
 </boot/system/runtime_loader@0x00000195a8b7d000> <unknown> + 0x13fd2
 31 00007fc4a58ad580 (+   0) 00007f1fc0685260   <commpage>
 commpage_thread_exit + 0x00
 }}}

 Failure to load the XHCI busses (in Start()) results in a kernel panic.

 The panic is a bit odd, since a bus not loading shouldn't (in theory)
 result in a kernel panic.  Thoughts?


 To reproduce, just return B_ERROR; at the top of Start() in src/add-
 ons/kernel/busses/usb/xhci.cpp

-- 
Ticket URL: <https://dev.haiku-os.org/ticket/14460>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: