Opened 14 years ago

Closed 10 years ago

Last modified 10 years ago

#7039 closed bug (fixed)

[Network stack] Panic: _mutex_lock (): double lock

Reported by: diver Owned by: axeld
Priority: normal Milestone: R1
Component: Network & Internet/Stack Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

This is hrev39980, gcc4hybrid.

Running tcpdump in the first Terminal tab and ifconfig del /dev/net/... in another one crashes network stack.
Same thing with running tcpdump and disabling interface in Network preflet.

Attachments (2)

stack_crash.png (46.2 KB ) - added by diver 14 years ago.
0001-Change-the-monitor_lock-to-be-a-recursive_lock-fixin.patch (4.0 KB ) - added by jackburton 10 years ago.

Download all attachments as: .zip

Change History (10)

by diver, 14 years ago

Attachment: stack_crash.png added

comment:1 by diver, 14 years ago

Summary: [Network stack] crashes after ifconfig del + tcpdump[Network stack] Panic: _mutex_lock (): double lock

comment:2 by diver, 11 years ago

Still here in hrev47314.

comment:3 by jackburton, 10 years ago

I'm trying under vbox but cannot reproduce. The processes in both terminals are unkillable, though. The virtual NIC is connected using "NAT".

Last edited 10 years ago by jackburton (previous) (diff)

comment:4 by diver, 10 years ago

Still crashes for me in hrev47724. NAT mode as well.

comment:5 by jackburton, 10 years ago

patch: 01

comment:6 by jackburton, 10 years ago

The problem is that notify_device_monitor acquires the monitor lock (a mutex), then indirectly calls unregister_device_monitor, which acquires the lock again. I changed the mutex_to a recursive_lock, and the problem goes away. Please someone review the patch.

comment:7 by axeld, 10 years ago

Patch looks good. The only thing that is forbidden is to remove other handlers during notify.

comment:8 by jackburton, 10 years ago

Resolution: fixed
Status: newclosed

Applied in hrev47876. Thank you Axel for the review!

Last edited 10 years ago by jackburton (previous) (diff)
Note: See TracTickets for help on using tickets.