[Samba] Troubles with Mac clients

Rowland penny rpenny at samba.org
Tue Dec 10 14:26:13 UTC 2019


On 10/12/2019 14:04, Andrea Venturoli via samba wrote:
> Hello.
>
> At a customer's site I had:
> _ Windows 2008 DC;
> _ Samba 4.8 fileserver on FreeBSD 11.3/amd64 on UFS;
> _ several Windows and Mac clients.
>
> Recently, having to move to Samba 4.10, I decided to bring up a new 
> fileserver in a jail (and let the base 4.8 one die after transferring 
> all shares).
> I have no problems with Windows clients, but several strange things 
> are happening with Macs. I'm listing them all: I'm not sure whether 
> they are related or not.
>
>
>
>
>
> A) A Mac will connect to a share on the fileserver with Command-K.
> Later, the same Mac will open Finder and choose the (already connected 
> to) fileserver from the side bar: a message will appear saying "the 
> element cannot be opened because the original cannot be found" (sorry, 
> this is a translation from Italian).
> Closing the Finder window and reopening it, will work (!!!).
>
> Seems like the Mac is disconnecting and needs to keep reconnecting.
>
>
>
>
>
> B) If Mac1 opens "file.doc" with LibreOffice. "._file.doc" will be 
> created to lock it.
> Mac2 will see the lock file in finder and cannot obviously open 
> "file.doc" read/write.
> Mac1 closes "file.doc" and Mac2 sees the lock file going away.
> However, if Mac2 tries to open the file, it gets "You don't have 
> permissions to open file.doc".
> After disconnecting from the share and reconnecting, Mac2 can open the 
> file again.
> From the fileserver itself, I still see the lockfile!!!
>
>
>
>
>
> C) I'm sometimes seeing smbd crash.
> Until now, I was able to capture one core, whose stack trace is below:
>
>> #0  0x0000000812e599ba in thr_kill () from /lib/libc.so.7
>> (gdb) bt
>> #0  0x0000000812e599ba in thr_kill () from /lib/libc.so.7
>> #1  0x0000000812e59984 in __raise (s=6) at 
>> /usr/src/lib/libc/gen/raise.c:52
>> #2  0x0000000812e598f9 in abort () at 
>> /usr/src/lib/libc/stdlib/abort.c:65
>> #3  0x000000080297c21c in dump_core () from 
>> /usr/local/lib/samba4/libsmbconf.so.0
>> #4  0x0000000802960b1b in smb_panic_s3 () from 
>> /usr/local/lib/samba4/libsmbconf.so.0
>> #5  0x0000000801d4c147 in smb_panic () from 
>> /usr/local/lib/samba4/libsamba-util.so.0
>> #6  0x0000000801d4c52e in fault_report () from 
>> /usr/local/lib/samba4/libsamba-util.so.0
>> #7  0x0000000801d4c129 in sig_fault () from 
>> /usr/local/lib/samba4/libsamba-util.so.0
>> #8  0x0000000812970cf0 in handle_signal (actp=0x7fffffffd6c0, sig=11, 
>> info=0x7fffffffdab0, ucp=0x7fffffffd740) at 
>> /usr/src/lib/libthr/thread/thr_sig.c:246
>> #9  0x00000008129702bf in thr_sighandler (sig=11, 
>> info=0x7fffffffdab0, _ucp=0x7fffffffd740) at 
>> /usr/src/lib/libthr/thread/thr_sig.c:189
>> #10 <signal handler called>
>> #11 0x00000008088ffd21 in smb_signing_sign_pdu () from 
>> /usr/local/lib/samba4/private/libcli-smb-common-samba4.so
>> #12 0x0000000801705ec0 in srv_send_smb () from 
>> /usr/local/lib/samba4/private/libsmbd-base-samba4.so
>> #13 0x00000008016b5570 in send_nt_replies () from 
>> /usr/local/lib/samba4/private/libsmbd-base-samba4.so
>> #14 0x00000008016b5696 in smbd_smb1_notify_reply () from 
>> /usr/local/lib/samba4/private/libsmbd-base-samba4.so
>> #15 0x00000008017472d5 in 
>> remove_pending_change_notify_requests_by_fid () from 
>> /usr/local/lib/samba4/private/libsmbd-base-samba4.so
>> #16 0x00000008016ef326 in close_file () from 
>> /usr/local/lib/samba4/private/libsmbd-base-samba4.so
>> #17 0x0000000801696c92 in file_close_conn () from 
>> /usr/local/lib/samba4/private/libsmbd-base-samba4.so
>> #18 0x000000080170f3d5 in close_cnum () from 
>> /usr/local/lib/samba4/private/libsmbd-base-samba4.so
>> #19 0x0000000801738ccc in smbXsrv_tcon_disconnect () from 
>> /usr/local/lib/samba4/private/libsmbd-base-samba4.so
>> #20 0x000000080173a30c in smbXsrv_tcon_disconnect_all_callback () 
>> from /usr/local/lib/samba4/private/libsmbd-base-samba4.so
>> #21 0x000000080273433a in db_rbt_traverse_internal () from 
>> /usr/local/lib/samba4/private/libdbwrap-samba4.so
>> #22 0x0000000802733839 in db_rbt_traverse () from 
>> /usr/local/lib/samba4/private/libdbwrap-samba4.so
>> #23 0x000000080273188c in dbwrap_traverse () from 
>> /usr/local/lib/samba4/private/libdbwrap-samba4.so
>> #24 0x0000000801739d07 in smbXsrv_tcon_disconnect_all () from 
>> /usr/local/lib/samba4/private/libsmbd-base-samba4.so
>> #25 0x000000080173d038 in exit_server_common () from 
>> /usr/local/lib/samba4/private/libsmbd-base-samba4.so
>> #26 0x000000080173d2ce in smbd_exit_server_cleanly () from 
>> /usr/local/lib/samba4/private/libsmbd-base-samba4.so
>> #27 0x00000008086f5a69 in exit_server_cleanly () from 
>> /usr/local/lib/samba4/private/libsmbd-shim-samba4.so
>> #28 0x000000080170c913 in smbd_server_connection_read_handler () from 
>> /usr/local/lib/samba4/private/libsmbd-base-samba4.so
>> #29 0x000000081233dc9d in tevent_common_invoke_fd_handler () from 
>> /usr/local/lib/libtevent.so.0
>> #30 0x0000000812340a94 in ?? () from /usr/local/lib/libtevent.so.0
>> #31 0x000000081233cec1 in _tevent_loop_once () from 
>> /usr/local/lib/libtevent.so.0
>> #32 0x000000081233d14b in tevent_common_loop_wait () from 
>> /usr/local/lib/libtevent.so.0
>> #33 0x0000000801709f47 in smbd_process () from 
>> /usr/local/lib/samba4/private/libsmbd-base-samba4.so
>> #34 0x000000000102eaff in smbd_accept_connection ()
>> #35 0x000000081233dc9d in tevent_common_invoke_fd_handler () from 
>> /usr/local/lib/libtevent.so.0
>> #36 0x0000000812340a94 in ?? () from /usr/local/lib/libtevent.so.0
>> #37 0x000000081233cec1 in _tevent_loop_once () from 
>> /usr/local/lib/libtevent.so.0
>> #38 0x000000081233d14b in tevent_common_loop_wait () from 
>> /usr/local/lib/libtevent.so.0
>> #39 0x000000000102cf5f in smbd_parent_loop ()
>> #40 0x000000000102c4a9 in main ()
>
> Any hint on what to look at?
>
>
>
>
>
> Here's my smb.conf:
>> [global]
>>         workgroup=XXXXXXXX
>>         realm=XXXXXXXX.local
>>         interfaces=em0
>>         hosts allow=192.168.xxx. 10.0.xx.2 10.x.x. 10.x.0.
>>         security=ADS
>>         map archive=No
>>         kerberos method = secrets and keytab
>>         idmap config *:backend = tdb
>>         idmap config *:range = 100000-999999
>>         idmap config XXXXXXXX:backend=rid
>>         idmap config XXXXXXXX:range = 10000-99999
>>         template homedir = /home/%U
>>         winbind use default domain = yes
>>         winbind enum users  = yes
>>         winbind enum groups = yes
>>         winbind refresh tickets = Yes
>>         winbind expand groups = 4
>>         winbind normalize names = Yes
>>         domain master = no
>>         local master = no
>>         vfs objects = acl_xattr
>>         map acl inherit = Yes
>>         store dos attributes = Yes
>>         unix extensions=no
>>         vfs objects=audit
>>         audit:facility=LOCAL7
>>         audit:priority=INFO
>>         rpc_daemon:mdssd = fork
>>         rpc_server:mdssvc = external
>>
>> [share1]
>>         path=/shares/1
>>         valid users=xxxxxx
>>         writable=yes
>>
>>
>> [homes]
>>         read only = No
>>         force create mode = 0600
>>         force directory mode = 0700
>>         path=/usr/home/%S
>>         vfs objects=audit recycle
>>         recycle:repository=Cestino
>>         recycle:keeptree=yes
>>         recycle:versions=yes
>>         recycle:exclude=.*
>
>
>
> Any help or hint is appreciated.
>
>
>
> Before someone asks: I'm not using ACLs or vfs_fruit, etc... since I 
> don't need them directly.
> Of course I'll enable them if they are needed for Samba to work properly.
>
>  bye & Thanks
>     av.
>
Every time you set 'vfs objects', you turn off the ones before, you have:

          vfs objects = acl_xattr
Then:
          vfs objects=audit

Then in a share:
          vfs objects=audit recycle

This means that 'acl_xattr' isn't used, 'share1' uses 'audit' and 
'homes' uses 'audit' and 'recycle'

Can I suggest that you set 'vfs objects' in [global] with this line:

vfs objects = acl_xattr audit

and this line in [homes] (if this is the only share you want to use with 
recycle):

vfs objects = acl_xattr audit recycle

You may wish to investigate using MAC vfs objects, they should help with 
your MAC clients.

If the above doesn't stop the crashes (smbd shouldn't crash) then we are 
going to need level 10 logs etc.

Rowland





More information about the samba mailing list