Jump to content

[Info] Samba server problem Kernel 5.10.0-rc2 with ubuntu focal on NanoPi Neo2 (1GB Ram-version)


guidol
 Share

Recommended Posts

Today I updated some SBCs

- 2x NanoPi Neo2 with 512MB Ram (debian buster)

- 1x NanoPi Neo2 with 1GB Ram (ubuntu focal)

- 1x BanaPI M2 Berry (debian buster)

to kernel 5.10.0-rc2 DEV which are running a samba-server which is installed via "apt install samba" and not

via the armbian-config SOFTYS.

 

They are do run since serveral kernel-version - also with 5.9.1

 

But after the update my NanoPi Neo2 with 1GB Ram cant be connected from Linux or Windows 10 to his samba-server.

It looks like samba freezed:

mount -t cifs -o vers=3.0,user=guido,password=this_isnt_mypwd,domain=guido,dir_mode=0777,file_mode=0777 //192.168.6.24/data /smbtest
mount error(11): Resource temporarily unavailable

 

I checked the config and even reinstalled samba on the NanoPi Neo2 1GB Ram :( but CANT connect to the data-share :( 

 

Because the last change was the kernel I did go back to 5.9.1 via armbian-config on this NanoPi Neo2 1GB Ram

and the samba-server is now working again.

 

Another difference between the NanoPi Neo2 is that the 512MB-version do run debian buster and the 1GB-version do run ubuntu focal.

 

So I dont know directly if it is the board-version whcih has the problem or if the ubuntu focal version has a problem with the kernel 5.10.0-rc2

 

Also here all samba-servers running (debian buster with 5.10.0-rc2 and ubuntu focal with 5.9.1):

 

System diagnosis information

NanoPi Neo2 512MB

http://ix.io/2Dlw

 

NanoPi Neo2 1GB Ram

http://ix.io/2Dlx

 

BPi M2 Berry

http://ix.io/2Dlv

Link to comment
Share on other sites

  • guidol changed the title to [Info] Samba server problem Kernel 5.10.0-rc2 with ubuntu focal on NanoPi Neo2 (1GB Ram-version)

Search Before Posting!

Hi @guidol, I'm actually seeing similar issues with Debian (!).  The default Debian Buster v4.9.5 Samba server works fine with kernel v5.9.5, but for me with kernel v5.10-rc2 it consistently crashes with "INTERNAL ERROR" faults when a client would access it.  Samba has had issues like this in the past where a particular version would start crashing on newer kernels, so I installed the latest version of Samba (v4.13.2) and it works fine with kernel v5.10 - no crashes, and everything works well.  It looks like there have been a number of changes made for Samba in the new kernel (e.g., see https://wiki.samba.org/index.php/LinuxCIFSKernel#Changes_by_release), so perhaps the older server versions provided by the distributions are simply too old and incompatible for the new v5.10 kernel.

 

Here are some quick screen captures showing Samba working on my NEO2; I first make a directory "testing", and then copy some files to it, and then I map and access the NEO2 share via Windows:

 

image.png.604b2e17737e3e100099b0766357af94.png

 

image.thumb.png.8f67fa2b9d81a965f9ecd2ec0a3dfd03.png

 

I copied a number of files across the share as well and it worked fine.  I don't use Ubuntu, so I'm not sure what version of Samba is provided with Focal, but perhaps you're encountering the same issue?  You might try installing a newer Samba version and see how it works for you.  Note that I did this all as a test and simply built Samba v4.13.2 from source on the NEO2 (I used https://download.samba.org/pub/samba/samba-latest.tar.gz to download the source).  I hope this helps!

 

 

Link to comment
Share on other sites

5 hours ago, 5kft said:

Hi @guidol, I'm actually seeing similar issues with Debian (!). 

The default Debian Buster v4.9.5 Samba server works fine with kernel v5.9.5,

but for me with kernel v5.10-rc2 it consistently crashes with "INTERNAL ERROR" faults when a client would access it. 

Samba has had issues like this in the past where a particular version would start crashing on newer kernels, so I installed the latest version of Samba (v4.13.2) and it works fine with kernel v5.10 - no crashes, and everything works well. 

Note that I did this all as a test and simply built Samba v4.13.2 from source on the NEO2 (I used https://download.samba.org/pub/samba/samba-latest.tar.gz to download the source).  I hope this helps!

 

 

@5kft I will take the Samba-version which armbian does deliver me ;)

for Ubuntu Focal:
2:4.11.6+dfsg-0ubuntu1.6

and for debian buster:
2:4.9.5+dfsg-5+deb10u1

its interesting - for me - that the newer version 4.11.6 does crash with kernel 5.10.0-rc2 on ubuntu focal but the older 4.9.5 has no problems using kernel 5.10.0-rc2 under debain buster...

 

Thanks for the informations/links - so I would stay with kernel 5.9.1 on ubuntu focal for now :)

Link to comment
Share on other sites

9 hours ago, guidol said:

its interesting - for me - that the newer version 4.11.6 does crash with kernel 5.10.0-rc2 on ubuntu focal but the older 4.9.5 has no problems using kernel 5.10.0-rc2 under debain buster...

 

Glad it is working for you, but very curious indeed!

 

Edit:  I tried on another NEO2, and indeed 4.9.5 works fine :blink:.  Perhaps my first test was odd because I just upgraded the kernel on a much older platform rootfs.  But I can confirm the platform-provided v4.9.5 is working under v5.10-rc2 on my "cleaner" NEO2.  I'm also glad to see that the latest v4.13.2 also works!

Link to comment
Share on other sites

1 hour ago, guidol said:

is your "cleaner" NEO2 under ubuntu or debian?

 

I actually tried both - Debian works fine (as you noted), but Focal crashes just like I was seeing yesterday:

 

Spoiler

[2020/11/08 18:27:40.947991,  0] ../../lib/util/fault.c:79(fault_report)
  ===============================================================
[2020/11/08 18:27:40.948421,  0] ../../lib/util/fault.c:80(fault_report)
  INTERNAL ERROR: Signal 11 in pid 3682 (4.11.6-Ubuntu)
  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
[2020/11/08 18:27:40.948559,  0] ../../lib/util/fault.c:86(fault_report)
  ===============================================================
[2020/11/08 18:27:40.948649,  0] ../../source3/lib/util.c:823(smb_panic_s3)
  PANIC (pid 3682): internal error
[2020/11/08 18:27:40.956215,  0] ../../lib/util/fault.c:264(log_stack_trace)
  BACKTRACE: 38 stack frames:
   #0 /lib/aarch64-linux-gnu/libsamba-util.so.0(log_stack_trace+0x38) [0xffffb10427b8]
   #1 /lib/aarch64-linux-gnu/libsmbconf.so.0(smb_panic_s3+0x20) [0xffffb0fe4be8]
   #2 /lib/aarch64-linux-gnu/libsamba-util.so.0(smb_panic+0x34) [0xffffb10428d4]
   #3 /lib/aarch64-linux-gnu/libsamba-util.so.0(+0x10b54) [0xffffb1042b54]
   #4 linux-vdso.so.1(__kernel_rt_sigreturn+0) [0xffffb14617bc]
   #5 /lib/aarch64-linux-gnu/libpthread.so.0(+0xc26c) [0xffffb073026c]
   #6 /lib/aarch64-linux-gnu/libtdb.so.1(+0xf76c) [0xffffafb5b76c]
   #7 /lib/aarch64-linux-gnu/libtdb.so.1(+0x723c) [0xffffafb5323c]
   #8 /lib/aarch64-linux-gnu/libtdb.so.1(+0x79bc) [0xffffafb539bc]
   #9 /lib/aarch64-linux-gnu/libtdb.so.1(+0x9434) [0xffffafb55434]
   #10 /lib/aarch64-linux-gnu/libtdb.so.1(+0x54e0) [0xffffafb514e0]
   #11 /lib/aarch64-linux-gnu/libtdb.so.1(tdb_storev+0x88) [0xffffafb51a80]
   #12 /usr/lib/aarch64-linux-gnu/samba/libdbwrap.so.0(+0x62cc) [0xffffb04202cc]
   #13 /usr/lib/aarch64-linux-gnu/samba/libdbwrap.so.0(dbwrap_record_storev+0x10) [0xffffb041d300]
   #14 /usr/lib/aarch64-linux-gnu/samba/libdbwrap.so.0(dbwrap_record_store+0x18) [0xffffb041d320]
   #15 /usr/lib/aarch64-linux-gnu/samba/libsmbd-base.so.0(+0x16dfcc) [0xffffb1225fcc]
   #16 /usr/lib/aarch64-linux-gnu/samba/libsmbd-base.so.0(+0x16e968) [0xffffb1226968]
   #17 /usr/lib/aarch64-linux-gnu/samba/libsmbd-base.so.0(smb2srv_tcon_create+0x68) [0xffffb1227a18]
   #18 /usr/lib/aarch64-linux-gnu/samba/libsmbd-base.so.0(smbd_smb2_request_process_tcon+0x40c) [0xffffb120fb94]
   #19 /usr/lib/aarch64-linux-gnu/samba/libsmbd-base.so.0(smbd_smb2_request_dispatch+0xc80) [0xffffb1209f50]
   #20 /usr/lib/aarch64-linux-gnu/samba/libsmbd-base.so.0(+0x152a70) [0xffffb120aa70]
   #21 /lib/aarch64-linux-gnu/libtevent.so.0(tevent_common_invoke_fd_handler+0x88) [0xffffb075c390]
   #22 /lib/aarch64-linux-gnu/libtevent.so.0(+0xc668) [0xffffb0762668]
   #23 /lib/aarch64-linux-gnu/libtevent.so.0(+0xa72c) [0xffffb076072c]
   #24 /lib/aarch64-linux-gnu/libtevent.so.0(_tevent_loop_once+0x94) [0xffffb075ba4c]
   #25 /lib/aarch64-linux-gnu/libtevent.so.0(tevent_common_loop_wait+0x20) [0xffffb075bcc8]
   #26 /lib/aarch64-linux-gnu/libtevent.so.0(+0xa6a4) [0xffffb07606a4]
   #27 /usr/lib/aarch64-linux-gnu/samba/libsmbd-base.so.0(smbd_process+0x6d4) [0xffffb11fa94c]
   #28 /usr/sbin/smbd(+0xb51c) [0xaaaaabc4b51c]
   #29 /lib/aarch64-linux-gnu/libtevent.so.0(tevent_common_invoke_fd_handler+0x88) [0xffffb075c390]
   #30 /lib/aarch64-linux-gnu/libtevent.so.0(+0xc668) [0xffffb0762668]
   #31 /lib/aarch64-linux-gnu/libtevent.so.0(+0xa72c) [0xffffb076072c]
   #32 /lib/aarch64-linux-gnu/libtevent.so.0(_tevent_loop_once+0x94) [0xffffb075ba4c]
   #33 /lib/aarch64-linux-gnu/libtevent.so.0(tevent_common_loop_wait+0x20) [0xffffb075bcc8]
   #34 /lib/aarch64-linux-gnu/libtevent.so.0(+0xa6a4) [0xffffb07606a4]
   #35 /usr/sbin/smbd(main+0x1970) [0xaaaaabc482f0]
   #36 /lib/aarch64-linux-gnu/libc.so.6(__libc_start_main+0xe8) [0xffffb05d7090]
   #37 /usr/sbin/smbd(+0x85ec) [0xaaaaabc485ec]
[2020/11/08 18:27:40.957516,  0] ../../source3/lib/util.c:836(smb_panic_s3)
  smb_panic(): calling panic action [/usr/share/samba/panic-action 3682]
[2020/11/08 18:27:40.967186,  0] ../../source3/lib/util.c:843(smb_panic_s3)
  smb_panic(): action returned status 0
[2020/11/08 18:27:40.967539,  0] ../../source3/lib/dumpcore.c:315(dump_core)
  dumping core in /var/log/samba/cores/smbd

 

 

Link to comment
Share on other sites

On 11/8/2020 at 9:32 PM, 5kft said:

 

I actually tried both - Debian works fine (as you noted), but Focal crashes

Heureka :)
Today I compiled kernel 5.10.0 (no rc) for the NanoPi Neo2 and now it works agan with my Neo2 and Ubuntu focal where it did work before only with debian buster but also with 5.10.0 rc2 - rc7

 

The sambsa-server from focal also work with the final 5.10.0 without problems ;)

System diagnosis information has been uploaded to http://ix.io/2IjU

Link to comment
Share on other sites

hdparm -t /dev/sda

*** Sandisk 1TB ssd plugged into usb3 : 600MB in 3.01 sec 199.38 MB/sec
On 11/8/2020 at 6:26 AM, guidol said:

@5kft I will take the Samba-version which armbian does deliver me ;)

for Ubuntu Focal:
2:4.11.6+dfsg-0ubuntu1.6

and for debian buster:
2:4.9.5+dfsg-5+deb10u1

its interesting - for me - that the newer version 4.11.6 does crash with kernel 5.10.0-rc2 on ubuntu focal but the older 4.9.5 has no problems using kernel 5.10.0-rc2 under debain buster...

 

Thanks for the informations/links - so I would stay with kernel 5.9.1 on ubuntu focal for now :)

 

Hi

i have done a lot of work trying to figure out why samba is very slow.

I have a 1TBssd connected to a USB3 port on an RK3119 running  Armbian 22.02.0-trunk  with bleeding edge Linux 5.15.18-rockchip64.

Here are some statistics:

 

hdparm -t /dev/sda

*** Sandisk 1TB ssd plugged into usb3 : 600MB in 3.01 sec 199.38 MB/sec

 

Yet the MXIMUM speed i get when copying a folder from Windows 10 to the samba share is 9 MB/sec?

 

here is my smb.conf:

 

Spoiler
[global]

## Browsing/Identification ###

# Change this to the workgroup/NT-domain name your Samba server will part of
    workgroup = WORKGROUP
#    netbios name =SAMBARAID
    lanman auth = no
    ntlm auth = yes
    client lanman auth = no
    wins support = yes
    local master = yes
    preferred master = yes

#### Networking ####

# The specific set of interfaces / networks to bind to
# This can be either the interface name or an IP address/netmask;
# interface names are normally preferred
;   interfaces = 127.0.0.0/8 eth0

# Only bind to the named interfaces and/or networks; you must use the
# 'interfaces' option above to use this.
# It is recommended that you enable this feature if your Samba machine is
# not protected by a firewall or is a firewall itself.  However, this
# option cannot handle dynamic or non-broadcast interfaces correctly.
;   bind interfaces only = NO

#### Debugging/Accounting ####

# This tells Samba to use a separate log file for each machine
# that connects
   log file = /media/6TBraid/log-dir/samba/log.%m

# Cap the size of the individual log files (in KiB).
   max log size = 1000

# We want Samba to only log to /var/log/samba/log.{smbd,nmbd}.
# Append syslog@1 if you want important messages to be sent to syslog too.
   logging = file

# Do something sensible when Samba crashes: mail the admin a backtrace
   panic action = /usr/share/samba/panic-action %d


####### Authentication #######

# Server role. Defines in which mode Samba will operate. Possible
# values are "standalone server", "member server", "classic primary
# domain controller", "classic backup domain controller", "active
# directory domain controller".
#
# Most people will want "standalone server" or "member server".
# Running as "active directory domain controller" will require first
# running "samba-tool domain provision" to wipe databases and create a
# new domain.
   server role = standalone server

   obey pam restrictions = yes

# This boolean parameter controls whether Samba attempts to sync the Unix
# password with the SMB password when the encrypted SMB password in the
# passdb is changed.
   unix password sync = yes

# For Unix password sync to work on a Debian GNU/Linux system, the following
# parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for
# sending the correct chat script for the passwd program in Debian Sarge).
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .

# This boolean controls whether PAM will be used for password changes
# when requested by an SMB client instead of the program listed in
# 'passwd program'. The default is 'no'.
   pam password change = yes

# This option controls how unsuccessful authentication attempts are mapped
# to anonymous connections
   map to guest = bad user

########## Domains ###########

#
# The following settings only takes effect if 'server role = classic
# primary domain controller', 'server role = classic backup domain controller'
# or 'domain logons' is set
#

# It specifies the location of the user's
# profile directory from the client point of view) The following
# required a [profiles] share to be setup on the samba server (see
# below)
;   logon path = \\%N\profiles\%U
# Another common choice is storing the profile in the user's home directory
# (this is Samba's default)
#   logon path = \\%N\%U\profile

# The following setting only takes effect if 'domain logons' is set
# It specifies the location of a user's home directory (from the client
# point of view)
;   logon drive = H:
#   logon home = \\%N\%U

# The following setting only takes effect if 'domain logons' is set
# It specifies the script to run during logon. The script must be stored
# in the [netlogon] share
# NOTE: Must be store in 'DOS' file format convention
;   logon script = logon.cmd

# This allows Unix users to be created on the domain controller via the SAMR
# RPC pipe.  The example command creates a user account with a disabled Unix
# password; please adapt to your needs
; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u

# This allows machine accounts to be created on the domain controller via the
# SAMR RPC pipe.
# The following assumes a "machines" group exists on the system
; add machine script  = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u

# This allows Unix groups to be created on the domain controller via the SAMR
# RPC pipe.
; add group script = /usr/sbin/addgroup --force-badname %g

############ Misc ############

# Using the following line enables you to customise your configuration
# on a per machine basis. The %m gets replaced with the netbios name
# of the machine that is connecting
;   include = /home/samba/etc/smb.conf.%m

# Some defaults for winbind (make sure you're not using the ranges
# for something else.)
;   idmap config * :              backend = tdb
;   idmap config * :              range   = 3000-7999
;   idmap config YOURDOMAINHERE : backend = tdb
;   idmap config YOURDOMAINHERE : range   = 100000-999999
;   template shell = /bin/bash

# Setup usershare options to enable non-root users to share folders
# with the net usershare command.

# Maximum number of usershare. 0 means that usershare is disabled.
#   usershare max shares = 100

# Allow users who've been granted usershare privileges to create
# public shares, not just authenticated ones
   usershare allow guests = yes

#======================= Share Definitions =======================
[sambaraid]
   comment = Home Directories
   browseable = yes
   path=/media/6TBraid
   workgroup=WORKGROUP
# By default, the home directories are exported read-only. Change the
# next parameter to 'no' if you want to be able to write to them.
   read only = no

# File creation mask is set to 0700 for security reasons. If you want to
# create files with group=rw permissions, set next parameter to 0775.
   create mask = 0700

# Directory creation mask is set to 0700 for security reasons. If you want to
# create dirs. with group=rw permissions, set next parameter to 0775.
   directory mask = 0700

# By default, \\server\username shares can be connected to by anyone
# with access to the samba server.
# The following parameter makes sure that only "username" can connect
# to \\server\username
# This might need tweaking when using external authentication schemes
   valid users = sambaraid

# Un-comment the following and create the netlogon directory for Domain Logons
# (you need to configure Samba to act as a domain controller too.)
;[netlogon]
;   comment = Network Logon Service
;   path = /home/samba/netlogon
;   guest ok = yes
;   read only = yes

# Un-comment the following and create the profiles directory to store
# users profiles (see the "logon path" option above)
# (you need to configure Samba to act as a domain controller too.)
# The path below should be writable by all users so that their
# profile directory may be created the first time they log on
;[profiles]
;   comment = Users profiles
;   path = /home/samba/profiles
;   guest ok = no
;   browseable = no
;   create mask = 0600
;   directory mask = 0700

[printers]
   comment = All Printers
   browseable = no
   path = /var/spool/samba
   printable = yes
   guest ok = no
   read only = yes
   create mask = 0700

# Windows clients look for this share name as a source of downloadable
# printer drivers
[print$]
   comment = Printer Drivers
   path = /var/lib/samba/printers
   browseable = yes
   read only = yes
   guest ok = no
# Uncomment to allow remote administration of Windows print drivers.
# You may need to replace 'lpadmin' with the name of the group your
# admin users are members of.
# Please note that you also need to set appropriate Unix permissions
# to the drivers directory for these users to have write rights in it
;   write list = root, @lpadmin

 

 

Anyone who could shed a light on this issue?

Thanks

 

 

Edited by TRS-80
put long output inside spoiler (and code block)
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...