Re: "cat /proc/lockdep" after "rmmod <some module>" when !debug_locks will crash the system

From: Bart Van Assche
Date: Tue Mar 26 2019 - 13:44:22 EST


On Tue, 2019-03-26 at 08:35 +-0800, shenghui wrote:
+AD4 My test steps:
+AD4 --------------
+AD4 1) bootup the system, and check the calltrace in dmesg. Just warning and ignore it.
+AD4 2) cat /proc/lockdep +ACM everything is well
+AD4 3) rmmod some module which provides lock+AF8-class in lockdep
+AD4 In my system, module bcache is used: ('grep bcache /proc/lockdep' prints something)
+AD4 +ACo stop bcache set
+AD4 +ACo rmmod bcache
+AD4 I have tried other module, e.g: rmmod iwldvm
+AD4 4) cat /proc/lockdep +ACM system crash

Hi shenghui,

Thank you for having shared your test steps. I ran a slightly different test
myself:

while true+ADs do cat /proc/lockdep +AD4-/dev/null+ADs done +ACY
(cd blktests +ACYAJg while ./check -q+ADs do :+ADs done)

This test reads /proc/lockdep in a loop while running a test that stresses
lockdep and also that loads and unloads kernel modules. Since this test
passed on my setup I suggest that you have a close look at your setup. The
vboxdrv kernel driver or an out-of-tree patch may be what is making your
system unstable.

Bart.