Results 1 to 6 of 6

Thread: Problem with Samba between ubuntu server and windows 10 client

  1. #1
    Join Date
    May 2019
    Beans
    3

    Problem with Samba between ubuntu server and windows 10 client

    Hello everyone,

    I have some strange behavior on my samba shares that I can't figure out how to resolve it.
    First some info about my setup:
    uname -a
    Code:
    Linux linuxserver 4.15.0-50-generic #54-Ubuntu SMP Mon May 6 18:46:08 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
    smbd -V
    Code:
    Version 4.7.6-Ubuntu
    The issue:
    After x minutes/hours my samba shares get unresponsive in my windows 10 client. I can only reacces them after a: sudo service smbd restart
    In the logs I find these error messages at the same time:
    tail -50f /var/log/samba/log.smbd
    Code:
      #16 /usr/lib/x86_64-linux-gnu/libtevent.so.0(tevent_common_loop_wait+0x1b) [0x7f076719b9eb]
       #17 /usr/lib/x86_64-linux-gnu/libtevent.so.0(+0x82f7) [0x7f076719f2f7]
       #18 /usr/lib/x86_64-linux-gnu/samba/libsmbd-base.so.0(smbd_process+0x718) [0x7f076a281998]
       #19 /usr/sbin/smbd(+0xcfcc) [0x55b06c1d6fcc]
       #20 /usr/lib/x86_64-linux-gnu/libtevent.so.0(+0x9ed0) [0x7f07671a0ed0]
       #21 /usr/lib/x86_64-linux-gnu/libtevent.so.0(+0x8357) [0x7f076719f357]
       #22 /usr/lib/x86_64-linux-gnu/libtevent.so.0(_tevent_loop_once+0x9d) [0x7f076719b7cd]
       #23 /usr/lib/x86_64-linux-gnu/libtevent.so.0(tevent_common_loop_wait+0x1b) [0x7f076719b9eb]
       #24 /usr/lib/x86_64-linux-gnu/libtevent.so.0(+0x82f7) [0x7f076719f2f7]
       #25 /usr/sbin/smbd(main+0x1d0a) [0x55b06c1d234a]
       #26 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7f0766dc7b97]
       #27 /usr/sbin/smbd(_start+0x2a) [0x55b06c1d245a]
    [2019/05/16 12:30:07.493357,  0] ../source3/lib/dumpcore.c:318(dump_core)
      coredump is handled by helper binary specified at /proc/sys/kernel/core_pattern[2019/05/16 12:30:08.469181,  0] ../source3/locking/share_mode_lock.c:439(share_mode_data_destructor)
      store returned NT_STATUS_UNSUCCESSFUL
    [2019/05/16 12:30:08.469246,  0] ../source3/lib/util.c:815(smb_panic_s3)
      PANIC (pid 9477): could not store share mode entry: NT_STATUS_UNSUCCESSFUL
    [2019/05/16 12:30:08.469720,  0] ../source3/lib/util.c:926(log_stack_trace)
      BACKTRACE: 28 stack frames:
       #0 /usr/lib/x86_64-linux-gnu/libsmbconf.so.0(log_stack_trace+0x1f) [0x7f076856e9cf]
       #1 /usr/lib/x86_64-linux-gnu/libsmbconf.so.0(smb_panic_s3+0x20) [0x7f076856eaa0]
       #2 /usr/lib/x86_64-linux-gnu/libsamba-util.so.0(smb_panic+0x2f) [0x7f076a6575af]
       #3 /usr/lib/x86_64-linux-gnu/samba/libsmbd-base.so.0(+0x1d2e52) [0x7f076a2cee52]
       #4 /usr/lib/x86_64-linux-gnu/libtalloc.so.2(+0xb1b4) [0x7f07675bd1b4]
       #5 /usr/lib/x86_64-linux-gnu/libtalloc.so.2(+0xae10) [0x7f07675bce10]
       #6 /usr/lib/x86_64-linux-gnu/libtalloc.so.2(_talloc_free+0xd8) [0x7f07675b58c8]
       #7 /usr/lib/x86_64-linux-gnu/samba/libsmbd-base.so.0(+0x164ef7) [0x7f076a260ef7]
       #8 /usr/lib/x86_64-linux-gnu/samba/libsmbd-base.so.0(+0x167e4a) [0x7f076a263e4a]
       #9 /usr/lib/x86_64-linux-gnu/samba/libsmbd-base.so.0(create_file_default+0x1ac) [0x7f076a265d0c]
       #10 /usr/lib/x86_64-linux-gnu/samba/libsmbd-base.so.0(smbd_smb2_request_process_create+0xd40) [0x7f076a298bf0]
       #11 /usr/lib/x86_64-linux-gnu/samba/libsmbd-base.so.0(smbd_smb2_request_dispatch+0xcef) [0x7f076a290fbf]
       #12 /usr/lib/x86_64-linux-gnu/samba/libsmbd-base.so.0(+0x195b7c) [0x7f076a291b7c]
       #13 /usr/lib/x86_64-linux-gnu/libtevent.so.0(+0x9ed0) [0x7f07671a0ed0]
       #14 /usr/lib/x86_64-linux-gnu/libtevent.so.0(+0x8357) [0x7f076719f357]
       #15 /usr/lib/x86_64-linux-gnu/libtevent.so.0(_tevent_loop_once+0x9d) [0x7f076719b7cd]
       #16 /usr/lib/x86_64-linux-gnu/libtevent.so.0(tevent_common_loop_wait+0x1b) [0x7f076719b9eb]
       #17 /usr/lib/x86_64-linux-gnu/libtevent.so.0(+0x82f7) [0x7f076719f2f7]
       #18 /usr/lib/x86_64-linux-gnu/samba/libsmbd-base.so.0(smbd_process+0x718) [0x7f076a281998]
       #19 /usr/sbin/smbd(+0xcfcc) [0x55b06c1d6fcc]
       #20 /usr/lib/x86_64-linux-gnu/libtevent.so.0(+0x9ed0) [0x7f07671a0ed0]
       #21 /usr/lib/x86_64-linux-gnu/libtevent.so.0(+0x8357) [0x7f076719f357]
       #22 /usr/lib/x86_64-linux-gnu/libtevent.so.0(_tevent_loop_once+0x9d) [0x7f076719b7cd]
       #23 /usr/lib/x86_64-linux-gnu/libtevent.so.0(tevent_common_loop_wait+0x1b) [0x7f076719b9eb]
       #24 /usr/lib/x86_64-linux-gnu/libtevent.so.0(+0x82f7) [0x7f076719f2f7]
       #25 /usr/sbin/smbd(main+0x1d0a) [0x55b06c1d234a]
       #26 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7f0766dc7b97]
       #27 /usr/sbin/smbd(_start+0x2a) [0x55b06c1d245a]
    [2019/05/16 12:30:08.469937,  0] ../source3/lib/dumpcore.c:318(dump_core)
      coredump is handled by helper binary specified at /proc/sys/kernel/core_pattern[2019/05/16 12:30:26.801590,  0] ../lib/util/become_daemon.c:124(daemon_ready)
      STATUS=daemon 'smbd' finished starting up and ready to serve connections
    ^C
    tim@linuxserver:~$ clear
    tim@linuxserver:~$ tail -80f /var/log/samba/log.smbd
       #21 /usr/lib/x86_64-linux-gnu/libtevent.so.0(+0x8357) [0x7f076719f357]
       #22 /usr/lib/x86_64-linux-gnu/libtevent.so.0(_tevent_loop_once+0x9d) [0x7f076719b7cd]
       #23 /usr/lib/x86_64-linux-gnu/libtevent.so.0(tevent_common_loop_wait+0x1b) [0x7f076719b9eb]
       #24 /usr/lib/x86_64-linux-gnu/libtevent.so.0(+0x82f7) [0x7f076719f2f7]
       #25 /usr/sbin/smbd(main+0x1d0a) [0x55b06c1d234a]
       #26 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7f0766dc7b97]
       #27 /usr/sbin/smbd(_start+0x2a) [0x55b06c1d245a]
    [2019/05/16 12:30:06.533716,  0] ../source3/lib/dumpcore.c:318(dump_core)
      coredump is handled by helper binary specified at /proc/sys/kernel/core_pattern[2019/05/16 12:30:07.492664,  0] ../source3/locking/share_mode_lock.c:439(share_mode_data_destructor)
      store returned NT_STATUS_UNSUCCESSFUL
    [2019/05/16 12:30:07.492741,  0] ../source3/lib/util.c:815(smb_panic_s3)
      PANIC (pid 9475): could not store share mode entry: NT_STATUS_UNSUCCESSFUL
    [2019/05/16 12:30:07.493157,  0] ../source3/lib/util.c:926(log_stack_trace)
      BACKTRACE: 28 stack frames:
       #0 /usr/lib/x86_64-linux-gnu/libsmbconf.so.0(log_stack_trace+0x1f) [0x7f076856e9cf]
       #1 /usr/lib/x86_64-linux-gnu/libsmbconf.so.0(smb_panic_s3+0x20) [0x7f076856eaa0]
       #2 /usr/lib/x86_64-linux-gnu/libsamba-util.so.0(smb_panic+0x2f) [0x7f076a6575af]
       #3 /usr/lib/x86_64-linux-gnu/samba/libsmbd-base.so.0(+0x1d2e52) [0x7f076a2cee52]
       #4 /usr/lib/x86_64-linux-gnu/libtalloc.so.2(+0xb1b4) [0x7f07675bd1b4]
       #5 /usr/lib/x86_64-linux-gnu/libtalloc.so.2(+0xae10) [0x7f07675bce10]
       #6 /usr/lib/x86_64-linux-gnu/libtalloc.so.2(_talloc_free+0xd8) [0x7f07675b58c8]
       #7 /usr/lib/x86_64-linux-gnu/samba/libsmbd-base.so.0(+0x164ef7) [0x7f076a260ef7]
       #8 /usr/lib/x86_64-linux-gnu/samba/libsmbd-base.so.0(+0x167e4a) [0x7f076a263e4a]
       #9 /usr/lib/x86_64-linux-gnu/samba/libsmbd-base.so.0(create_file_default+0x1ac) [0x7f076a265d0c]
       #10 /usr/lib/x86_64-linux-gnu/samba/libsmbd-base.so.0(smbd_smb2_request_process_create+0xd40) [0x7f076a298bf0]
       #11 /usr/lib/x86_64-linux-gnu/samba/libsmbd-base.so.0(smbd_smb2_request_dispatch+0xcef) [0x7f076a290fbf]
       #12 /usr/lib/x86_64-linux-gnu/samba/libsmbd-base.so.0(+0x195b7c) [0x7f076a291b7c]
       #13 /usr/lib/x86_64-linux-gnu/libtevent.so.0(+0x9ed0) [0x7f07671a0ed0]
       #14 /usr/lib/x86_64-linux-gnu/libtevent.so.0(+0x8357) [0x7f076719f357]
       #15 /usr/lib/x86_64-linux-gnu/libtevent.so.0(_tevent_loop_once+0x9d) [0x7f076719b7cd]
       #16 /usr/lib/x86_64-linux-gnu/libtevent.so.0(tevent_common_loop_wait+0x1b) [0x7f076719b9eb]
       #17 /usr/lib/x86_64-linux-gnu/libtevent.so.0(+0x82f7) [0x7f076719f2f7]
       #18 /usr/lib/x86_64-linux-gnu/samba/libsmbd-base.so.0(smbd_process+0x718) [0x7f076a281998]
       #19 /usr/sbin/smbd(+0xcfcc) [0x55b06c1d6fcc]
       #20 /usr/lib/x86_64-linux-gnu/libtevent.so.0(+0x9ed0) [0x7f07671a0ed0]
       #21 /usr/lib/x86_64-linux-gnu/libtevent.so.0(+0x8357) [0x7f076719f357]
       #22 /usr/lib/x86_64-linux-gnu/libtevent.so.0(_tevent_loop_once+0x9d) [0x7f076719b7cd]
       #23 /usr/lib/x86_64-linux-gnu/libtevent.so.0(tevent_common_loop_wait+0x1b) [0x7f076719b9eb]
       #24 /usr/lib/x86_64-linux-gnu/libtevent.so.0(+0x82f7) [0x7f076719f2f7]
       #25 /usr/sbin/smbd(main+0x1d0a) [0x55b06c1d234a]
       #26 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7f0766dc7b97]
       #27 /usr/sbin/smbd(_start+0x2a) [0x55b06c1d245a]
    [2019/05/16 12:30:07.493357,  0] ../source3/lib/dumpcore.c:318(dump_core)
      coredump is handled by helper binary specified at /proc/sys/kernel/core_pattern[2019/05/16 12:30:08.469181,  0] ../source3/locking/share_mode_lock.c:439(share_mode_data_destructor)
      store returned NT_STATUS_UNSUCCESSFUL
    [2019/05/16 12:30:08.469246,  0] ../source3/lib/util.c:815(smb_panic_s3)
      PANIC (pid 9477): could not store share mode entry: NT_STATUS_UNSUCCESSFUL
    [2019/05/16 12:30:08.469720,  0] ../source3/lib/util.c:926(log_stack_trace)
      BACKTRACE: 28 stack frames:
       #0 /usr/lib/x86_64-linux-gnu/libsmbconf.so.0(log_stack_trace+0x1f) [0x7f076856e9cf]
       #1 /usr/lib/x86_64-linux-gnu/libsmbconf.so.0(smb_panic_s3+0x20) [0x7f076856eaa0]
       #2 /usr/lib/x86_64-linux-gnu/libsamba-util.so.0(smb_panic+0x2f) [0x7f076a6575af]
       #3 /usr/lib/x86_64-linux-gnu/samba/libsmbd-base.so.0(+0x1d2e52) [0x7f076a2cee52]
       #4 /usr/lib/x86_64-linux-gnu/libtalloc.so.2(+0xb1b4) [0x7f07675bd1b4]
       #5 /usr/lib/x86_64-linux-gnu/libtalloc.so.2(+0xae10) [0x7f07675bce10]
       #6 /usr/lib/x86_64-linux-gnu/libtalloc.so.2(_talloc_free+0xd8) [0x7f07675b58c8]
       #7 /usr/lib/x86_64-linux-gnu/samba/libsmbd-base.so.0(+0x164ef7) [0x7f076a260ef7]
       #8 /usr/lib/x86_64-linux-gnu/samba/libsmbd-base.so.0(+0x167e4a) [0x7f076a263e4a]
       #9 /usr/lib/x86_64-linux-gnu/samba/libsmbd-base.so.0(create_file_default+0x1ac) [0x7f076a265d0c]
       #10 /usr/lib/x86_64-linux-gnu/samba/libsmbd-base.so.0(smbd_smb2_request_process_create+0xd40) [0x7f076a298bf0]
       #11 /usr/lib/x86_64-linux-gnu/samba/libsmbd-base.so.0(smbd_smb2_request_dispatch+0xcef) [0x7f076a290fbf]
       #12 /usr/lib/x86_64-linux-gnu/samba/libsmbd-base.so.0(+0x195b7c) [0x7f076a291b7c]
       #13 /usr/lib/x86_64-linux-gnu/libtevent.so.0(+0x9ed0) [0x7f07671a0ed0]
       #14 /usr/lib/x86_64-linux-gnu/libtevent.so.0(+0x8357) [0x7f076719f357]
       #15 /usr/lib/x86_64-linux-gnu/libtevent.so.0(_tevent_loop_once+0x9d) [0x7f076719b7cd]
       #16 /usr/lib/x86_64-linux-gnu/libtevent.so.0(tevent_common_loop_wait+0x1b) [0x7f076719b9eb]
       #17 /usr/lib/x86_64-linux-gnu/libtevent.so.0(+0x82f7) [0x7f076719f2f7]
       #18 /usr/lib/x86_64-linux-gnu/samba/libsmbd-base.so.0(smbd_process+0x718) [0x7f076a281998]
       #19 /usr/sbin/smbd(+0xcfcc) [0x55b06c1d6fcc]
       #20 /usr/lib/x86_64-linux-gnu/libtevent.so.0(+0x9ed0) [0x7f07671a0ed0]
       #21 /usr/lib/x86_64-linux-gnu/libtevent.so.0(+0x8357) [0x7f076719f357]
       #22 /usr/lib/x86_64-linux-gnu/libtevent.so.0(_tevent_loop_once+0x9d) [0x7f076719b7cd]
       #23 /usr/lib/x86_64-linux-gnu/libtevent.so.0(tevent_common_loop_wait+0x1b) [0x7f076719b9eb]
       #24 /usr/lib/x86_64-linux-gnu/libtevent.so.0(+0x82f7) [0x7f076719f2f7]
       #25 /usr/sbin/smbd(main+0x1d0a) [0x55b06c1d234a]
       #26 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7f0766dc7b97]
       #27 /usr/sbin/smbd(_start+0x2a) [0x55b06c1d245a]
    [2019/05/16 12:30:08.469937,  0] ../source3/lib/dumpcore.c:318(dump_core)
      coredump is handled by helper binary specified at /proc/sys/kernel/core_pattern[2019/05/16 12:30:26.801590,  0] ../lib/util/become_daemon.c:124(daemon_ready)
      STATUS=daemon 'smbd' finished starting up and ready to serve connections
    (last line is me restarting the service to get it working again).

    I have been tinkering with my samba config to try and fix it. So far nothing helps.
    My current samba config:
    Code:
    [global]
    workgroup = WORKGROUP
    server string = Samba Server %v
    netbios name = LinuxServer
    #security = user
    #security = share
    map to guest = bad user
    guest account = tim
    dns proxy = no
    create mask = 0777
    directory mask = 0777
    #printing = bsd
    #printcap name = /dev/null
    browseable = yes
    lock directory = /var/lock/samba
    locking = yes
    strict locking = no
    writable = yes
    ntlm auth = true
    
    bind interfaces only = yes
    disable netbios = yes
    domain master = yes
    deadtime = 15
    invalid users = nobody root
    load printers = no
    max connections = 10
    preferred master = yes
    printable = no
    socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=65536 SO_SNDBUF=65536
    strict sync = no
    
    [FileServer]
    path = /media
    browsable =yes
    writable = yes
    guest ok = yes
    read only = no
    public = yes
    available = yes
    
    [Dataserver]
    path = /data
    browsable =yes
    writable = yes
    guest ok = yes
    read only = no
    public = yes
    available = yes
    
    [Disc1]
    path = /media/disc1
    browsable =yes
    writable = yes
    guest ok = yes
    read only = no
    public = yes
    available = yes
    
    [Disc2]
    path = /media/disc2
    browsable =yes
    writable = yes
    guest ok = yes
    read only = no
    public = yes
    available = yes
    
    [Disc3]
    path = /media/disc3
    browsable =yes
    writable = yes
    guest ok = yes
    read only = no
    public = yes
    available = yes
    
    [Disc4]
    path = /media/disc4
    browsable =yes
    writable = yes
    guest ok = yes
    read only = no
    public = yes
    available = yes
    
    [Disc5]
    path = /media/disc5
    browsable =yes
    writable = yes
    guest ok = yes
    read only = no
    public = yes
    available = yes
    
    [Disc6]
    path = /media/disc6
    browsable =yes
    writable = yes
    guest ok = yes
    read only = no
    public = yes
    available = yes
    Everything in global after ntlm auth = true is something I added to try and resolve this issue.

    testparm
    Code:
    Load smb config files from /etc/samba/smb.conf
    Processing section "[FileServer]"
    Processing section "[Dataserver]"
    Processing section "[Disc1]"
    Processing section "[Disc2]"
    Processing section "[Disc3]"
    Processing section "[Disc4]"
    Processing section "[Disc5]"
    Processing section "[Disc6]"
    Loaded services file OK.
    WARNING: socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=65536 SO_SNDBUF=65536
    This warning is printed because you set one of the
    following options: SO_SNDBUF, SO_RCVBUF, SO_SNDLOWAT,
    SO_RCVLOWAT
    Modern server operating systems are tuned for
    high network performance in the majority of situations;
    when you set 'socket options' you are overriding those
    settings.
    Linux in particular has an auto-tuning mechanism for
    buffer sizes (SO_SNDBUF, SO_RCVBUF) that will be
    disabled if you specify a socket buffer size. This can
    potentially cripple your TCP/IP stack.
    
    Getting the 'socket options' correct can make a big
    difference to your performance, but getting them wrong
    can degrade it by just as much. As with any other low
    level setting, if you must make changes to it, make
     small changes and test the effect before making any
    large changes.
    
    Server role: ROLE_STANDALONE

  2. #2
    Join Date
    Dec 2009
    Beans
    6,186

    Re: Problem with Samba between ubuntu server and windows 10 client

    Why are you disconnecting your connections after 15 minutes of inactivity with this line:
    deadtime = 15

  3. #3
    Join Date
    May 2019
    Beans
    3

    Re: Problem with Samba between ubuntu server and windows 10 client

    Quote Originally Posted by Morbius1 View Post
    Why are you disconnecting your connections after 15 minutes of inactivity with this line:
    "Everything in global after ntlm auth = true is something I added to try and resolve this issue."

    I added it to see if it would resolve the issue. It didn´t. I can remove it again if you want.

  4. #4
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    16,289
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Problem with Samba between ubuntu server and windows 10 client

    I would suggest simplifying to the most basic config that works, then work on complications. For example, start with the default config file and add 1 share. Does that work? Does it work well?
    I don't see any errors in the samba logs on a 16.04 server here, but there isn't any Win10 here either. I vaguely remember that Win10 changed the default SMB version, so if you only have Win10 clients, then setting the smb protocol version the the value required for win10 could help.

    I'm hardly an expert. Is this a home or business setup? The "security" parms are commented out. Is that ok?
    These settings seem conflicting:
    Code:
    map to guest = bad user
    guest account = tim
    But I don't have a clue.

  5. #5
    Join Date
    May 2019
    Beans
    3

    Re: Problem with Samba between ubuntu server and windows 10 client

    I removed map to guest = bad user for now, let's see if it improves anything.

  6. #6
    Join Date
    Dec 2009
    Beans
    6,186

    Re: Problem with Samba between ubuntu server and windows 10 client

    Nope. You just made things worse.

    This is how this combination works:
    map to guest = bad user
    guest account = tim
    A "Bad User" is one in which the username and password that is passed to the Linux server ( and Windows always passes a user name and password even if you didn't supply one yourself ) does not find a corresponding match in the samba password database. Under these conditions the client user is converted to ( map to ) the guest account. The Linux default guest account is an actual user named literally "nobody". You overrode that default by specifying the guest account should be you ( guest account = tim ).

    If you remove "map to guest = bad user" from smb.conf samba defaults to map to guest = never thereby stopping all guest access to your shares. But all your shares specify guest access so .....

    How are you accessing this server from WIn10? By ip address, netbios name, or mDNS name? Try it by ip address ( \\192.168.0.100 ) or by mDNS name ( \\linuxserver.local ). Note: you will have to install avahi-daemon on Ubuntu Server for mDNS to work.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •