Sporadic crash when during on my TV/Receiver due to double close() on the same fd in ActiveAE #16258
Closed
1 of 7 tasks
Labels
Triage: Needed
(managed by bot!) issue that was just created and needs someone looking at it
Bug report
Describe the bug
Here is a clear and concise description of what the problem is:
Kodi crashes sporadically when I turn on my TV and receiver since I upgraded to Ubuntu 19.04. There is a double close somewhere on the ActiveAE thread which is racing against the PeripBusUSBUdev. libudev has an assert when close returns EBADF. When I turn the TV on, it triggers udev_enumerate_scan_devices. This has been difficult to debug due to the sporadic nature of the race condition. I've straced kodi-x11 with close() calls, but if I add openat to the list, it disturbs the timing enough that I haven't been able to reproduce with that strace attached. It happens at least 50% of the time turning my TV on with no strace attached.
Expected Behavior
Here is a clear and concise description of what was expected to happen:
Kodi should not crash sporadically when turning on my TV.
Actual Behavior
Kodi crashes sporadically when turning on my TV.
Possible Fix
To Reproduce
Steps to reproduce the behavior:
Debuglog
The debuglog can be found here:
(Debugging is not on for this log because it disturbs the timing enough to mess with the race condition, and makes it hard to reproduce):
kodi_crashlog-20190609_171212.log
Stack strace from the core dump, it asserts inside libudev due to the double close on the other thread:
kodistacktrace3.log
List of thread names for the tids:
kodithreadlist3.txt
Tail of the an strace showing the double close on the ActiveAE thread:
kodistracetail.log
Screenshots
Here are some links or screenshots to help explain the problem:
Additional context or screenshots (if appropriate)
Here is some additional context or explanation that might help:
Your Environment
Used Operating system:
Android
iOS
Linux
OSX
Raspberry-Pi
Windows
Windows UWP
Operating system version/name: Ubuntu 19.04
Kodi version: 18.2
note: Once the issue is made we require you to update it with new information or Kodi versions should that be required.
Team Kodi will consider your problem report however, we will not make any promises the problem will be solved.
The text was updated successfully, but these errors were encountered: