v19 Memory leak & SIGTRAP with paused playback of H.264 content
#1
Hi,

kodi crashes when x264 playback was kept too long in paused state.
Starting from a memory usage of ~660m (VSZ value displayed by top)
kodi adds around 1m/sec to around 1900m when it crashes.
To create the logs I used sample nr. 6 from the Kodi wiki:
https://kodi.wiki/view/Samples#Codecs.2C..._Subtitles

Using sample nr. 11 (mpeg2) the memory usage does not increase.
I saw these crashes with locally stored H.264  files and H.264 streams,
but not with other codecs.
Hitting play again to end the paused-state does not release the increased
memory usage. Each pause state adds more memory being used by kodi
so the crash can only be prevented by not using pause at all.
Please note that this crash is not caused by oom, the system has
16gb ram with more than 10gb free.

kodi debug log (shortened in-between by removing duplicate
CDRMAtomicRequest::LogAtomicRequest entries):
https://gist.github.com/bkuhls/b293532e6...c905cf6322

gdb backtrace: https://gist.github.com/bkuhls/45a5a9915...26f2494856

syslog:
Quote:traps: kodi.bin[1485] trap int3 ip:7fa7545c57d6 sp:7fff943e3880 error:0 in i965_dri.so[7fa75447b000+1363000]
Kodi 19.5-Matrix/OpenGLES/gbm (+ PR19558 ) - Linux kernel 5.14.21 x86_64 - ffmpeg 4.4-git (+ patch )
Mesa 22.3.7 with iris driver - VA-API version 1.16.0 + Intel iHD driver version 22.6.3 - libdrm 2.4.116 - libcec 6.0.2
Intel i9-11900T - ASRock Z590 Extreme - BIOS version 2.20
Reply
#2
PS: The sigtraps occur with mesa3d versions 20.3.5, 21.0.2 & 21.1.0-rc1.
Kodi 19.5-Matrix/OpenGLES/gbm (+ PR19558 ) - Linux kernel 5.14.21 x86_64 - ffmpeg 4.4-git (+ patch )
Mesa 22.3.7 with iris driver - VA-API version 1.16.0 + Intel iHD driver version 22.6.3 - libdrm 2.4.116 - libcec 6.0.2
Intel i9-11900T - ASRock Z590 Extreme - BIOS version 2.20
Reply
#3
While I didn't crash as hard as you appear to have, the long pause you noted seemed very similar to my case.  So I thought I would offer this suggestion in case it helps.

I recently discovered a playback issue if I left the media on pause for too long, something I normally don't do.  Kodi became very slow to respond, but if I hit stop and waited it would eventually get me back to Kodi gui.  But it would never play any other file over the network until I restarted.  But it appeared I still had a valid network connection.

I'm running Kodi via Libreelec 9.2.6 on my NUC8i3 over wifi.

I turned off ASPM in the BIOS and it resolved my issue.

Good luck.
HP Stream Mini w/Libreelec -> HDMI -> Toshiba 37"
Intel NUC8i3BEH w/Libreelec -> HDMI -> LG OLED55C3PUA -> S/PDIF -> Sony HT-CT80
Dell Optiplex 7050 Micro w/Libreelec -> HDMI -> Yamaha RX-V467 -> HDMI -> Toshiba 47L7200U
Reply
#4
(2021-04-21, 04:51)Jogee Wrote: But it would never play any other file over the network until I restarted.  But it appeared I still had a valid network connection.
Thanks for the hint but I think you are seeing a different problem, my files are stored on the local hdd of the Kodi machine.
Kodi 19.5-Matrix/OpenGLES/gbm (+ PR19558 ) - Linux kernel 5.14.21 x86_64 - ffmpeg 4.4-git (+ patch )
Mesa 22.3.7 with iris driver - VA-API version 1.16.0 + Intel iHD driver version 22.6.3 - libdrm 2.4.116 - libcec 6.0.2
Intel i9-11900T - ASRock Z590 Extreme - BIOS version 2.20
Reply
#5
The bug can be reproduced here with gbm/opengles but not with x11/opengl.
Kodi 19.5-Matrix/OpenGLES/gbm (+ PR19558 ) - Linux kernel 5.14.21 x86_64 - ffmpeg 4.4-git (+ patch )
Mesa 22.3.7 with iris driver - VA-API version 1.16.0 + Intel iHD driver version 22.6.3 - libdrm 2.4.116 - libcec 6.0.2
Intel i9-11900T - ASRock Z590 Extreme - BIOS version 2.20
Reply

Logout Mark Read Team Forum Stats Members Help
Memory leak & SIGTRAP with paused playback of H.264 content0