#7252: KDL when removing an active USB network interface ----------------------------------------+---------------------------- Reporter: phoudoin | Owner: axeld Type: bug | Status: new Priority: critical | Milestone: R1 Component: Network & Internet/Stack | Version: R1/Development Resolution: | Keywords: Blocked By: | Blocking: 9447 Has a Patch: 1 | Platform: All ----------------------------------------+---------------------------- Comment (by diver): network stack deadlock with this patch applied: {{{ kdebug> teams team id parent name 0x828bf600 1 0x00000000 kernel_team 0x828b8a00 93 0x828bf600 registrar 0x828b7e00 100 0x828bf600 debug_server 0x828b8400 101 0x828bf600 net_server 0x828b7800 102 0x828bf600 app_server 0x828b7200 119 0x828bf600 syslog_daemon 0x828b6c00 134 0x828b7800 input_server 0x828b6000 141 0x828bf600 mount_server 0x828b5a00 154 0x828bf600 Tracker 0x828ba200 155 0x828bf600 Deskbar 0x828b9c00 156 0x828bf600 media_server 0x828ba800 161 0x828bf600 notification_server 0x828be400 162 0x828bf600 power_daemon 0x828b4800 193 0x828bf600 LaunchBox 0x828b3600 205 0x828b9c00 media_addon_server 0x828b3c00 282 0x828b4800 Terminal 0x828b9600 286 0x828b3c00 bash 0x828bae00 377 0x828b4800 Terminal 0x828b1200 381 0x828bae00 bash 0x828b0c00 397 0x828b1200 ifconfig 0x828b1800 403 0x828b9600 tail kdebug> sems 397 sem id count team last name 0x85f31a10 3211 0 397 0 some BBlockCache lock 0x85f31a40 3212 0 397 0 Catalog 0x85f31a70 3213 0 397 0 some BLocker 0x85f31aa0 3214 0 397 0 some BLocker 0x85f31ad0 3215 0 397 0 token space 0x85f31b00 3216 0 397 0 BLooperList lock 0x85f31b30 3217 0 397 0 AppServerLink_sLock 0x85f31b60 3218 0 397 0 LocaleRosterData 0x85f31b90 3219 0 397 0 some BLocker kdebug> bt 397 stack trace for thread 397 "ifconfig" kernel stack: 0x85b1f000 to 0x85b23000 user stack: 0x7efee000 to 0x7ffee000 frame caller <image>:function + offset 0 85b22ac4 (+ 112) 8008b7c6 <kernel_x86> reschedule() + 0x552 1 85b22b34 (+ 80) 8008820c <kernel_x86> _mutex_lock + 0x1d0 2 85b22b84 (+ 336) 8110f6fd </boot/system/add-ons/kernel/network/stack> get_device_interface(0x85b22dd0 "loop", true) + 0x4d 3 85b22cd4 (+ 48) 8111caec </boot/system/add-ons/kernel/network/stack> user_request_get_device_interface(0x7ffedc74, ifreq&: 0x85b22dd0, net_device_interface&: 0x85b22d38) + 0x3c 4 85b22d04 (+ 288) 8111ce1b </boot/system/add-ons/kernel/network/stack> link_control(net_protocol*: 0x80bf2a40, int32: 251658240, int32: 8903, 0x7ffedc74, 0x85b22e88) + 0x22b 5 85b22e24 (+ 80) 811190fd </boot/system/add-ons/kernel/network/stack> socket_control(net_socket*: 0x82b6a000, int32: 8903, 0x7ffedc74, uint32: 0x54 (84)) + 0x141 6 85b22e74 (+ 48) 81120e7c </boot/system/add-ons/kernel/network/stack> stack_interface_ioctl(net_socket*: 0x82b6a000, uint32: 0x22c7 (8903), 0x7ffedc74, uint32: 0x54 (84)) + 0x30 7 85b22ea4 (+ 48) 800d2c7a <kernel_x86> socket_ioctl(file_descriptor*: 0x80bc7ed0, uint32: 0x22c7 (8903), 0x7ffedc74, uint32: 0x54 (84)) + 0x26 8 85b22ed4 (+ 48) 800ca4f3 <kernel_x86> fd_ioctl(false, int32: 3, uint32: 0x22c7 (8903), 0x7ffedc74, uint32: 0x54 (84)) + 0x5b 9 85b22f04 (+ 64) 800cb3d8 <kernel_x86> _user_ioctl + 0x58 10 85b22f44 (+ 100) 80122370 <kernel_x86> handle_syscall + 0xcd user iframe at 0x85b22fa8 (end = 0x85b23000) eax 0x8e ebx 0x66d128 ecx 0x7ffedc00 edx 0xffff0114 esi 0x3 edi 0x3 ebp 0x7ffedc2c esp 0x85b22fdc eip 0xffff0114 eflags 0x203216 user esp 0x7ffedc00 vector: 0x63, error code: 0x0 11 85b22fa8 (+ 0) ffff0114 <commpage> commpage_syscall + 0x04 12 7ffedc2c (+ 160) 0057db63 <libbnetapi.so> BNetworkInterface<0x7ffede90>::GetHardwareAddress(BNetworkAddress&: 0x7ffede08) + 0x67 13 7ffedccc (+ 512) 002037ba <_APP_> list_interface(0x7ffedf10 "loop") + 0x92 14 7ffedecc (+ 128) 00203fae <_APP_> list_interfaces(0x0 "<NULL>") + 0x62 15 7ffedf4c (+ 48) 002052e9 <_APP_> main + 0x1d5 16 7ffedf7c (+ 48) 00202507 <_APP_> _start + 0x5b 17 7ffedfac (+ 48) 0010626e </boot/system/runtime_loader@0x00100000> <unknown> + 0x626e 18 7ffedfdc (+ 0) 7ffedfec 9858:ifconfig_397_stack@0x7efea000 + 0x1003fec kdebug> }}} -- Ticket URL: <http://dev.haiku-os.org/ticket/7252#comment:11> Haiku <http://dev.haiku-os.org> Haiku - the operating system.