2014-11-29, 22:54
Been trying to track down an issue where the 'new' version of the mythtv plugin has been crashing/bugging out the OpenElec beta in random weird ways when enabled. Eventually tracked it down to random errors of this kind "Unable to load /usr/lib/kodi/system/ImageLib-arm.so, reason: /usr/lib/kodi/system/ImageLib-arm.so: cannot open shared object file: Too many open files" in the logs. (Logs on request if you need them.)
OpenElec has a pretty low per-process ulimit on files of 1024 due to embeded operation, and a quick check of lsof showed:
The obvious work around was to nerf the fanart and coverart cache directories to prevent the plugin creating and accessing those files, and that appears to work. However, this looks like a pretty serious bug that'll kill embedded clients, and cause performance issues on everything else.
OpenElec has a pretty low per-process ulimit on files of 1024 due to embeded operation, and a quick check of lsof showed:
Code:
#lsof
[...]
780 /usr/lib/kodi/kodi.bin /storage/.kodi/userdata/addon_data/pvr.mythtv/cache/fanart/1012_1396734960_000
780 /usr/lib/kodi/kodi.bin /storage/.kodi/userdata/addon_data/pvr.mythtv/cache/coverart/1012_1397076960_000
780 /usr/lib/kodi/kodi.bin /storage/.kodi/userdata/addon_data/pvr.mythtv/cache/fanart/1012_1397076960_000
780 /usr/lib/kodi/kodi.bin /storage/.kodi/userdata/addon_data/pvr.mythtv/cache/coverart/1012_1410476160_000
780 /usr/lib/kodi/kodi.bin /storage/.kodi/userdata/addon_data/pvr.mythtv/cache/fanart/1012_1410476160_000
780 /usr/lib/kodi/kodi.bin /storage/.kodi/userdata/addon_data/pvr.mythtv/cache/coverart/1012_1411604760_000
780 /usr/lib/kodi/kodi.bin /storage/.kodi/userdata/addon_data/pvr.mythtv/cache/fanart/1012_1411604760_000
780 /usr/lib/kodi/kodi.bin /storage/.kodi/userdata/addon_data/pvr.mythtv/cache/coverart/1012_1412209560_000
780 /usr/lib/kodi/kodi.bin /storage/.kodi/userdata/addon_data/pvr.mythtv/cache/fanart/1012_1412209560_000
780 /usr/lib/kodi/kodi.bin /storage/.kodi/userdata/addon_data/pvr.mythtv/cache/coverart/1012_1412814960_000
780 /usr/lib/kodi/kodi.bin /storage/.kodi/userdata/addon_data/pvr.mythtv/cache/fanart/1012_1412814960_000
[...]
#lsof | wc -l
1285
The obvious work around was to nerf the fanart and coverart cache directories to prevent the plugin creating and accessing those files, and that appears to work. However, this looks like a pretty serious bug that'll kill embedded clients, and cause performance issues on everything else.