Segmentation fault playing audio files over SMB

When I try to play certain audio files from a NAS over SMB protocol, I get the “sad face” and Kodi restarts. Looking into journal, I have found the following:

Feb 25 12:02:03 Vero mediacenter[394]: /usr/bin/mediacenter: line 185: 534 Segmentation fault sudo -u osmc $KODI --standalone

I did a small research with the following results:

  • The playback even does not start
  • I can play mp3 files but not wma or flac
  • I can play all kinds of audio files from a local storage
  • I was able to play files over SMB before the January update of OSMC (not 100% sure)

Logs are here: https://paste.osmc.tv/uwaquvotaf

Any help would be appreciated.

Hi,

Unfortunately the log isn’t showing crash, its reporting the file has opened and ends there:

12:27:40.370 T:4082393680   DEBUG: CSMBFile::Open - opened smb://mediastation/music/Kryštof/Rubikon/02 Rubikon.wma, fd=10000
12:27:40.409 T:3493851904   DEBUG: Thread FileCache start, auto delete: false
12:27:40.464 T:4082393680   DEBUG: Open - probing detected format [asf]
12:27:40.464 T:4082393680   DEBUG: Open - avformat_find_stream_info starting
12:27:40.467 T:4082393680   DEBUG: Open - av_find_stream_info finished
12:27:40.467 T:4082393680   DEBUG: CDVDDemuxFFmpeg::AddStream ID: 0
12:27:40.467 T:4082393680   DEBUG: FactoryCodec - Audio: passthrough - Opening
12:27:40.467 T:4082393680   DEBUG: FactoryCodec - Audio: passthrough - Failed
12:27:40.467 T:4082393680   DEBUG: FactoryCodec - Audio: FFmpeg - Opening
12:27:40.469 T:4082393680   DEBUG: FactoryCodec - Audio: FFmpeg - Opened
12:27:40.479 T:4082393680   DEBUG: CSMBFile::Open - opened smb://mediastation/music/Kryštof/Rubikon/02 Rubikon.wma, fd=10001 

So at the moment not much to go on. I can see you are using kodi smb mounts, rather than kernal mounts; which is fine, but you should get better throughput using kernal mounts.

it may be worth try changing to kernel/fstab mounts and see if you are still getting the segmentation faults:

Thanks Tom.

Try playing the file back from local storage first

@Airacobra Hi,

please, let us know NAS this is, model, brand , firmware version, etc.

I strongly support Tom’s suggestion to use kernel smb code with the fstab configuration instead of the smb implementation of the kodi mediacenter.

In addition I’ve to further ideas:

  1. If you’re still using the mediacenter smb access, you can influence the maximum SMB protocol to use namely SMB1, SMB2 and SMB 3 at Settings → Services → SMB Client → Maximum protocol version. Please, try all these whether it makes a difference with your NAS.

  2. You can increase the kodi’s loglevel and create a new set of logs by the following sequence, see also https://kodi.wiki/view/Log_file/Advanced

  • Edit the file /home/osmc/.kodi/userdata/advancedsettings.xml and insert the xml tags
    <advancedsettings>
    ...
    <loglevel>3</loglevel>
    <debug>
    <extralogging>true</extralogging>
    <setextraloglevel>32,64,128,256,512,1024,2048,4096,8192,16384,32768,65536
    </setextraloglevel>
    <showloginfo>true\</showloginfo>
    </debug>
    ...
    </advancedsettings>
  • reboot
  • reproduce the issue
  • upload the log set using grab-logs -A or the MyOSMC method in the GUI and provide the URL, here
  • remove the added code from /home/osmc/.kodi/userdata/advancedsettings.xml
  • go to Settings → System → Logging and Reset to Defaults at the bottom
  • reboot

Many thanks for your help. The NAS is Synology with the latest software.

More research gave me the following results:

  • Playback from a local storage: OK
  • Playback from NAS, mounted from OS via NFS: OK
  • Playback from NAS, mounted from OS via SMB: OK
  • Playback from NAS, mounted from Kodi via NFS: OK
  • Playback from NAS, mounted from Kodi via SMB: Error - sad face

Changing SMB client version in Kodi makes no difference. Log files are here: https://paste.osmc.tv/bocudaniye

I will use kernel mount as advised. Many thanks for help.

Could you try:

mkdir -p /var/cache/samba/
chown -R osmc:osmc /var/cache/samba

Sam

Same result (sad face). Logs are here: https://paste.osmc.tv/pocurisofu

The /var/cache/samba directory contains one file: gencache.tdb.

I really appreciate your help. You can consider this thread as closed. I can happily mount my NAS using fstab.

Hi,

good to hear.
Please, mark the post which is closest to this final state as solution.

Thx and have fun with the OSMC Vero 4k,