-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] service.libreelec.settings: crash kodi on shutdown/reboot #5645
Comments
Linked WIP fix: LibreELEC/service.libreelec.settings#245 |
I'm adding some more recent logs. Shutdown Kodi with
|
I've removed LE 10 and 11 labels. This is reported for debian buster with Python: 3.7 (and likely without our asyncio patch). IMO there is no report for LE. Feedback is always welcome and we should test the resulting dbussy fix better sooner than later in nightlies. |
Is this still an issue? |
Assuming that this is no longer a problem. If still an issue - please update and reopen the issue. |
Describe the bug
Hello, I am currently modifying the addon service.libreelec.settings to adapt it to a Kodi installation on Debian 10 in order to benefit from the good support of bluetooth via this addon without reinventing the wheel myself. This is a personal use for the moment.
I am facing a long time bug causing a crash/segfault of kodi in case of reboot or shutdown of the system initiated from the interface.
Similar problems seem to be solved in the past by several commits (non exhaustive list) and linked to the use of D-Bus:
xbmc/xbmc#17718
https://forum.kodi.tv/showthread.php?tid=343069&pid=2934136#pid2934136
This problem is exclusively due to the addon because it does not occur in its absence.
To Reproduce
The message
"## LibreELEC Addon ## STOP SERVICE DONE !"
appears in the kodi log which does not display any error.The
oe.stop_service()
method is therefore correctly executed:https://github.com/LibreELEC/service.libreelec.settings/blob/8b1efa30632dd4b5c0493cfab2cc940a927392de/service.py#L104
Steps to avoid the crash:
Since the following service stop code is trivial (end of
Monitor.run()
method) and unlikely to be involved, I decided to explicitly remove the global variables created indbus_utils.py
https://github.com/LibreELEC/service.libreelec.settings/blob/master/resources/lib/dbus_utils.py#L118-L122
Lines added at the end of:
https://github.com/LibreELEC/service.libreelec.settings/blob/8b1efa30632dd4b5c0493cfab2cc940a927392de/service.py#L78
Only del
dbus_utils.BUS
followed by a collection seems really useful.Here is the log:
The dbus connection object does not seem to be deleted correctly, even if it is explicitly requested with
del
.The
_ClientDispatchNode
object in does not indeed contain aninterfaces
attribute, but I don't know enough about the dbussy package and its ravel module to say.Besides, the documentation is sometimes minimal...
The problem seems to be due to a failure to clean the variables for a reason that I can not figure out.
I hope that this will put you on the track of a definitive resolution of the problem related to the management of dbus.
Informations
Taken from Testing LibreELEC-settings addon #4547
service.libreelec.settings-10.0-20210809.zip
Additional notes
I also found a typo in this code:
https://github.com/LibreELEC/service.libreelec.settings/blob/8b1efa30632dd4b5c0493cfab2cc940a927392de/resources/lib/dbus_utils.py#L85-L87
https://github.com/LibreELEC/service.libreelec.settings/blob/8b1efa30632dd4b5c0493cfab2cc940a927392de/resources/lib/dbus_utils.py#L49-L55
This is the worst way to cast a boolean to a string in Python, the syntax should be simply:
str(int(data))
The text was updated successfully, but these errors were encountered: