Trying to resolve kernel-panic on SMB timeout

I've noticed that when an SMB link stalls, in a scenario such as a time machine network backup, due to any cause (NAS disk or network sleep, Wi-Fi roam/drop), in-flight SMB I/O blocks uninterruptibly instead of completing or returning an error. This unfortunately leaves APFS with outstanding I/O against a backing store that will neither finish nor fail.

This results in any sort of network stall turning into a kernel panic, since nothing in the I/O path enforces a timeout or error return. I've experienced this since Sequoia, and is still present in Golden Gate.

I'm sure if this is the best place to post this, but I have not been able to find a workaround to-date to prevent this from consistently happening. When I open my MacBook in the morning there's a 50/50 chance that it kernel panicked overnight.

I also filed a feedback (FB24460131), but have heard no response.

I’m not sure if this is the best place to post this, but I have not been able to find a workaround to date to prevent this from consistently happening.

What you're looking for is the "soft" option to mount_smbfs ("man mount_smbfs"):

soft    Make the mount soft. Fail file system calls after a number of seconds.

If you want to tweak things, the exact time is controlled through nsmb.conf (the smb config file). Searching for "mount_smbfs soft nsmb.conf timeout" should get you to guidance.

__
Kevin Elliott
DTS Engineer, CoreOS/Hardware

Trying to resolve kernel-panic on SMB timeout
 
 
Q