Reverting back to 43290 did NOT fix the problem until AFTER a cold boot! It seemed something in the memory related to NAS was not cleared after a soft reboot.
Note: I had both MiniDLNA and Samba using the same music folder. So the problem might not be Samba.
Update:
It's MiniDLNA! Accessing Samba shares in build 43320 no longer rebooted after I disabled it.
I suspected it's just the temporary/cache files of MiniDLNA...
I don't think it's MiniDLNA as I had it always disabled and reboots still occurred.
Joined: 26 Mar 2013 Posts: 1857 Location: Hung Hom, Hong Kong
Posted: Wed Jun 03, 2020 11:55 Post subject:
rnix wrote:
mwchang wrote:
It's MiniDLNA! Accessing Samba shares in build 43320 no longer rebooted after I disabled it.
I suspected it's just the temporary/cache files of MiniDLNA...
I don't think it's MiniDLNA as I had it always disabled and reboots still occurred.
Weird.... it did fix my reboot problem. And my Samba shares are on a ext4 partitions.
Are you using Transmission BT client and/or ProFTPd? For my RT-N18U, I only enabled Samba Server in the NAS tab.
Update:
I had since re-enabled MiniDLNA, and there was no reboot issue. I guess my MiniDLNA had rebuilt its metadata/cache files.
Update 2:
Well, it rebooted again. Disabling MiniDLNA and see!
Update 3:
It still rebooted if I accessed Samba shares after some idle period of not using Samba. Reverting back to build 43290 to see if the problem stayed. Mr. rnix, maybe you were correct after all.
Update 4:
It's Samba(ksmbd), not MiniDLNA! Possibly memory leaks...
_________________ Router: Asus RT-N18U (rev. A1)
Drink, Blink, Stretch! Live long and prosper! May the Force and farces be with you!
Posted: Sat Jun 06, 2020 0:41 Post subject: Confirming samba reboot issue
Router/Version: Netgear R7000
File/Kernel: Linux DD-WRT 4.4.225 #289 SMP Sun May 31 07:53:20 +04 2020 armv7l
Previous: Stock Netgear R7000_V1.0.4.18_1.1.52
Reset: Not at first, but then yes (before and after flash)
Mode/Status: Gateway / AP / NAS
Issues/Errors:
Confirming Samba reboot bug.
First time user, installed over stock Netgear firmware 1.0.4.18_1.1.52 after doing a factory reset from Netgear gui. Installed DDWRT 43320, did another factory reset from gui. Running fine as I found my way around the firmware. I used fdisk, mke2fs and mkswap through ssh to create and format ext2/swap partitions (#1 512M Opt, #2 64M swap, #3 6.4G Data) for Entware. Mounted fine, installed Entware + Transmission (DDWRT built in Transmission disabled). Ran Transmission fine, created shared folder and user fine. Access shared folder through Samba via Windows 10 machine immediately rebooted the router and partitions on usb disk were deleted (fdisk /dev/sda after reboot revealed no partitions).
Performed erase nvram, reflashed #43320, reset password to access gui, performed another erase nvram, did not use backup file. Repeated steps as above except accessed shared folder through mobile phone file manager, immediate reboot, usb partitions and data preserved.
I noted 2 ksmbd.mountd instances running but only one shared folder was setup.
The 2 instances are both referencing the same smb.db database simultaneously. Perhaps this is an issue, perhaps not.
After this, I then changed the router name in setup > basic setup > optional settings > router name and it's not being reflected (yet) without a reboot.
ps reveals
sh -c echo hard > /sys/class/ksmbd-control/kill_server
constantly running (hung?), and top showing high cpu usage.
steps:
- kill user space daemon
killall ksmbd.mountd
- kill kernel space daemon
echo hard > /sys/class/ksmbd-control/kill_server
- restart user space daemon
ksmbd.mountd
It appears to be hanging on kill_server perhaps.
Also, this is my first time using this firmware, and reporting here on the forums. Please let me know if I'm being too verbose (sometimes I try and help a little too much).
The 2 instances are both referencing the same smb.db database simultaneously. Perhaps this is an issue, perhaps not.
After this, I then changed the router name in setup > basic setup > optional settings > router name and it's not being reflected (yet) without a reboot.
ps reveals
sh -c echo hard > /sys/class/ksmbd-control/kill_server
constantly running (hung?), and top showing high cpu usage.
steps:
- kill user space daemon
killall ksmbd.mountd
- kill kernel space daemon
echo hard > /sys/class/ksmbd-control/kill_server
- restart user space daemon
ksmbd.mountd
It appears to be hanging on kill_server perhaps.
Thank you for sharing! Maybe your findings should be filed to Samba-related SVN logs....
I believe Samba was never part of DD-WRT's kernel, but just a user-land tool. So all these methods to start/stop Samba via WEBUI failed because it's no longer a user-land process.
_________________ Router: Asus RT-N18U (rev. A1)
Drink, Blink, Stretch! Live long and prosper! May the Force and farces be with you!