kodi crashes with override.conf (Nice-Level)

This forum is for discussion about general software issues.

kodi crashes with override.conf (Nice-Level)

Postby Coffeinflash » Fri Jun 10, 2022 6:58 am

Hi,

I am trying to change the Nice-Level of the kodi-process on PI3.
So I created /usr/lib/systemd/system/kodi.service.d/override.conf with follwing content:

$this->bbcode_second_pass_code('', '08:50:24 @ Fr Jun 10]root@Kleinerbaer[/usr/lib/systemd/system/kodi.service.d/]$cat /usr/lib/systemd/system/kodi.service.d/override.conf
[Service]
Nice=-15
')

Now restartting kodi.service fails with:
$this->bbcode_second_pass_code('', '[08:50:15 @ Fr Jun 10]root@Kleinerbaer[/usr/lib/systemd/system/kodi.service.d/]$systemctl status kodi
× kodi.service - Kodi standalone (GBM)
Loaded: loaded (/usr/lib/systemd/system/kodi.service; enabled; vendor preset: disabled)
Drop-In: /usr/lib/systemd/system/kodi.service.d
└─override.conf
Active: failed (Result: exit-code) since Fri 2022-06-10 08:50:19 CEST; 5s ago
Duration: 3.964s
Process: 1295 ExecStart=/usr/bin/kodi-standalone (code=exited, status=0/SUCCESS)
Process: 1364 ExecStop=/usr/bin/killall --user kodi --exact --wait kodi.bin (code=exited, status=1/FAILURE)
Main PID: 1295 (code=exited, status=0/SUCCESS)
CPU: 78ms

Jun 10 08:50:15 Kleinerbaer systemd[1]: Started Kodi standalone (GBM).
Jun 10 08:50:15 Kleinerbaer systemd[1295]: pam_systemd_home(login:account): systemd-homed is not available: Unit dbus-org.freedesktop.home1.service not found.
Jun 10 08:50:15 Kleinerbaer systemd[1295]: pam_unix(login:session): session opened for user kodi(uid=972) by (uid=0)
Jun 10 08:50:15 Kleinerbaer systemd[1295]: pam_env(login:session): deprecated reading of user environment enabled
Jun 10 08:50:19 Kleinerbaer systemd[1364]: pam_systemd_home(login:account): systemd-homed is not available: Unit dbus-org.freedesktop.home1.service not found.
Jun 10 08:50:19 Kleinerbaer systemd[1364]: pam_unix(login:session): session opened for user kodi(uid=972) by (uid=0)
Jun 10 08:50:19 Kleinerbaer systemd[1364]: pam_env(login:session): deprecated reading of user environment enabled
Jun 10 08:50:19 Kleinerbaer systemd[1]: kodi.service: Control process exited, code=exited, status=1/FAILURE
Jun 10 08:50:19 Kleinerbaer systemd[1]: kodi.service: Failed with result 'exit-code'.
')

$this->bbcode_second_pass_code('', 'Jun 10 08:50:15 Kleinerbaer systemd[1]: Started Kodi standalone (GBM).
Jun 10 08:50:15 Kleinerbaer dbus-daemon[335]: [system] Activating via systemd: service name='org.freedesktop.home1' unit='dbus-org.freedesktop.home1.service' requested by ':1.21' (
uid=0 pid=1295 comm="(andalone)")
Jun 10 08:50:15 Kleinerbaer dbus-daemon[335]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.home1.service': Unit dbus-org.freedesktop.home1.service not foun
d.
Jun 10 08:50:15 Kleinerbaer systemd[1]: Started Session 6 of User kodi.
Jun 10 08:50:16 Kleinerbaer kodi-standalone[1304]: /usr/include/c++/12.1.0/bits/stl_algo.h:3623: constexpr const _Tp& std::clamp(const _Tp&, const _Tp&, const _Tp&) [with _Tp = int
]: Assertion '!(__hi < __lo)' failed.
Jun 10 08:50:16 Kleinerbaer systemd[1]: Started Process Core Dump (PID 1308/UID 0).
Jun 10 08:50:16 Kleinerbaer systemd-coredump[1309]: Resource limits disable core dumping for process 1304 (kodi.bin).
Jun 10 08:50:16 Kleinerbaer systemd[1]: systemd-coredump@1-1308-0.service: Deactivated successfully.
Jun 10 08:50:16 Kleinerbaer kodi-standalone[1299]: /usr/bin/kodi: Zeile 181: 1304 Abgebrochen (Speicherabzug geschrieben) ${KODI_BINARY} $SAVED_ARGS
Jun 10 08:50:17 Kleinerbaer kodi-standalone[1299]: Crash report available at /var/lib/kodi/kodi_crashlog-20220610_085016.log
Jun 10 08:50:17 Kleinerbaer kodi-standalone[1324]: /usr/include/c++/12.1.0/bits/stl_algo.h:3623: constexpr const _Tp& std::clamp(const _Tp&, const _Tp&, const _Tp&) [with _Tp = int]: Assertion '!(__hi < __lo)' failed.
Jun 10 08:50:17 Kleinerbaer systemd[1]: Started Process Core Dump (PID 1329/UID 0).
Jun 10 08:50:18 Kleinerbaer systemd-coredump[1330]: Resource limits disable core dumping for process 1324 (kodi.bin).
Jun 10 08:50:18 Kleinerbaer systemd[1]: systemd-coredump@2-1329-0.service: Deactivated successfully.
Jun 10 08:50:18 Kleinerbaer kodi-standalone[1319]: /usr/bin/kodi: Zeile 181: 1324 Abgebrochen (Speicherabzug geschrieben) ${KODI_BINARY} $SAVED_ARGS
Jun 10 08:50:18 Kleinerbaer kodi-standalone[1319]: Crash report available at /var/lib/kodi/kodi_crashlog-20220610_085018.log
Jun 10 08:50:18 Kleinerbaer kodi-standalone[1346]: /usr/include/c++/12.1.0/bits/stl_algo.h:3623: constexpr const _Tp& std::clamp(const _Tp&, const _Tp&, const _Tp&) [with _Tp = int]: Assertion '!(__hi < __lo)' failed.
Jun 10 08:50:18 Kleinerbaer systemd[1]: Started Process Core Dump (PID 1353/UID 0).
Jun 10 08:50:19 Kleinerbaer systemd-coredump[1354]: Resource limits disable core dumping for process 1346 (kodi.bin).
Jun 10 08:50:19 Kleinerbaer systemd[1]: systemd-coredump@3-1353-0.service: Deactivated successfully.
Jun 10 08:50:19 Kleinerbaer kodi-standalone[1341]: /usr/bin/kodi: Zeile 181: 1346 Abgebrochen (Speicherabzug geschrieben) ${KODI_BINARY} $SAVED_ARGS
Jun 10 08:50:19 Kleinerbaer kodi-standalone[1341]: Crash report available at /var/lib/kodi/kodi_crashlog-20220610_085019.log
Jun 10 08:50:19 Kleinerbaer kodi-standalone[1295]: /usr/bin/kodi --standalone has exited in an unclean state 3 times in the last 4 seconds.
Jun 10 08:50:19 Kleinerbaer kodi-standalone[1295]: Something is probably wrong')

I did the same on my main HTPC running openSUSE x86_64 and there it works without issues.
Any ideas?

Thx in advance!
Coffeinflash
 
Posts: 7
Joined: Fri Apr 29, 2022 8:47 am

Re: kodi crashes with override.conf (Nice-Level)

Postby graysky » Sat Jun 11, 2022 12:48 pm

Works for me.

$this->bbcode_second_pass_code('', '# systemctl edit kodi')
Added the two lines:
$this->bbcode_second_pass_code('', '### Editing /etc/systemd/system/kodi.service.d/override.conf
### Anything between here and the comment below will become the new contents of the file

[Service]
Nice=-15

### Lines below this comment will be discarded
')

Reload and restart
$this->bbcode_second_pass_code('', '# systemctl daemon-reload
# systemctl restart kodi
')

$this->bbcode_second_pass_code('', '
% top -U kodi
%Cpu(s): 5.1 us, 0.3 sy, 0.0 ni, 94.5 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
MiB Mem : 3792.9 total, 3217.7 free, 213.2 used, 362.1 buff/cache
MiB Swap: 0.0 total, 0.0 free, 0.0 used. 3498.5 avail Mem

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2825 kodi 5 -15 1837580 190476 110696 R 21.5 4.9 0:24.85 kodi-gbm
2674 kodi 20 0 18864 10144 8512 S 0.0 0.3 0:00.15 systemd
2675 kodi 20 0 174576 4828 1416 S 0.0 0.1 0:00.00 (sd-pam)
2815 kodi 5 -15 7468 3460 3016 S 0.0 0.1 0:00.02 kodi-standalone
2818 kodi 5 -15 174812 4940 1416 S 0.0 0.1 0:00.00 (sd-pam)
2820 kodi 5 -15 7600 3536 2988 S 0.0 0.1 0:00.01 kodi
')
graysky
Developer
 
Posts: 1876
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: kodi crashes with override.conf (Nice-Level)

Postby Coffeinflash » Sun Jun 12, 2022 5:03 am

Tried again with "systemctl edit kodi" --> same error.
Coffeinflash
 
Posts: 7
Joined: Fri Apr 29, 2022 8:47 am

Re: kodi crashes with override.conf (Nice-Level)

Postby graysky » Sun Jun 12, 2022 10:03 am

I cannot reproduce
graysky
Developer
 
Posts: 1876
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: kodi crashes with override.conf (Nice-Level)

Postby Coffeinflash » Sun Jun 19, 2022 6:47 am

Just for the record - I did some workaround:

$this->bbcode_second_pass_code('', '[08:34:28 @ So Jun 19]mediapc@Kleinerbaer[~/]$cat /usr/local/bin/kodi_renice.sh
#! /bin/bash

sleep 120
APP="kodi.bin"
APPPID=$(pidof $APP)
NICELEVEL="-15"
echo "Setting nice level for $APP with PID $APPPID to $NICELEVEL"
renice $NICELEVEL $APPPID
if [ $? -eq 0 ]; then
echo "Setting nice level for $APP with PID $APPPID to $NICELEVEL - SUCCESS"
exit 0
else
echo "Setting nice level for $APP with PID $APPPID to $NICELEVEL - ERROR"
exit 1
fi')

$this->bbcode_second_pass_code('', '[08:46:30 @ So Jun 19]root@Kleinerbaer[/home/mediapc/]$cat /usr/lib/systemd/system/kodi-renice.service
[Unit]
Description=Setting kodi nice level
Type=oneshot
After=kodi.service

[Service]
ExecStart=/usr/local/bin/kodi_renice.sh

[Install]
WantedBy=display-manager.service')

Works fine this way.
Coffeinflash
 
Posts: 7
Joined: Fri Apr 29, 2022 8:47 am


Return to General

Who is online

Users browsing this forum: No registered users and 28 guests