You are not logged in.

#1 2021-02-24 12:52:51

kevdog
Member
Registered: 2013-01-26
Posts: 96

Need help understanding why samba service "dies"

I've been running smb on my archlinux installation which acts as part of a time machine backup plan for the various MacOS devices around the house.

About every 7-10 days I'll see one of the MacComputer complain of not being able to connect to the Archlinux backup server.

I get the following errors reported from within in Arch

Feb 24 01:37:02 arch-TM smbd[2064532]: [2021/02/24 01:37:02.461245,  0] ../../lib/util/modules.c:49(load_module)
Feb 24 01:37:02 arch-TM smbd[2064532]:   Error loading module '/usr/lib/samba/vfs/streams_xattr.so': /usr/lib/samba/libsam>
Feb 24 01:37:02 arch-TM smbd[2064532]: [2021/02/24 01:37:02.462122,  0] ../../source3/smbd/vfs.c:185(vfs_init_custom)
Feb 24 01:37:02 arch-TM smbd[2064532]:   error probing vfs module 'streams_xattr': NT_STATUS_UNSUCCESSFUL
Feb 24 01:37:02 arch-TM smbd[2064532]: [2021/02/24 01:37:02.462388,  0] ../../source3/smbd/vfs.c:397(smbd_vfs_init)
Feb 24 01:37:02 arch-TM smbd[2064532]:   smbd_vfs_init: vfs_init_custom failed for streams_xattr
Feb 24 01:37:02 arch-TM smbd[2064532]: [2021/02/24 01:37:02.462611,  0] ../../source3/smbd/service.c:645(make_connection_s>
Feb 24 01:37:02 arch-TM smbd[2064532]:   make_connection_snum: vfs_init failed for service IPC$
Feb 24 06:38:57 arch-TM smbd[2079099]: [2021/02/24 06:38:57.460374,  0] ../../lib/util/access.c:369(allow_access)
Feb 24 06:38:57 arch-TM smbd[2079099]:   Denied connection from fe80::c29:1b12:de9a:3033 (fe80::c29:1b12:de9a:3033)

If I restart the service, the smb server is again available for connections for another 7-10 days.

What are other steps I could use to debug this error?

Offline

#2 2021-02-24 13:02:27

kevdog
Member
Registered: 2013-01-26
Posts: 96

Re: Need help understanding why samba service "dies"

Here are some further logs I was able to find:

Error loading module '/usr/lib/samba/vfs/streams_xattr.so': /usr/lib/samba/libsamba-debug-samba4.so: version `SAMBA_4.13.4' not found (required by /usr/lib/samba/vfs/streams_xattr.so)
Feb 24 00:31:43 arch-TM smbd[2061291]: [2021/02/24 00:31:43.071512,  0] ../../source3/smbd/vfs.c:185(vfs_init_custom)
Feb 24 00:31:43 arch-TM smbd[2061291]:   error probing vfs module 'streams_xattr': NT_STATUS_UNSUCCESSFUL
Feb 24 00:31:43 arch-TM smbd[2061291]: [2021/02/24 00:31:43.071817,  0] ../../source3/smbd/vfs.c:397(smbd_vfs_init)
Feb 24 00:31:43 arch-TM smbd[2061291]:   smbd_vfs_init: vfs_init_custom failed for streams_xattr
Feb 24 00:31:43 arch-TM smbd[2061291]: [2021/02/24 00:31:43.072051,  0] ../../source3/smbd/service.c:645(make_connection_snum)
Feb 24 00:31:43 arch-TM smbd[2061291]:   make_connection_snum: vfs_init failed for service IPC$
Feb 24 01:37:02 arch-TM smbd[2064532]: [2021/02/24 01:37:02.461245,  0] ../../lib/util/modules.c:49(load_module)

What is reason behind: `SAMBA_4.13.4' not found (required by /usr/lib/samba/vfs/streams_xattr.so?

# sudo smbstatus

Samba version 4.13.4

Service      pid     Machine       Connected at                     Encryption   Signing
---------------------------------------------------------------------------------------------
TimeMachine  2081796 10.0.1.184    Wed Feb 24 06:48:41 AM 2021 CST  AES-128-CCM  AES-128-CMAC
IPC$         2081796 10.0.1.184    Wed Feb 24 06:48:41 AM 2021 CST  AES-128-CCM  AES-128-CMAC
TimeMachine  2079958 10.0.1.184    Wed Feb 24 06:40:07 AM 2021 CST  AES-128-CCM  AES-128-CMAC

Last edited by kevdog (2021-02-24 13:06:27)

Offline

#3 2021-02-24 14:37:16

Maniaxx
Member
From: .de
Registered: 2014-05-14
Posts: 411

Re: Need help understanding why samba service "dies"

Can you post your smb.conf?
You probably have to raise debug level to get better explanation of what's going on.

I don't know the 'timemachine' process. Does it need xattrs at all? Maybe it can be disabled/bypassed.
https://www.samba.org/samba/docs/curren … ttr.8.html

Last edited by Maniaxx (2021-02-24 14:49:26)


sys2064

Offline

#4 2021-02-24 14:55:23

kevdog
Member
Registered: 2013-01-26
Posts: 96

Re: Need help understanding why samba service "dies"

@Maniaxx

Thanks for reply.

I'm definitely no smb expert so for me to speculate what's going on here would be silly.  The server rarely gets rebooted.  The client machines (some are laptop and some are desktops) will get either rebooted frequently or not rebooted (in terms of desktop). 

Here is my smb.conf file for the record.  I'm not trying to use anything fancy.  Not sure about the entire xattrs need or want.

[global]

   workgroup = WORKGROUP

   server string = Arch-TM-SMB

   server role = standalone server

   hosts allow = 10.0.1. 127.

   log file = /var/log/samba/%m.log

   max log size = 50

   dns proxy = no

   netbios name = archTM-Xen
   create mask = 0644
   directory mask = 2755
   force create mode = 0644
   force directory mode = 2755
   server min protocol = SMB2_02
   smb encrypt = desired
   load printers = no
   printing = bsd
   printcap name = /dev/null
   disable spoolss = yes
   show add printer wizard = no
   delete veto files = true

   #Following was added based on recommendations here: [url]https://wiki.samba.org/index.php/Configure_Samba_to_Work_Better_with_Mac_OS_X[/url]
   min protocol = SMB2
   vfs objects = catia fruit streams_xattr
   ea support = yes
   fruit:metadata = stream
   fruit:model = MacSamba
   fruit:veto_appledouble = yes
   fruit:posix_rename = yes
   fruit:zero_file_id = yes
   fruit:wipe_intentionally_left_blank_rfork = yes
   fruit:delete_empty_adfiles = yes

[TimeMachine]
   comment = Time Machine SMB shares
   vfs objects = catia fruit streams_xattr
   fruit:time machine = yes
   path = /mnt/timemachine
   valid users = kevdog @timemachine
   force group = +timemachine
   public = no
   writeable = yes

I can see I'm using the streams_xattr vfs object per the configuration file.  I'll be honest, I found this information within some post.  Information on how to setup a proper TimeMachine Server is kind of limited and there really isn't any guidance from Apple or others on this matter.  Would it be advisable not to include this vfs module?  I got this information directly from wiki.samba.org.  I'm assuming this site is validated by the samba people however that might be an invalid assumption.

Last edited by kevdog (2021-02-24 15:01:45)

Offline

#5 2021-02-24 15:42:11

Chrzi
Member
Registered: 2021-02-24
Posts: 1

Re: Need help understanding why samba service "dies"

I had the same issue today. I did two things and it works again (at least for the moment).

Enabled NTP on the server, as it was off by over 2 hours, and restarted smb.

Sadly I can't confirm if this works on Mac now, because it is now stuck in a reboot loop ><
However I got the same error accessing the share from Windows before and can connect to it now.

Last edited by Chrzi (2021-02-24 15:43:14)

Offline

#6 2021-02-24 16:04:00

Maniaxx
Member
From: .de
Registered: 2014-05-14
Posts: 411

Re: Need help understanding why samba service "dies"

Maybe try:

[global]
  log level = 3
  deadtime = 60

'deadtime' default value is 10080 (7 days) that comes close to what you describe. Let's see what happens on 1h. Also keep an eye on log size. Not sure how fast it will pollute on level 3.


sys2064

Offline

#7 2021-02-24 20:54:12

kevdog
Member
Registered: 2013-01-26
Posts: 96

Re: Need help understanding why samba service "dies"

@Maniaxx

Ok -- So after adding those lines to global - the smb service has been running quietly for about 2 hours.  I can see that journalctl does not capture all the same logging events as is stored in /var/log/samba/smbd.log.  (For some reason I thought the two logging utilities would be similar).

Anyway -- now looking at these log files (and not journalctl) -- I see the following from when the system crashed (when this post was originally made):

  ===============================================================
[2021/02/24 06:39:55.553330,  0] ../../lib/util/fault.c:160(smb_panic_log)
  INTERNAL ERROR: smbd_scavenger_parent_dead in pid 1241733 (4.13.3)
[2021/02/24 06:39:55.553561,  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 [url]https://wiki.samba.org/index.php/Bug_Reporting[/url]
[2021/02/24 06:39:55.553911,  0] ../../lib/util/fault.c:169(smb_panic_log)
  ===============================================================
[2021/02/24 06:39:55.554307,  0] ../../lib/util/fault.c:170(smb_panic_log)
  PANIC (pid 1241733): smbd_scavenger_parent_dead in 4.13.3
[2021/02/24 06:39:55.563549,  0] ../../lib/util/fault.c:274(log_stack_trace)
  BACKTRACE: 24 stack frames:
   #0 /usr/lib/libsamba-util.so.0(log_stack_trace+0x31) [0x7fc07d0e7ae1]
   #1 /usr/lib/libsamba-util.so.0(smb_panic+0x27) [0x7fc07d0e7d67]
   #2 /usr/lib/samba/libsmbd-base-samba4.so(+0x21a52e) [0x7fc07cf9352e]
   #3 /usr/lib/samba/libsmbd-base-samba4.so(+0x21a913) [0x7fc07cf93913]
   #4 /usr/lib/samba/libsmbd-shim-samba4.so(exit_server+0x14) [0x7fc07caa2244]
   #5 /usr/lib/samba/libsmbd-base-samba4.so(+0x21cd6e) [0x7fc07cf95d6e]
   #6 /usr/lib/libtevent.so.0(tevent_common_invoke_fd_handler+0x7e) [0x7fc07ca0005e]
   #7 /usr/lib/libtevent.so.0(+0xd568) [0x7fc07ca06568]
   #8 /usr/lib/libtevent.so.0(+0xb669) [0x7fc07ca04669]
   #9 /usr/lib/libtevent.so.0(_tevent_loop_once+0x95) [0x7fc07c9ff6e5]
   #10 /usr/lib/samba/libsmbd-base-samba4.so(+0x21d2b1) [0x7fc07cf962b1]
   #11 /usr/lib/libsmbconf.so.0(+0x43a06) [0x7fc07cd06a06]
   #12 /usr/lib/libsmbconf.so.0(+0x44aef) [0x7fc07cd07aef]
   #13 /usr/lib/samba/libmessages-dgm-samba4.so(+0x601f) [0x7fc07beae01f]
   #14 /usr/lib/samba/libmessages-dgm-samba4.so(+0x448c) [0x7fc07beac48c]
   #15 /usr/lib/libtevent.so.0(tevent_common_invoke_fd_handler+0x7e) [0x7fc07ca0005e]
   #16 /usr/lib/libtevent.so.0(+0xd568) [0x7fc07ca06568]
   #17 /usr/lib/libtevent.so.0(+0xb669) [0x7fc07ca04669]
   #18 /usr/lib/libtevent.so.0(_tevent_loop_once+0x95) [0x7fc07c9ff6e5]
   #19 /usr/lib/libtevent.so.0(tevent_common_loop_wait+0x1c) [0x7fc07c9ff9ec]
   #20 /usr/lib/libtevent.so.0(+0xb609) [0x7fc07ca04609]
   #21 /usr/bin/smbd(main+0x1f4d) [0x55ff959e4f8d]
   #22 /usr/lib/libc.so.6(__libc_start_main+0xf2) [0x7fc07c700152]
   #23 /usr/bin/smbd(_start+0x2e) [0x55ff959e50fe]
[2021/02/24 06:39:55.565039,  0] ../../source3/lib/dumpcore.c:317(dump_core)
  coredump is handled by helper binary specified at /proc/sys/kernel/core_pattern
[2021/02/24 06:39:55.956555,  0] ../../lib/util/become_daemon.c:135(daemon_ready)

So I'm not sure how to interpret:
  INTERNAL ERROR: smbd_scavenger_parent_dead in pid 1241733 (4.13.3)

Offline

#8 2021-02-25 10:03:48

Maniaxx
Member
From: .de
Registered: 2014-05-14
Posts: 411

Re: Need help understanding why samba service "dies"

Probably no one can. Report the bug to the officials and see what happens.


sys2064

Offline

Board footer

Powered by FluxBB