Crash after scrolling many (larger) pictures

  • Now I'm starting to think there are too many Samba errors, and at the end they result in a segmentation fault:

    Code
    2022-07-02 17:44:30.397 T:741      INFO <general>: SMBFile->Open: Unable to open file : 'smb://10.117.1.10/bilder'
                                                       unix_err:'15' error : 'Is a directory'
    ...
    Jul 02 17:48:02.525513 LibreELEC kodi.sh[665]: ExifParse - Nonfatal Error : Illegal exif or interop ofset directory link 0 0
    ...
    Jul 02 17:48:02.525513 LibreELEC kodi.sh[661]: Segmentation fault (core dumped)

    HiassofT Do you think the same way?

    Bedford Can you switch from Samba to NFS for your NAS?

  • I don't see any SMB errors in the log (failing to open a directory is usually caused by wrong permissions on the SMB server).

    The crash happens in the video driver and I suspect this is caused by the previous CMA ("graphics memory") exhaustion - probably kodi got a NULL texture back, didn't check for that and later tried to display it (or something similar to that).

    Unfortunately finding out the exact cause will be very tricky as building kodi with debug symbols is no longer possible (that needs way too much memory to be usable on RPi3). Also not sure why the CMA memory exhaustion occurred - either kodi tried to allocated too many textures etc or there's a memory leak somewhere...

    Bedford please try increasing CMA to 512MB and if you get a crash with that, too, please post another crashlog.

    so long,

    Hias

  • Hi,

    do you need the debug output in the crash log? I seems I'm getting to the sizelimit of pastecrash - no URL is created, although with 'pastecrash -c' I see the whole log (around 1.6M). ('echo Hello world. | curl -F 'f:1=<-' ix.io' works too)

    Regards,

    Oliver

  • Full log with debug info would be nice. You could save it to a file "pastecrash -c > my.crash.log" and upload it somewhere (google drive, dropbox etc).

    If it's too much hassle then non-debug log is OK, too.

    so long,

    Hias

  • With cma-512 the issue is gone (almost). I succeeded in crashing Kodi once, but failed to reproduce it (scrolling pictures, album covers, artist images).

    Da Flex: changing to NFS didn't make a difference.

    I'll change my standard installation to cma-512, too and will report if the situation has resolved.

    Regards,

    Oliver

  • Thanks for the NFS test. I think my first theory was right, and a new buffering algorithm is needed in Kodi. Not our turf.

    PS: More practical approach: Reduce the X/Y resolution of the pictures for a smaller memory footprint.

  • I finally had a time to look at it:

    Kodi seems to consume an insanely amount of (graphics) memory when browsing pictures, especially in wall mode with 4x3 thumbnails on screen.

    RPi4 showed about 1GB memory usage and RPi3B+ with 256MB CMA quickly crashed because it ran out of memory.

    I'm not exactly sure why kodi is doing that, maximum texture size on RPi0-3 is 2048x2048 (i.e. roughly 8MB at full HD, max 16MB for 2048x2048 at 32bit) and it looks a bit like it may be not loading the scaled-down thumbnails but allocating full textures for every picture.

    Anyways, bumping CMA to 512MB looks like a good workaround for now until this is solved in kodi.

    Another workaround would be to use list mode in pictures, that only shows one single picture and seems to use a lot less memory (check CmaFree in /proc/meminfo on RPi2/3 - on RPi4 graphics memory is allocated from heap so check with top there).

    so long,

    Hias

  • Hello everybody!

    Hope I'm right here....

    I have an RPi 4 4GB RAM und the same behaviour/issue opening several smb-directories (not files!) on a NAS

    Code
    INFO <general>: SMBFile->Open: Unable to open file : 'smb://XXX.XXX.XXX.XXX/Folder_XY'                                                   unix_err:'15' error : 'Is a directory'

    and starting filmclips (mp4/m4v), crashing my LE10.0.2 (I changed to finally from LE9.X.X :) ) afterwards, when I stop them and start to watch a new one (unusually also having this caching circles for a long time - I'd tried several mem/cache/buffer settings in the advancedsettings.xml - no significant changes). Interesting fact I observed today the first time: Leaving Kodi untouched for serveral minutes (what I didn't before examening this problem), the log shows up with "Samba is idle. Closing the remaining connections" -> Et voilá, no more problems (at least I started serveral clips without any problems). Could this behaviour be associated with this (smb-?)problem - or is this something totally different and shows up only the same error-message?

    Thanks a lot!

    Ralf

  • Sorry, I wasn't watching this thread anymore.

    I'm currently using LE on a RPi 400 - no more issues regarding crashes due to low memory, picture cache overflow, SMB errors etc. So I think your problem is unrelated.

    I occasionally get the a.m. error message - which in my case is correct, the file Kodi tries to open is a directory in reality (and contains the backup of a DVD).

    Regards,

    Oliver