Page 1 of 1

[Help] SMB loses connection and hangs other SMB host

Posted: 14 Nov 2026, 06:00
by hmhcho
I am seeing two problems.

1. Sometimes, during multi-GB transfers to TNAS from a Windows 10 host, the TNAS mapped network drive will become unresponsive. Disconnecting and reconnecting the drive has no effect. Accessing the drive directly via URI has no effect. However, I can access TNAS from another machine, so it is alive. SMB 1.0 is disabled on the Windows machine. Rebooting the Windows machine does not fix the problem. The only way to recover is to reboot the TNAS. Then everything works again.

2. Same Windows machine. I have another Windows 10 share mapped as a network drive. Dragging files from the mapped drive to TNAS causes File Explorer on the Windows share machine to hang. TNAS continues to work. I have to reboot the share machine to recover.

I have to say, TNAS is the most unreliable NAS SMB system I've ever used. I have Synology, Netgear, ASUS, and D-Link NAS's on my network. None of them have given a single SMB issue.

Re: [Help] SMB loses connection and hangs other SMB host

Posted: 14 Nov 2026, 07:22
by MikeZhang
hmhcho wrote: ↑14 Nov 2026, 06:00
Thanks for the detailed write-up — separating those two symptoms is very helpful. Let me address both, and outline how we can isolate the root cause.

Case 1 (only this PC is locked out, others fine, only a NAS reboot clears it): This strongly points to an SMB session held on the NAS side, rather than a network issue or the NAS being down.

Case 2 (TNAS stays healthy while the source PC's Explorer hangs): This is a different layer—the Windows redirector is waiting for a response from the destination.

We cannot confirm the root cause at this moment, as the diagnostic evidence is lost once the NAS is rebooted. Next time it hangs, before restarting anything, please collect the following data:

On the TNAS terminal app:

smbstatus -b -l -p
dmesg | tail -50
tail -100 /var/log/samba/log.smbd

On the stuck Windows machine (PowerShell):

Get-SmbConnection

In parallel, please try this one reversible test (requires a single transfer):
Back up /etc/samba/smb-extend.conf, then under the [Global] section, add the following parameters:

durable handles = no
smb2 leases = no

Restart the smbd service and repeat the same copy. If the transfer completes cleanly, we can isolate the trigger and escalate a concrete case to our engineering team.
(Note: To roll back, restore the .bak file and restart smbd. Please treat this as a temporary test rather than a permanent fix, as TOS may regenerate this file during future upgrades.)

Finally, to help us narrow down which layer to investigate first, could you please provide:

TNAS model
Exact TOS version
Filesystem type (BTRFS?)
Is the recycle bin enabled on that share?
Are you transferring a single large file or many small files?

Re: [Help] SMB loses connection and hangs other SMB host

Posted: 17 Nov 2026, 01:58
by hmhcho
TNAS: F6-424
TOS: 7.0.1422
FS: BTRFS (default)
No Recycle Bin
Multi-file transfer ~50GB

Re: [Help] SMB loses connection and hangs other SMB host

Posted: 18 Nov 2026, 02:02
by EriChan
hmhcho wrote: ↑17 Nov 2026, 01:58
Knowing that this occurs on an F6-424 running TOS 7.0.1422 (BTRFS) during a ~50GB multi-file transfer narrows down the scope considerably. Unlike a single large sequential file, transferring thousands of files in bulk generates heavy metadata operations alongside rapid SMB2 lease/lock requests, which aligns closely with the session lockup and Explorer freeze you described.

We have logged this exact hardware and TOS 7.0.1422 configuration so our lab can attempt to reproduce the issue in-house. In the meantime, two quick items will help us isolate the root cause even faster:
  • Additional process check during the hang: Whenever you run the durable handles = no and smb2 leases = no test mentioned above—or capture the logs the next time it freezes—please also run this command on the TNAS terminal before rebooting:

    Code: Select all

    ps -eo pid,stat,comm,wchan | grep smbd
    (This helps us determine immediately whether the smbd worker is stuck waiting on network/Samba locks or blocked on BTRFS disk I/O.)
  • Network setup on F6-424: Are you using a single 2.5GbE connection, link aggregation (Bonding), or SMB Multi-Channel between the Windows 10 PC and the F6-424?
We appreciate your patience and look forward to your test results.

Re: [Help] SMB loses connection and hangs other SMB host

Posted: 22 Nov 2026, 00:04
by hmhcho
SMB seems to be stuck now.

2700 Ss smbd do_epoll_wait
2702 S smbd-notifyd do_epoll_wait
7392 S smbd wait_woken
8780 S smbd do_epoll_wait


Using a single 2.5Gbps connection.

I tried killing process 7392. That instantly unfroze the File Explorer window. However, I still cannot do any file transfers. When I do, another wait_woken thread appears, and File Explorer freezes again.

Re: [Help] SMB loses connection and hangs other SMB host

Posted: 22 Nov 2026, 00:08
by hmhcho
smbstatus -b -l -p
[2026/11/21 08:04:40, 0] ../../lib/util/debug.c:1100(reopen_one_log)
reopen_one_log: Unable to open new log file '-p/log.smbstatus': No such file or directory

Samba version 4.15.13-Ubuntu
PID Username Group Machine Protocol Version Encryption Signing
----------------------------------------------------------------------------------------------------------------------------------------
8780 hcho hcho fe80::9ff1:721c:3e36:9c34 (ipv6:fe80::9ff1:721c:3e36:9c34:59888) SMB3_11 - partial(AES-128-CMAC)
7392 hcho hcho fe80::9ff1:721c:3e36:9c34 (ipv6:fe80::9ff1:721c:3e36:9c34:53943) SMB3_11 - partial(AES-128-CMAC)

dmesg | tail -50
[ 22.529561] Realtek Internal NBASE-T PHY r8169-0-200:00: attached PHY driver (mii_bus:phy_addr=r8169-0-200:00, irq=MAC)
[ 22.705284] r8169 0000:02:00.0 eth1: Link is Down
[ 22.736551] Realtek Internal NBASE-T PHY r8169-0-100:00: attached PHY driver (mii_bus:phy_addr=r8169-0-100:00, irq=MAC)
[ 22.907733] r8169 0000:01:00.0 eth0: Link is Down
[ 22.947999] process '/usr/sbin/netplugd' started with executable stack
[ 23.147285] IPMI message handler: version 39.2
[ 23.154568] ipmi device interface
[ 23.168279] Loading iSCSI transport class v2.0-870.
[ 23.169618] ipmi_si: IPMI System Interface driver
[ 23.169689] ipmi_si: Unable to find any System Interface(s)
[ 23.202389] PPP generic driver version 2.4.2
[ 23.204906] NET: Registered PF_PPPOX protocol family
[ 23.219850] l2tp_core: L2TP core driver, V2.0
[ 23.222178] l2tp_netlink: L2TP netlink interface
[ 23.224876] l2tp_ppp: PPPoL2TP kernel driver, V2.0
[ 25.733755] r8169 0000:02:00.0 eth1: Link is Up - 1Gbps/Full - flow control rx/tx
[ 30.396715] block device autoloading is deprecated and will be removed.
[ 30.396830] md: md8 stopped.
[ 30.416014] md/raid1:md8: active with 1 out of 2 mirrors
[ 30.420978] md8: detected capacity change from 0 to 3995648
[ 30.502296] md: recover of RAID array md8
[ 30.503039] md: md8: recover done.
[ 30.779306] Adding 1997820k swap on /dev/md8. Priority:-2 extents:1 across:1997820k
[ 30.835198] block device autoloading is deprecated and will be removed.
[ 30.835300] md: md0 stopped.
[ 30.921528] raid6: avx2x4 gen() 24312 MB/s
[ 30.938527] raid6: avx2x2 gen() 25398 MB/s
[ 30.955527] raid6: avx2x1 gen() 21458 MB/s
[ 30.955528] raid6: using algorithm avx2x2 gen() 25398 MB/s
[ 30.972527] raid6: .... xor() 14758 MB/s, rmw enabled
[ 30.972528] raid6: using avx2x2 recovery algorithm
[ 30.975998] xor: automatically using best checksumming function avx
[ 30.982840] async_tx: api initialized (async)
[ 31.015430] md/raid:md0: device sdb4 operational as raid disk 0
[ 31.015436] md/raid:md0: device sdf4 operational as raid disk 5
[ 31.015437] md/raid:md0: device sde4 operational as raid disk 4
[ 31.015438] md/raid:md0: device sdd4 operational as raid disk 3
[ 31.015439] md/raid:md0: device sda4 operational as raid disk 2
[ 31.015440] md/raid:md0: device sdc4 operational as raid disk 1
[ 31.017286] md/raid:md0: raid level 5 active with 6 out of 6 devices, algorithm 2
[ 31.017322] md0: detected capacity change from 0 to 156145745920
[ 31.255762] device-mapper: core: CONFIG_IMA_DISABLE_HTABLE is disabled. Duplicate IMA measurements will not be recorded in the IMA log.
[ 31.255811] device-mapper: uevent: version 1.0.3
[ 31.255906] device-mapper: ioctl: 4.48.0-ioctl (2023-03-01) initialised: [email protected]
[ 31.612220] Btrfs loaded, zoned=yes, fsverity=yes
[ 32.206810] BTRFS: device label TOS_VOL_20260625 devid 1 transid 12670 /dev/mapper/vg0-lv0 (253:0) scanned by mount (1954)
[ 32.207065] BTRFS info (device dm-0): first mount of filesystem 91d6a62f-987d-4026-b71a-30de3c245ce9
[ 32.207083] BTRFS info (device dm-0): using crc32c (crc32c-intel) checksum algorithm
[ 41.780314] BTRFS info (device dm-0): enabling free space tree
[ 983.121856] smbd(7392): Attempt to set a LOCK_MAND lock via flock(2). This support has been removed and the request ignored.

Re: [Help] SMB loses connection and hangs other SMB host

Posted: 22 Nov 2026, 13:51
by hmhcho
The behavior has deteriorated now. I cannot copy a 1.5GB file to the NAS at all, even after rebooting the Win10 PC and the TNAS. The copy hangs about 2/3 of the way through. Once it hangs, connection with the NAS becomes unstable. However, I can still access it from other machines, another Win10 machine and MacOS machines.

I tried some configuration changes:
- setting Win10 LAN to Private
- syncing TZ on the TNAS
- disable durable SMB handles on TNAS
- disable SMB2 lease on TNAS

I also tried removing the TNAS connection credentials on the Win10 machine.

Rebooted everything after changes. But, still the same behavior: unable to copy the file.

It seems to be on that one machine. However, that machine sees the heaviest use of the TNAS. So, I cannot be sure that it would not happen on any of the other machines.

Update: I tried doing the copy from the other Win10 machine. It doesn't work, either. I think there could be a problem with my TNAS.

Re: [Help] SMB loses connection and hangs other SMB host

Posted: 22 Nov 2026, 20:47
by TMzethar
At this point, it does not appear to be an issue related to the hard drive, kernel I/O, network card, disk, or OOM. We have narrowed down the scope significantly.
Regarding the other instance where the share froze, the Windows redirector (MUP) serializes operations on mapped drives; if a mapped server fails to respond, it appears as though “other SMB hosts have also frozen.”
You can now revert the previously modified test settings to their default states.
To determine the root cause of the problem, we need some additional information.

Code: Select all

cat /proc/<pid>/stack
cat /proc/locks
smbcontrol smbd debug 10
/var/log/samba/log.*
ss -tinp ‘sport = :445’
Before copying test, run this.
And after copying test is complete, run again:

Code: Select all

dmesg | grep -c ‘LOCK_MAND’

Re: [Help] SMB loses connection and hangs other SMB host

Posted: 22 Nov 2026, 23:28
by hmhcho
TOS version is now 7.0.1536. There have been a few auto-updates since my first post. Problems started on Friday, Nov 20.

I tried copying the file over scp. That exhibits problems, too. After about 700MB, the transfer slows to a crawl -- less than 1MB/s. After about 1GB, the transfer stalls.

This is a different problem than before, I think. This one, SMB connection is not freezing. Instead, there seems to be a size limit to transfers, above which, transfers stall. I am able to access still access the NAS.

ps does not show a frozen smb thread.

Re: [Help] SMB loses connection and hangs other SMB host

Posted: 23 Nov 2026, 00:00
by hmhcho
I retried the SMB copy. This is the stack dump from the hung copy thread:

LordRuler-0@sazed:/var/log/samba# ps -eo pid,stat,comm,wchan | grep smbd
91384 Ss smbd do_epoll_wait
91386 S smbd-notifyd do_epoll_wait
94133 S smbd wait_woken
96972 S smbd do_epoll_wait
LordRuler-0@sazed:/var/log/samba# cat /proc/94133/stack
[<0>] wait_woken+0x52/0x60
[<0>] sk_wait_data+0x179/0x190
[<0>] tcp_recvmsg_locked+0x236/0xa30
[<0>] tcp_recvmsg+0x87/0x1f0
[<0>] inet6_recvmsg+0x56/0x130
[<0>] sock_recvmsg+0x57/0xd0
[<0>] bpf_trampoline_6442480643+0x41/0xe7
[<0>] sock_recvmsg+0x9/0xd0
[<0>] sock_read_iter+0x93/0x100
[<0>] vfs_read+0x335/0x370
[<0>] ksys_read+0xbb/0xf0
[<0>] do_syscall_64+0x82/0x190
[<0>] entry_SYSCALL_64_after_hwframe+0x76/0x7e

And the tail of log.smbd
smbXsrv_client_create: client_guid[00000000-0000-0000-0000-000000000000] created
[2026/11/22 08:58:48.939632, 1, pid=98108, effective(0, 0), real(0, 0), class=rpc_parse] ../../librpc/ndr/ndr.c:435(ndr_print_debug)
&client_blob: struct smbXsrv_clientB
version : SMBXSRV_VERSION_0 (0)
reserved : 0x00000000 (0)
info : union smbXsrv_clientU(case 0)
info0 : *
info0: struct smbXsrv_client
table : *
raw_ev_ctx : *
msg_ctx : *
global : *
global: struct smbXsrv_client_global0
db_rec : NULL
server_id: struct server_id
pid : 0x0000000000017f3c (98108)
task_id : 0x00000000 (0)
vnn : 0xffffffff (4294967295)
unique_id : 0xa243d592bc2590d6 (-6754320189927092010)
local_address : NULL
remote_address : NULL
remote_name : NULL
initial_connect_time : Sun Nov 22 08:58:49 2026 MST
client_guid : 00000000-0000-0000-0000-000000000000
stored : 0x00 (0)
sconn : NULL
session_table : NULL
tcon_table : NULL
open_table : NULL
connections : NULL
server_multi_channel_enabled: 0x00 (0)
next_channel_id : 0x0000000000000000 (0)
connection_pass_subreq : NULL
pending_breaks : NULL
[2026/11/22 08:58:48.939742, 5, pid=98108, effective(0, 0), real(0, 0)] ../../lib/util/util_net.c:1021(print_socket_options)
socket options: SO_KEEPALIVE=1, SO_REUSEADDR=1, SO_BROADCAST=0, TCP_NODELAY=1, TCP_KEEPCNT=9, TCP_KEEPIDLE=7200, TCP_KEEPINTVL=75, IPTOS_LOWDELAY=16, IPTOS_THROUGHPUT=16, SO_REUSEPORT=1, SO_SNDBUF=87040, SO_RCVBUF=131072, SO_SNDLOWAT=1, SO_RCVLOWAT=1, SO_SNDTIMEO=0, SO_RCVTIMEO=0, TCP_QUICKACK=1, TCP_DEFER_ACCEPT=0, TCP_USER_TIMEOUT=0
[2026/11/22 08:58:48.939777, 5, pid=98108, effective(0, 0), real(0, 0)] ../../lib/util/util_net.c:1021(print_socket_options)
socket options: SO_KEEPALIVE=1, SO_REUSEADDR=1, SO_BROADCAST=0, TCP_NODELAY=1, TCP_KEEPCNT=9, TCP_KEEPIDLE=7200, TCP_KEEPINTVL=75, IPTOS_LOWDELAY=16, IPTOS_THROUGHPUT=16, SO_REUSEPORT=1, SO_SNDBUF=87040, SO_RCVBUF=131072, SO_SNDLOWAT=1, SO_RCVLOWAT=1, SO_SNDTIMEO=0, SO_RCVTIMEO=0, TCP_QUICKACK=1, TCP_DEFER_ACCEPT=0, TCP_USER_TIMEOUT=0
[2026/11/22 08:58:48.939827, 3, pid=98108, effective(0, 0), real(0, 0)] ../../lib/util/access.c:372(allow_access)
Allowed connection from fe80::9ff1:721c:3e36:9c34 (fe80::9ff1:721c:3e36:9c34)
[2026/11/22 08:58:48.939838, 10, pid=98108, effective(0, 0), real(0, 0)] ../../source3/smbd/process.c:3932(smbd_add_connection)
Connection allowed from ipv6:fe80::9ff1:721c:3e36:9c34:63969 to ipv6:fe80::6ebf:b5ff:fe04:1e53:445
[2026/11/22 08:58:48.940062, 3] ../../source3/smbd/oplock.c:1428(init_oplocks)
init_oplocks: initializing messages.