During aggressive open/close scenario when active message reads/writes are happening, a rare race-condition found to lock up the driver causing a crash.
Rare race condition found in void* rx_loop (void* arg) impacting cleaning up blocked clients during file close.
To Reproduce
After running 'ctest' repeated, the issue is replicated:
Further attempt to stop with 'kill -s SIGKILL ' shows:
Killed
When in stuck state, and we test using candump and cansend as follows, the result is a core dump when cansend is run.
candump -u0,rx0
/dev/can0/rx0 TS: 162329081ms [EFF] 1234 [2] AB CD 00 00 00 00 00 00
devctl CAN_DEVCTL_RX_FRAME_RAW_BLOCK: No such process
cansend -u0,tx0 -m0x1234,1,0xABCD
Then driver prints the following logs during this stuck state test:
Describe the bug
During aggressive open/close scenario when active message reads/writes are happening, a rare race-condition found to lock up the driver causing a crash.
Rare race condition found in
void* rx_loop (void* arg)
impacting cleaning up blocked clients during file close.To Reproduce
After running 'ctest' repeated, the issue is replicated:
Top shows CPU runaway:
Checking pidin we see tests/driver/raw/driver-raw-tests is still running:
Log of driver 'dev-can-linux -Ex -vvv' shows:
After CTRL-C shows:
Further attempt to stop with 'kill -s SIGKILL' shows:
When in stuck state, and we test using candump and cansend as follows, the result is a core dump when cansend is run.
Then driver prints the following logs during this stuck state test:
Expected behavior
Should close file without incident.
Screenshots
NA
Platform (please complete the following information)
Driver (please complete the following information)
Additional context
NA