NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/51412: Syscall I/O race condition leads to deadlock and lost interrupts
>Number: 51412
>Category: kern
>Synopsis: Syscall I/O race condition leads to deadlock and lost interrupts
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Aug 12 05:40:00 +0000 2016
>Originator: Ryan Brackenbury
>Release: NetBSD-7.0.1
>Organization:
>Environment:
NetBSD 7.0.1 (GENERIC.201605221355Z) amd64
>Description:
Making simultaneous reads of kernel parameters can cause deadlock of some kernel I/O. Programs trying to read/write to the same kernel parameters after this time are blocked, and hang on I/O indefinitely - these show 'D' in the run status field in top/ps aux.
Control-C's are lost after this point, and other interrupts become unpredictable or unresponsive. If 'zombie' processes waiting on kern I/O build up, this further causes a system crash.
In my situation, having two seperate users simultaneously run `envstat` caused the kern enter this state, and to drop Control-C's. The system became entirely unresponsive and required a hard reboot.
>How-To-Repeat:
Run two copies of a program that access kernel parameters at the same time, and the will cause a deadlock. May require repeating a number of times until race occurs.
Worst Case: eg., while [ 1 ]; do sysctl hw & envstat; done
>Fix:
Sometimes running `sysctl -a` will unblock the kern I/O (after a few tries), and the system will return back to normal. This might point to some lock in the kernel being faulty, but I have not investigated further.
Home |
Main Index |
Thread Index |
Old Index