Cannot access samba shares on OSMC from MacBook

Hello,

During latest OSMC update I had a smb related error. To fix it I purged and reinstalled smb from the App Store.
After this, the samba service seems to be working normally but I cannot connect to my samba shares on OSMC from my MacBook anymore.
I tried either as user osmc or guest but none is working.
I also tried to add some Mac OS specific options to smb.conf according to this info: Configure Samba to Work Better with Mac OS X - SambaWiki
but also this did not help.
Could you please help me to debug this issue? I have uploaded the logs.

Thank you
Marco

You need to share the logs for us to advise.

Hello Sam,

Thanks for the reply. The logs are at this URL: https://paste.osmc.tv/joyubogibe

BR
Marco

Hello again,

I tried reinstalling the latest OSMC (2023.1) and unfortunately I still have the same problem. I can connect from my MacBook to osmc via smb://osmc@10.0.0.114 (this is the fixed ip of my osmc) and I can see the shares. However, as soon as I try to open folders on one of the shares, the connection is broken.

In the log.smbd there are segmentation errors:

dumping core in /var/log/samba/cores/smbd
[2023/02/04 20:02:05.464741,  0] ../../lib/util/fault.c:159(smb_panic_log)
  ===============================================================
[2023/02/04 20:02:05.465081,  0] ../../lib/util/fault.c:160(smb_panic_log)
  INTERNAL ERROR: Signal 11: Segmentation fault in pid 1361 (4.13.13-Debian)
[2023/02/04 20:02:05.465223,  0] ../../lib/util/fault.c:164(smb_panic_log)
  If you are running a recent Samba version, and if you think this problem is not yet fixed in the latest versions, please consider reporting this bug, see https://wiki.samba.org/index.php/Bug_Reporting
[2023/02/04 20:02:05.465468,  0] ../../lib/util/fault.c:169(smb_panic_log)
  ===============================================================
[2023/02/04 20:02:05.465600,  0] ../../lib/util/fault.c:170(smb_panic_log)
  PANIC (pid 1361): Signal 11: Segmentation fault in 4.13.13-Debian
[2023/02/04 20:02:05.466321,  0] ../../lib/util/fault.c:274(log_stack_trace)
  BACKTRACE: 0 stack frames:
[2023/02/04 20:02:05.466883,  0] ../../source3/lib/dumpcore.c:315(dump_core)
  dumping core in /var/log/samba/cores/smbd
[2023/02/04 20:03:14.399244,  0] ../../lib/util/fault.c:159(smb_panic_log)
  ===============================================================
[2023/02/04 20:03:14.399683,  0] ../../lib/util/fault.c:160(smb_panic_log)
  INTERNAL ERROR: Signal 11: Segmentation fault in pid 1374 (4.13.13-Debian)
[2023/02/04 20:03:14.399855,  0] ../../lib/util/fault.c:164(smb_panic_log)
  If you are running a recent Samba version, and if you think this problem is not yet fixed in the latest versions, please consider reporting this bug, see https://wiki.samba.org/index.php/Bug_Reporting
[2023/02/04 20:03:14.400040,  0] ../../lib/util/fault.c:169(smb_panic_log)
  ===============================================================
[2023/02/04 20:03:14.400190,  0] ../../lib/util/fault.c:170(smb_panic_log)
  PANIC (pid 1374): Signal 11: Segmentation fault in 4.13.13-Debian
[2023/02/04 20:03:14.400972,  0] ../../lib/util/fault.c:274(log_stack_trace)
  BACKTRACE: 0 stack frames:
[2023/02/04 20:03:14.401341,  0] ../../source3/lib/dumpcore.c:315(dump_core)
  dumping core in /var/log/samba/cores/smbd

I would think this is a bug in this smb version. The samba version integrated in OSMC is very old (2017) and out of maintenance. Is it possible to upgrade smb?

BR
Marco

That doesn’t sound right.

I’d suggest posting some logs so we can check which version of OSMC you are using.

Aware you posted logs before, but they showed errors.

So please try and replicate on a fresh install with a fresh Samba install instead of with the modifications you made.

Hello,

I uploaded the new logs from a fresh install of OSMC 2023.01-1 where I just installed SMB from App Store.

https://paste.osmc.tv/suzagucero

The version of Samba that I get is 1.2.2, update 2017-11-21. That is also what I was getting in the previous installation after I upgraded to 2023.01-1.

BR
Marco

Are you referring to the smb-app? Which actually seems to be 1.2.7? Anyway the smb-app is just a wrapper to install the respective samba components which is samba 2:4.13.13 as you can see in your logs.

I am referring to the info in the App Store, please see the screenshot (sorry for the poor quality)

yes the samba version is definitely not from 2017, although is seems not maintained anymore? Samba Release Planning - SambaWiki

BR
Marco

As I wrote what you see there is the version number of the smb-app which is just a wrapper to install the current version of the samba application.

The version currently installed on your device is 4.13.13

Ok, do you have any suggestion on how to fix my issue? Each time I try to browse the samba shares I get disconnected and I see segmentation faults in the log.smbd so I cannot access any samba share at all.

BR
Marco

Are nasty issues to figure out. Is that problem only happen when you try to open files from external folders or also if you e.g. open something from within the /home/osmc/ folder?

Hello,

my samba shares are on two USB HDD. I do not use shares on the OSMC SSD so I cannot give a feedback if a samba share in the /home/osmc can be normally accessed and only the external drives can’t. I could try if you think that test helps.

If I browse those drives from the osmc interface or via ssh, everything is working fine. Only access from samba is not working.

Yesterday I also tried a fresh install of OSMC 2022 but again samba is not working, although the behavior seem to be slightly different - I get no connection at all.

I will also try to open the shares from a Win10 PC instead of Mac.

Anyway, everything was ok until the last OSMC update where I encountered a samba error, that is why my suspects are on the OSMC side.

Thanks
Marco

Yes suggest to test that.

Which filesystem are they using?

Have you done a check on the SD Card?

I have checked with a Win10 pc and I did not manage to reach the shares. Maybe I did something wrong? I activated the CIFS /smb 1.0 support and tried to connect to //10.0.0.114/ or smb://10.0.0.114 or smb://osmc@10.0.0.114 but never managed to reach any share.

The two HDDs that are connected to osmc and auto mounted have both NTFS partitions, except one VFAT in one of the two.

I am not sure how to check the SD card, I tried with sudo touch /forcefsck and did not get any error. Also, I have installed with two different SD cards and get similar results so I would not expect both to be faulty.

You don’t need SMB v1 enabled in Windows to connect to a share on a different device. Also your using the wrong slashs. To connect via explorer you would use \\10.0.0.114 and Windows will ask for credentials if they are needed. If you had previously connected to and saved credentials for a device using that IP address then you might have to go into Windows credentials manager and edit or delete that entry.

Ok, thanks for the hints. I tried also \\10.0.0.114 but still cannot connect. Windows says it cannot access the location (error code 0x80004005)

Some positive news: it seems that the shares are accessible from iOS without errors, I can browse them with the VLC iOS app.

However, why have the shares always been working with Mac OS and now don’t? I have read some comment about issues with network shares in Mac OS 13, so this might also be the case? However also from Windows I cannot get access.

Furthermore, what about the segmentation faults in the log.smbd?

Hello,

I have been testing also with another PC and also from there everything works fine.
Unfortunately the problem is in Mac OS 13 and there is no fix yet. :sob:
I think that this thread can be closed.

Thanks a lot for the support!

Hello,

I am still looking for a solution to access the samba shares on my OSMC from my Macbook with MacOS 13.4 and with further tests I found something weird. I have two raspberry pi 2, one setup with OSMC and the other setup with Open Media Vault. Both have the same samba version 4.13.13 Debian.
I can connect to the samba shares on the OMV from my Macbook without problems but I cannot connect to the shares on OSMC. I get a connection but it immediately drops.
Do you have any helpful hints on what could be the difference? FYI I tried connecting to the same USB drive on both systems and it only works on OMV.

Here is the content of the OSMC smb.conf:

[global]

# If you require a fully custom smb.conf create smb-local.conf instead of editing smb.conf so your
# configuration will not be overwritten by samba upgrades. You can use smb.conf as a template by
# copying it to smb-local.conf then removing the config file line below in the new file. If you only
# need to add some additional shares see smb-shares.conf below for a simpler way to do this.


    config file = /etc/samba/smb-local.conf

    workgroup = WORKGROUP
    security=user
    follow symlinks = yes
    wide links = no
    unix extensions = no
    lock directory = /var/cache/samba
    load printers = no
    printing = bsd
    printcap name = /dev/null
    disable spoolss = yes
    log level = 1
    map to guest = bad user
    fruit:model = Macmini
#   usershare template share = automount template

# Automount template disabled to work around a samba bug causing crashes accessing external drives.

    read raw = Yes
    write raw = Yes
    strict locking = no
    min receivefile size = 16384
    use sendfile = true
    aio read size = 2048
    aio write size = 2048
    socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=131072 SO_SNDBUF=131072

[osmc]
    browsable = yes
    read only = no
    valid users = osmc
    path = /home/osmc
    comment = OSMC Home Directory

[automount template]
    browseable = yes
    -valid = no
    valid users = osmc
    path = %P
    hide files = /$RECYCLE.BIN/System Volume Information/desktop.ini/thumbs.db/

# Add custom shares in smb-shares.conf instead of editing smb.conf so they will not be
# overwritten by samba updates. You can only add new shares to smb-shares.conf, not change
# the default shares or global options. If you need full control see smb-local.conf above.

include = /etc/samba/smb-shares.conf

and here is the content of the smb.conf in OMV:

# This file is auto-generated by openmediavault (https://www.openmediavault.org)
# WARNING: Do not edit this file, your changes will get lost.
#======================= Global Settings =======================
[global]
workgroup = WORKGROUP
server string = %h server
dns proxy = no
log level = 0
log file = /var/log/samba/log.%m
max log size = 1000
logging = syslog
panic action = /usr/share/samba/panic-action %d
passdb backend = tdbsam
obey pam restrictions = no
unix password sync = no
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
pam password change = yes
socket options = TCP_NODELAY IPTOS_LOWDELAY
guest account = nobody
load printers = no
disable spoolss = yes
printing = bsd
printcap name = /dev/null
unix extensions = yes
wide links = no
create mask = 0777
directory mask = 0777
use sendfile = yes
aio read size = 1
aio write size = 1
time server = no
wins support = no
disable netbios = yes
multicast dns register = no
# Special configuration for Apple's Time Machine
fruit:aapl = yes
fruit:copyfile = yes
fruit:nfs_aces = no
# Extra options
min receivefile size = 16384
getwd cache = yes
#======================= Share Definitions =======================
[timemachine]
comment = Time Machine backup MBP Marco
path = /srv/dev-disk-by-uuid-0C517430650E967B/./
guest ok = no
guest only = no
read only = no
browseable = yes
inherit acls = no
inherit permissions = no
ea support = no
store dos attributes = no
fruit:encoding = private
fruit:locking = none
fruit:metadata = stream
fruit:resource = file
fruit:veto_appledouble = no
fruit:wipe_intentionally_left_blank_rfork = yes
fruit:delete_empty_adfiles = yes
fruit:time machine = yes
vfs objects =  fruit streams_xattr
printable = no
create mask = 0664
force create mode = 0664
directory mask = 0775
force directory mode = 0775
hide special files = yes
follow symlinks = yes
hide dot files = yes
valid users = 
invalid users = 
read list = 
write list = 

[TOSHI]
path = /srv/dev-disk-by-uuid-48E8CEEB32C864D3/./
guest ok = no
guest only = no
read only = no
browseable = yes
inherit acls = no
inherit permissions = no
ea support = no
store dos attributes = no
vfs objects =  fruit streams_xattr
printable = no
create mask = 0664
force create mode = 0664
directory mask = 0775
force directory mode = 0775
hide special files = yes
follow symlinks = yes
hide dot files = no
valid users = "marco-nas","NAS",@"marco-nas"
invalid users = 
read list = 
write list = "marco-nas","NAS",@"marco-nas"