Vero 4K+ - Kodi 19.1 - Kodi exited with return code 137

I’ve followed this How To thread :
Mounting network shares with autofs (alternative to fstab) - Wiki / General - OSMC Forums

So I have these packages installed :

osmc@Shiriu:~$ apt list autofs                                                  
Listing... Done                                                                 
autofs/oldstable 5.1.2-4 arm64                                                  
autofs/oldstable,now 5.1.2-4 armhf [installed]                                  

As mentionned, I’ve edited the file sudo nano /etc/auto.master and added :

 /- /etc/auto.nfs.shares --timeout 15 browse

so it look like :

#       options are explicitly given.                                           
#                                                                               
#/net   -hosts                                                                  
#                                                                               
# Include /etc/auto.master.d/*.autofs                                           
# The included files must conform to the format of this file.                   
#                                                                               
+dir:/etc/auto.master.d                                                         
#                                                                               
# Include central master map if it can be found using                           
# nsswitch sources.                                                             
#                                                                               
# Note that if there are entries for /net or /misc (as                          
# above) in the included master map any keys that are the                       
# same will not be seen as the first read key seen takes                        
# precedence.                                                                   
#                                                                               
+auto.master                                                                    
/- /etc/auto.nfs.shares --timeout 15 browse                                     

I’ve then edited the file /etc/auto.nfs.shares to only add one line :

/mnt/Videos 192.168.1.250:/volume1/Videos 

Then I’ve restarted autofs with :

sudo systemctl restart autofs

I was then able to browse the mounted files with :

ls -lh /mnt/Videos

Nothing special here.

When I used the fstab mount, I would add this line to the /etc/fstab file :

192.168.1.250:/volume1/Videos /mnt/Videos        nfs     noauto,x-systemd.automount  0  0

How big is your movie/tv show collection? (Number of movies, etc. not file size)

I have 3 Library :

  1. Movie : +/- 550 Movies
  2. Series : +/- 16 Series with multiple Seasons
  3. Animes : This one is not scanned (I’ve set the content type to None) - +/- 53 Titles with multiple season depending on the show

It used to work just fine while using fstab and more items than that as I cleaned up many movies some months ago.

mmmhh, in the logs there are tons of entries like

2021-08-17 09:42:56.127 T:3463  WARNING <general>: Attempt to use invalid handle 106

from the a Python engine thread just started before.

The errors start 25 seconds after start of the videoscanner … but unclear to me why

2021-08-17 09:33:33.901 T:2681     INFO <general>: VideoInfoScanner: Starting scan ..
2021-08-17 09:33:35.008 T:2868     INFO <general>: initializing python engine.
2021-08-17 09:33:37.352 T:2868     INFO <general>: CPythonInvoker(7, /home/osmc/.kodi/addons/metadata.tvshows.themoviedb.org.python/main.py): script successfully run
2021-08-17 09:33:37.355 T:2869     INFO <general>: initializing python engine.
2021-08-17 09:33:37.599 T:2868     INFO <general>: Python interpreter stopped
2021-08-17 09:33:42.786 T:2687     INFO <general>: CDVDVideoCodecFFmpeg::Open() Using codec: HEVC (High Efficiency Video Coding)
2021-08-17 09:33:51.896 T:2687     INFO <general>: Skipped 1 duplicate messages..
2021-08-17 09:33:51.896 T:2687     INFO <general>: CDVDVideoCodecFFmpeg::Open() Using codec: MPEG-4 part 2
2021-08-17 09:33:53.139 T:2687     INFO <general>: CDVDVideoCodecFFmpeg::Open() Using codec: RealVideo 4.0
2021-08-17 09:33:55.575 T:2687     INFO <general>: CDVDVideoCodecFFmpeg::Open() Using codec: H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
2021-08-17 09:33:56.152 T:2869  WARNING <general>: Attempt to use invalid handle 2

Hmm, this is just strange then. I have:

Library Statistics:
            Albums: 4689
           Artists: 5454
             Songs: 57827
            Movies: 1308
           Tvshows: 437
          Episodes: 20800
       Musicvideos: 732

and have no issues at all scanning/browsing.

Maybe try just adding movies. If that works, then try adding TV shows. If adding Movies fails, try just adding TV shows. I’m wondering if there is something odd in a filename causing this.

I doubt that it is a naming issue in a file name as it used to work just fine with this Library and that the file in question would be reflected in the log somehow.

For the Movie Library, I use the new TMDB Python plugging, even if it is 10 times slower than the regular TBDB plugin, it match the movies better.
For the TV shows tho, I feel like the TMDB TV Shows Python plugin struggle to mark the seasons correctly.
I had to scan the library 5 time to have all the seasons indexed.
So I set the old TMBD TV Shows pluggin, which is also faster.

Not sure if it helps.

I keep trying some stuff here …
I’ve added this line to the fstab file to force nfs version 4 :

192.168.1.250:/volume1/Videos /mnt/Videos        nfs     nfsvers=4,noauto,x-systemd.automount  0  0

Added only the movie library, started scanning, browsed a bit into the Library, and again memory goes superfast to 70%, then the GUI crash to a sad face and restart.

Does anyone have any idea on what I could test ?
Or does anyone have any idae on how to solve the buffering issues when using the nfs share ?
That would be great !

Thanks !

Did you try as I suggested and only setup movies as a source and scan that? And if that fails remove that source, add TV as the only source and scan that?

I wouldn’t do this since the mount always tries to negotiate the greatest protocol version the NAS supports; I always use defaults,x-systemd.automount,noauto as only options for my nfs entries in /etc/fstab. But I don’t imagine this make the difference for your problem.

Indeed, here was just for testing purpose :slight_smile:

Normally, I use this :

192.168.1.250:/volume1/Videos /mnt/Videos        nfs     noauto,x-systemd.automount  0  0

The Movie Library alone will make this happen.
I haven’t tried yet with only the TV Shows, I’ll test that tonight.

Just for info, Movies & TV Shows are subfolders in the /mnt/Videos Share

And you reconfigured your sources within the mediacenter to just use the native local file system or do you still use the path substitution to map the old nfs:/... paths to /mnt/...?

I tested both, Path Substitution and setting the Library path to /mnt/Videos, the behavior is the same.

Since upgrading to the latest version, I was also seeing unstability/OutOfMemory issues.

While using the only extra add-on installed (trakt.tv), noticed that kswapd was running ~100% CPU despite ~500M RAM free. So reduced vm.swappiness to 5 (from 10) and added a 3G swapfile.

Now everything running well. The swapfile isn’t really used except some bytes, so it was the reduction of swappiness that helped in my case.

So,
I’ve tested with setting fstab and adding the TV Shows only as /mnt/Videos/Series, and it seemd to be stable.
I could scan the library and browse in it without a crash.

After that, I’ve made what I wanted to do for a long time now, delete all the old movies that had a poor quality in my movie library and get newer and better versions.
I’ve re-added my movie library in addition of the tv shows by setting the library to /mnt/Videos/Films and now it seems to remain stable.

The cleaning of the movies included getting rid of the 70Gb movie files and replacing them with 4KLight.
THe biggest file is now around 10Gb which is better.

I’ll test for some days and see how it goes, as I still have to test when the NAS goes to sleep (which never caused any issues in the past) :slight_smile:

It bothers me that I still don’t really what was the cause of the issue.

I’ll let you know in a few days.

Thanks for the help !

MathFly_