Disabling gdb

  • Hi,

    I run LibreELEC 9.2.8 on an Rpi3 and it crashes often, usually when starting playback of music or video. I'm fine with the crashes for the time being, the hardware is weak and my library is huge and it's usually a trivial OOM issue.

    My problem is that Kodi takes about half an hour to die, because of gdb, while it only takes about a minute to restart. Now a crash followed by having a fresh, snappy Kodi instance in a minute is not too bad, but a crash that leaves you with an unusable device for 30 minutes gets annoying.

    I read the script that launches Kodi and gdb is always used, even when debugging is disabled. As we all now, the partition where the script resides is read-only, so it can't be changed. I've tried overriding the gdb executable in the path with a dummy script, but it didn't seem to work.

    Now I understand the reasoning behind the gdb thing and how it helps troubleshooting, so I'm not requesting any global change, but is there any workaround that I can use to just run Kodi without gdb?

    Thanks in advance! :)

  • I suspect the problem is probably more on the end of creating the coredump. What I would try is (and don't know if this would work):

    rm -fr /storage/.cache/cores

    ln -s /dev/null /storage/.cache/cores


    If you want to influence the path variable, you can probably do that with /storage/.config/kodi.conf environment file and see if it has any effect. You just create that file, reboot, and before systemd runs the kodi.sh script it will load in that environment file.

  • Core generation is defined in /usr/lib/sysctl.d/99-coredump.conf. You can temporary disable this setting with

    Code
    sysctl -w kernel.core_pattern=/dev/null

    or override it in file /storage/.config/sysctl.d/99-coredump.conf