OSMC crashes if stop button pressed at end of playback

In the logs I'm missing the `smb2.fixmtu` configuration in your settings. That looks strange. Can try the following and - go to `GUI -> settings -> services` - the settings level has to be `advanced`or `expert` - activate `SMB-client -> mitigate MTU issues with smbv2`

Sorry, just see this is a rbp2.

Since I am planning to test with an RPi3B to see if it helps, could you expand on your advice that was stricken out above when you saw I used an RPi2B?
Is it something specific to the version of the RaspberryPi?
Or is it valid when you run OSMC on a different platform?

There is a special feature for the Vero4k at settings->services->SMB Client which influences the size of the network packets of the smb protocol … but the Raspberry Pis never have had issues with that.

If you place the video file on your USB drive, does OSMC crash as well or is using a smb network share a requirement for this issue?

I tried this on files in local store and I have yet to be able to hit the “un-sweet spot” for the STOP key when the video is to end and the next start playing.
I tested a number of times but failed.
I guess that the transit from one video to the next takes longer over the network share and therefore there is a higher chance to interrupt it at a problem instant…
I thought that the network speed comes into play too, if there is a difference between RPi2B+ and RPi3B. But I cannot find any proof of a speed difference, both seem to use 100 Mbit/s Ethernet…
So to get above that one has to go to RPi4B instead.

Well, I suggest you first try to mount the smb share(s) with the OS using fstab or autofs instead of using the kodi/mediacenter built-in smb stack.

Do you have any suggestion as to what I can enter into fstab to mount the smb share which is mentioned in the sources.xml file as follows:

<path pathversion="1">smb://ubuntusrv/MSNBC/</path>

Where can I find the actual mount info for that?

I read it and tried to follow what it said but still no joy, I cannot connect via /etc/fstab to the samba share on my Ubuntu server, which Kodi clearly uses.
I wound up with this mount line (all on one line, this forum splits it up):
//192.168.119.216/MSNBC /mnt/ubuntusrv cifs x-systemd.automount,noauto,rw,iocharset=utf8,credentials=/home/osmc/.credentials,uid=osmc,gid=osmc,file_mode=0770,dir_mode=0770 0 0
Then I execute sudo mount -a and there is no error message or the like.
Yet, if I look at /mnt/ubuntusrv there are no files, no mount has been done!
Where can I see possible errors and how can Kodi use this share?
Can I not mount it via fstab if it is used by Kodi in another way?

In the linked page is also a directive to execute this for it to work:

$ sudo systemctl daemon-reload
$ sudo systemctl restart remote-fs.target

I have never had to do any of those for mounts in any of my other Linux boxes, what purpose does it serve?

Hi,

Enabling verbose would you give you info as to why it failed:

sudo mount -v -a

Although just doing the specific mount may give more ideas:

sudo mount -v /mnt/ubuntusrv

Also could you please provide the out of: mount ?

Kernel mounts (fstab or autofs) tend to provide better throughput than kodi lib/soft mount (smb://).

Thanks Tom.

Automatic mount:

osmc@rpi2-osmc:~$ sudo mount -v -a
/boot                    : ignored
/mnt/mediadrive          : already mounted
/mnt/ubuntusrv           : ignored

And:

sudo mount -v /mnt/ubuntusrv
mount.cifs kernel mount options: ip=192.168.119.216,unc=\\192.168.119.216\MSNBC,iocharset=utf8,file_mode=0770,dir_mode=0770,uid=1000,gid=1000,user=bosse,pass=********
mount error(95): Operation not supported
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

I don’t understand why this is happening, but then I don’t know the innards of mount anyway…

EDIT:
I also did the strange commands:

osmc@rpi2-osmc:~$ sudo systemctl daemon-reload
osmc@rpi2-osmc:~$ sudo systemctl restart remote-fs.target

And after this I wanted to check if there were files in the mount directory:

$ sudo ls -l /mnt/ubuntusrv/
ls: cannot access '/mnt/ubuntusrv/': No such device
then:
$ sudo umount /mnt/ubuntusrv
umount: /mnt/ubuntusrv: target is busy.

Very strange results in my view…

Hi,

Server requires the the samba version to be specified, vers=3.0 should do it:


//192.168.119.216/MSNBC /mnt/ubuntusrv cifs x-systemd.automount,noauto,rw,iocharset=utf8,credentials=/home/osmc/.credentials,uid=osmc,gid=osmc,file_mode=0770,dir_mode=0770,vers=3.0 0 0

Tom.

SUCCESS! :smiley:
Thank you for your support!
Now I will reconfigure Kodi to use the new mount as a source dir too.
But for tomorrow since it is close to midnight here now.

1 Like

Well I made a quick test anyway before I go to bed.
Turns out that when I use this smb mount I again get the crash when I hit STOP at the time Kodi is starting the next video (somewhere inbetween the previous stops playing and the next starts).
I might get time to test this with logging enabled tomorrow, but not immediately…
Have to fetch grandkids at the train station.

Now I made the test with logging and I managed to get the crash the 2nd time around.
It happened at around 08:54-08-55.
The log was uploaded by MyOSMC to https://paste.osmc.tv/tanakoreqe
I tried to look at it myself but soon drowned in it.
But I found this, notice the timestamp jump from 08:17:01 to 08:55:02:

Nov 01 08:17:01 rpi2-osmc CRON[7122]: pam_unix(cron:session): session closed for user root
Nov 01 08:55:02 rpi2-osmc sudo[1105]: pam_unix(sudo:session): session closed for user osmc
Nov 01 08:55:02 rpi2-osmc mediacenter[428]: /usr/bin/mediacenter: line 142:  1105 Segmentation fault      sudo -u osmc LIRC_SOCKET_PATH=/var/run/lirc/lircd $KODI --standalone -fs
Nov 01 08:55:02 rpi2-osmc mediacenter[428]: Kodi exited with return code 139 after 8 hours, 55 minutes and 1 seconds
Nov 01 08:55:14 rpi2-osmc mediacenter[428]: Starting Kodi...

Anyway there it is.

Hi,

adding a video cache may help, info can be found here:

https://kodi.wiki/view/HOW-TO:Modify_the_video_cache

These settings should be ok for pi2/3:

<cache>
	<memorysize>157286400</memorysize>
	<buffermode>1</buffermode>
	<readfactor>4.0</readfactor>
</cache>

Thanks Tom.

Do I do this after creating the advancedsettings.xml file:

sudo systemctl restart mediacenter

Or do I have to reatart the RPi2 itself?
I have this on my RPi2:

$ free -m -h
              total        used        free      shared  buff/cache   available
Mem:          921Mi       245Mi       243Mi       6.0Mi       432Mi       627Mi
Swap:            0B          0B          0B

I used the “restart mediacenter” method instead of rebooting the RPi2…
Then tested and the same crash still occurs.

Hi,

At this point I only have a couple suggestions:

Try a different PSU

And/Or Fresh install on a new SD card.

Thanks Tom.

Or maybe move the SDcard to an RPi3B to see if that helps?
I do have one I think is not being used for anything special I can recommission.
It is powered on and running so I have to check what it is doing first.