SAMBA causing reboot

Post new topic   Reply to topic    DD-WRT Forum Index -> Marvell MVEBU based Hardware (WRT1900AC etc.)
Goto page 1, 2  Next
Author Message
alpinemudder
DD-WRT Novice


Joined: 07 Mar 2020
Posts: 9

PostPosted: Sat Mar 07, 2020 3:04    Post subject: SAMBA causing reboot Reply with quote
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?
Sponsor
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14125
Location: Texas, USA

PostPosted: Sat Mar 07, 2020 3:31    Post subject: Reply with quote
Is usb storage enabled in the webUI? Only asking because it's not listed in your post. Also, I think anonymous access to shares is problematic lately.
_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
alpinemudder
DD-WRT Novice


Joined: 07 Mar 2020
Posts: 9

PostPosted: Sat Mar 07, 2020 6:05    Post subject: Reply with quote
kernel-panic69 wrote:
Is usb storage enabled in the webUI? Only asking because it's not listed in your post. Also, I think anonymous access to shares is problematic lately.


Sorry yes USB Storage = enabled.

Good tip on anonymous access. I will put a few users in and see what happens.
alpinemudder
DD-WRT Novice


Joined: 07 Mar 2020
Posts: 9

PostPosted: Sat Mar 07, 2020 7:23    Post subject: Reply with quote
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'
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14125
Location: Texas, USA

PostPosted: Sat Mar 07, 2020 7:45    Post subject: Reply with quote
I don't think you can use root as your username as it conflicts.
_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
alpinemudder
DD-WRT Novice


Joined: 07 Mar 2020
Posts: 9

PostPosted: Sun Mar 08, 2020 10:11    Post subject: Reply with quote
kernel-panic69 wrote:
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.
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14125
Location: Texas, USA

PostPosted: Sun Mar 08, 2020 10:45    Post subject: Reply with quote
Only other suggestion I have is to upgrade to the latest public release:

https://download1.dd-wrt.com/dd-wrtv2/downloads/betas/2020/03-05-2020-r42617/linksys-wrt1900acv2/

_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
alpinemudder
DD-WRT Novice


Joined: 07 Mar 2020
Posts: 9

PostPosted: Sun Mar 08, 2020 10:52    Post subject: Reply with quote
hmm... that's the build I am running Sad

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.
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6856
Location: Romerike, Norway

PostPosted: Sun Mar 08, 2020 11:37    Post subject: Reply with quote
Username shall be the same that you login to with on the client machine.
alpinemudder
DD-WRT Novice


Joined: 07 Mar 2020
Posts: 9

PostPosted: Sun Mar 08, 2020 21:58    Post subject: Reply with quote
Per Yngve Berg wrote:
Username shall be the same that you login to with on the client machine.


Thanks. Managed to get the client connecting ok with users. KP was right, it doesn’t like root as a username.

Problem is the router reboots after client connects with ksmbd and a file operation is made, for example write or delete file.
WENED
DD-WRT Guru


Joined: 30 May 2017
Posts: 582
Location: Rural Manitoba

PostPosted: Mon Mar 09, 2020 11:48    Post subject: Reply with quote
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) r55460
Ath1 2.4Ghz Disabled
99 Static Leases
ExpressVPN

WRT3200acm r55460 WDS Station 5Ghz
Ath1 AP N/G Mixed Channel 11 HT40

WRT1900Ac V1 5Ghz r55460 WDS Station
(Defective, no 2.4Ghz but 5Ghz works great)

WRT1900AC V1 5Ghz AC 80Mhz WDS Station r55460
2.4Ghz AP Ch1 HT20 Mixed

WRT1900ACS SPARE r54914
WRT1900AC SPARE r54914
WRT1900AC V1 5Ghz AC 80Mhz WDS-AP r55460
2.4Ghz AP Ch1 HT20 Mixed

WRT54G DD-WRT v3.0-r37305 micro AP CH 6 Mixed - Not in use

3200 Master -> LAN -> 1900ACS -> WDS 5Ghz -> 1900 V1
3200 Master -> WDS -> 3200 Slave & 1900V1
alpinemudder
DD-WRT Novice


Joined: 07 Mar 2020
Posts: 9

PostPosted: Thu Mar 12, 2020 9:53    Post subject: Reply with quote
WENED wrote:

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.
PavelVD
DD-WRT User


Joined: 26 Jul 2019
Posts: 109

PostPosted: Thu Mar 12, 2020 19:13    Post subject: Reply with quote
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°С.
alpinemudder
DD-WRT Novice


Joined: 07 Mar 2020
Posts: 9

PostPosted: Sun Mar 15, 2020 7:09    Post subject: Updated to build r42681 Reply with quote
Have updated to r42681 as there was some ksmbd updates rolled into this build.

Still getting reboots on WRT1900ACSv2 and WRT1900ACv2.

Have tried with both wireless networks disabled.
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12834
Location: Netherlands

PostPosted: Sun Mar 15, 2020 16:31    Post subject: Reply with quote
Is it an NTFS partition?

It seems ksmbd has trouble with NTFS partitions, ext2/4 should be better

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
Goto page 1, 2  Next Display posts from previous:    Page 1 of 2
Post new topic   Reply to topic    DD-WRT Forum Index -> Marvell MVEBU based Hardware (WRT1900AC etc.) All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum