Posted: Sat Mar 07, 2020 3:04 Post subject: SAMBA causing reboot
I am experiencing router reboots when accessing SAMBA shares. There are no errors connecting from clients.
It connects and enumerates shares, but after navigating through a few folders or performing an operation like creating a new text file or deleting a file the router reboots. It is more reproduceable after router has been running for a couple of hours. Not so reproduceable directly after reboot.
Apologies if this has been covered in other build notes, but I am struggling to find similar notes where the router reboots after enumerating a share.
Have tried resetting back to defaults after flash and reconfiguring. Same issue exists.
WRT1900ACv2 first flash with DD-WRT was build 42557.
Currently running build 42617.
SMB v1 is enabled on Win 10.
Router running in LAN bridge mode.
Only services enabled are Syslog, Samba, DLNA & SSH very basic config using defaults for Wifi.
Samba = Enabled
Workgroup=WORKGROUP
Minimum Protocol=2.10
Maximum Protocol=3.11
Encrypion=Off
One Share active=/
No users configured, public access.
Core USB=Enabled
USB Printer=Disabled
Automatic Drive Mount - everything mounts without issue
sda2 EXT4 /JFFS
sda3 EXT4 /OPT
sda4 EXT4 /SWAP
sda1 NTFS /Media
No errors in syslog for drive mount except for ERROR: Can't open `/tmp/smb.db': No such file or directory
Is there a way to pipe kmesg or messages to the USB drive to capture the error when reboot occurs?
as per suggestion KP I have set up a user. Still seems to be problematic. configured with a single user and disabled anon access, I am now unable to access the share.
smb.conf looks like:
8<---
security = user
workgroup = WORKGROUP
bind interfaces only = yes
guest account = nobody
map to guest = Bad User
smb passwd file = /var/samba/smbpasswd
private dir = /var/samba
passdb backend = smbpasswd
log file = /var/smbd.log
lpq cache time = 30
min protocol = SMB2_10
max protocol = SMB3_11
printing = none
load printers = No
usershare allow guests = Yes
[Lounge_NAS]
comment = Lounge_NAS
path = /mnt/MyBook//
read only = no
guest ok = no
valid users = root
force user = root
------->8
What I notice is that /var/samba/smbpasswd is blank. Is there an additional step setting this up that requires smbpasswd to be run?
My config screenshot attached for samba below.
The samba daemon seems to be complaining about user db still and confirmed the file does not exist in /tmp. Have power cycled to see if it makes a difference.
Mar 7 18:01:25 ap-lounge1 kern.info kernel: [ 42.152270] sda: sda1 sda2 sda3 sda4
Mar 7 18:01:25 ap-lounge1 kern.notice kernel: [ 42.158272] sd 2:0:0:0: [sda] Attached SCSI disk
Mar 7 18:01:25 ap-lounge1 user.info : cron : daemon successfully stopped
Mar 7 18:01:25 ap-lounge1 user.info : wsdd2 : windows service discovery daemon successfully stopped
Mar 7 18:01:25 ap-lounge1 user.err wsdd2[1393]: Terminated received.
Mar 7 18:01:25 ap-lounge1 user.info wsdd2[1393]: terminating.
Mar 7 18:01:25 ap-lounge1 user.info : ksmbd.mountd : samba daemon successfully stopped
Mar 7 18:01:25 ap-lounge1 local5.err usmbd: [usmbd-manager/1396]: ERROR: WARNING: child process exited abnormally: 1397
Mar 7 18:01:25 ap-lounge1 user.info : minidlna : DLNA Media Server successfully stopped
Mar 7 18:01:25 ap-lounge1 kern.info kernel: [ 42.219483] ksmbd: shutting down ksmbd
Mar 7 18:01:28 ap-lounge1 kern.info kernel: [ 45.601372] fuse init (API version 7.26)
Mar 7 18:01:28 ap-lounge1 kern.warn kernel: [ 45.751186] EXT4-fs (sda2): Ignoring removed nobh option
Mar 7 18:01:28 ap-lounge1 kern.warn kernel: [ 45.751461] EXT4-fs (sda3): Ignoring removed nobh option
Mar 7 18:01:28 ap-lounge1 kern.warn kernel: [ 45.751587] EXT4-fs (sda4): Ignoring removed nobh option
Mar 7 18:01:28 ap-lounge1 kern.info kernel: [ 45.766653] EXT4-fs (sda3): barriers disabled
Mar 7 18:01:28 ap-lounge1 kern.info kernel: [ 45.767324] EXT4-fs (sda4): barriers disabled
Mar 7 18:01:28 ap-lounge1 kern.info kernel: [ 45.807736] EXT4-fs (sda3): mounted filesystem with ordered data mode. Opts: init_itable=0,nobarrier,nobh,barrier=0
Mar 7 18:01:28 ap-lounge1 kern.info kernel: [ 45.818497] EXT4-fs (sda4): mounted filesystem with ordered data mode. Opts: init_itable=0,nobarrier,nobh,barrier=0
Mar 7 18:01:28 ap-lounge1 kern.info kernel: [ 45.831350] EXT4-fs (sda2): barriers disabled
Mar 7 18:01:28 ap-lounge1 user.info : cron : daemon successfully started
Mar 7 18:01:28 ap-lounge1 user.info : minidlna : DLNA Media Server successfully started
Mar 7 18:01:28 ap-lounge1 cron.info cron[1875]: (CRON) STARTUP (fork ok)
Mar 7 18:01:28 ap-lounge1 kern.info kernel: [ 45.910466] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: init_itable=0,nobarrier,nobh,barrier=0
Mar 7 18:01:29 ap-lounge1 user.info wsdd2[1953]: starting.
Mar 7 18:01:29 ap-lounge1 user.info : smbd : samba started
Mar 7 18:01:29 ap-lounge1 local5.info usmbd: [usmbd-manager/1956]: INFO: Unlink orphaned '/tmp/usmbd.lock'
Mar 7 18:01:29 ap-lounge1 local5.err usmbd: [usmbd-worker/1957]: ERROR: Can't open `/tmp/smb.db': No such file or directory
Mar 7 18:01:29 ap-lounge1 local5.err usmbd: [usmbd-worker/1957]: ERROR: User database file does not exist. Only guest sessions (if permitted) will work.
Mar 7 18:01:29 ap-lounge1 local5.info usmbd: [usmbd-worker/1957]: INFO: Drop non-existing user `root'
I don't think you can use root as your username as it conflicts.
Thanks. I have been playing with this all day. got rid of the root user and it has cleaned up all of the error messages. still only have one user called 'user'.
Still getting reboots.
have tried redirecting syslogd / klogd to usb drive but when router stops responding it doesn't write anything to log, so I am guessing it is a kernel issue given it is a kernel module running SMB, I suspect USB becomes unavailable and is unable to write to messages.
I am open to suggestions on how to capture debug or persistent logging to get more info on this.
the cifsd tools don't appear to be installed and limit debug mode for ksmbd.
I have seen a thread between BrainSlayer and the project owner for cifsd dates January this year regarding memory corruption. Don't know if they are related?
May just have to wait.
Thanks for the tips and suggestions. at least I have solved a few error messages.
Joined: 30 May 2017 Posts: 582 Location: Rural Manitoba
Posted: Mon Mar 09, 2020 11:48 Post subject:
I may be way off base but I've had a 1900 V1 which would regularly reboot without reason. The Router is a Client/Bridge on 5Ghz with numerous cams and Sonoff(ESP8266) devices.
Over the past couple of years I have tried replacing the router, replacing the power pack, putting on a UPS, even building a special power pack, all to no avail.
Recently I was assisting someone else with connection problems on the 2.4Ghz band and through trial and error discovered that if I turned off wmm on my 2.4Ghz reboots ceased and connectivity was solid on all devices.
If you have any devices/users on 2.4Ghz you might want to have a look at their connectivity as this is where problems seem to be derived.
I realize it has nothing to do with Samba, but may be the root cause of your reboots.
If you are sending your logs out (ie PaperTrail) have a look for repeated connect/disconnects on your 2.4Ghz _________________ Starlink & DSL -> TPLink TL-R470T+
->
WRT3200acm Master WDS 5GHz 80Mhz CH 100 (+6) r55819
Ath1 2.4Ghz Disabled
99 Static Leases
ExpressVPN
WRT3200acm r55819 WDS Station 5Ghz
Ath1 AP N/G Mixed Channel 11 HT40
WRT1900Ac V1 5Ghz r55819 WDS Station
(Defective, no 2.4Ghz but 5Ghz works great)
WRT1900AC V1 5Ghz AC 80Mhz WDS Station r55819
2.4Ghz AP Ch1 HT20 Mixed
WRT1900ACS SPARE r54914
WRT1900AC SPARE r54914
WRT1900AC V1 5Ghz AC 80Mhz WDS-AP r55819
2.4Ghz AP Ch1 HT20 Mixed
WRT54G DD-WRT v3.0-r37305 micro AP CH 6 Mixed - Not in use
Recently I was assisting someone else with connection problems on the 2.4Ghz band and through trial and error discovered that if I turned off wmm on my 2.4Ghz reboots ceased and connectivity was solid on all devices.
If you have any devices/users on 2.4Ghz you might want to have a look at their connectivity as this is where problems seem to be derived.
Thanks WENED, so took your advice and have tried turning off WMM on 2.4Ghz, and have also disabled 2.4Ghz.
Still rebooting. What I have also discovered is that I have now applied the same build r42617 to a WRT1900ACSv2 in addition to the WRT1900ACv2 (sans s). The same issue occurs also with 2.4Ghz radio disabled.
It is far more consistent now, all I need to do is save a file in any folder of the share and the DD-WRT web interface becomes unavailable, SSH disconnects, then maybe 5 seconds and the router reboots. Definitely appears to be ksmbd causing a kernel issue given all the other daemons appear to die.
I also ran into the problem of rebooting the router, and apparently this is due to SAMBA.
In my case, a reboot occurs when I try to find a network drive from the network infrastructure of Explorer from Win 10.
There is another hairpin: an old WinXP Home laptop cannot connect via smb1, which is listed as minimal.
It should be added that computers with LibreELEC (read Linux) also do not connect via smb1, and there was no problem with r41986 firmware. _________________ Linksys WRT1900ACSv2
Automatically adjustable temperature, always within the range of 59-68°С.