#9377: Network Stack Deadlock ----------------------------------------+---------------------------- Reporter: jackburton | Owner: axeld Type: bug | Status: new Priority: normal | Milestone: R1 Component: Network & Internet/Stack | Version: R1/Development Resolution: | Keywords: Blocked By: | Blocking: Has a Patch: 0 | Platform: All ----------------------------------------+---------------------------- Description changed by jackburton: Old description: > Yesterday I was doing some tests with the network stack, and after a > while, I experienced a deadlock. ifconfig was locked and couldn't be > killed (even with kill -9). net_server was locked, too. > I then entered KDL, and had a look at the threads involved. > There were four threads waiting on the "net_interfaces" mutexes: > ifconfig, net_server, and a couple I can't remember (but it's > reproducible, so I'll try to reproduce it and save more info). > the net_interfaces mutex was held by wpa_supplicant, which was waiting on > the mutex of the wireless interface, which in turn was held by > net_server. > So I guess we have a lock inversion somewhere. > Will add stack traces and the rest as soon as I reproduce it again. New description: Yesterday I was doing some tests with the network stack, and after a while, I experienced a deadlock. ifconfig was locked and couldn't be killed (even with kill -9). net_server was locked, too. I then entered KDL, and had a look at the threads involved. There was a deadlock between ifconfig and wpa_supplicant. The net_interfaces mutex was held by wpa_supplicant, which was waiting on the mutex of the wireless interface, which in turn was held by ifconfig. So I guess we have a lock inversion somewhere. It's reproducible here 100% of the times by doing: {{{ ifconfig /dev/net/<wireless_card> down }}} while wpa_supplicant is scanning the available networks. I have an ipro3945 wireless card. -- -- Ticket URL: <http://dev.haiku-os.org/ticket/9377#comment:2> Haiku <http://dev.haiku-os.org> Haiku - the operating system.