Connecting to the root of another Mac via SMB3 protocol results in client hanging indefinitely at shutdown or restart

Originator:luke.hamburg
Number:rdar://27656700 Date Originated:8/2/2016
Status:Open Resolved:
Product:macOS Product Version:10.12.1
Classification:Bug Reproducible:Always
 
Summary:
I am experiencing a bug that causes an endless spinning / spinner hang at restart or shut down if I have EVER connected to another Mac via SMB (cmd+K, smb://foo/bar) during that session

▪︎ The critical difference seems to be SMB3.0 -- SMB2 or CIFS mounts do not trigger the bug

▪︎ If you simply CONNECT but do not actually attach to any shares, the bug will not manifest

▪︎ Disconnecting the share before restarting does NOT fix the problem

▪︎ Starting up in SAFE MODE (holding shift) does NOT avoid the problem

Steps to Reproduce:
1. Connect from Mac1 (running ElCap 10.11.x) to Mac2 (also running ElCap 10.11.x) via smb://mac2/share

2. Authenticate as a user on Mac2 that has permissions to the "root" of the hard drive

3. Mount the root hard drive

4. Browse to the /Applications folder of Mac2 (from the Mac1 client). The Finder will "spin" for a while while all of these files are enumerated. Wait for the list of app icons to appear.

5. Try to restart Mac1


Expected Results:
Mac should restart cleanly


Actual Results:
Screen turns black with a white "spinner" in the middle, which will stay there until the end of time. I have left it there for 8+ hours (overnight) and it never stops. The only way out at this point it to hold down the power button until the Mac shuts off.  This can potentially corrupt the filesystem. NEW in 10.12.x: Sometimes the "spinner" does not appear and you are simply left on a black screen forever (hang).


Version:
Tested & reproduced with OS X 10.11.1, 10.11.2, 10.11.3, 10.11.4, 10.11.5, 10.11.6, 10.12, and 10.12.1


Notes:
I have attached some packet captures that were taken during this hang event as requested by Apple Support on the previous ticket #23684301


Configuration:
I have other SMB3.0 servers (Synology NAS, Windows 2012 server) and connecting to those does NOT cause the bug to trigger. It only seems to happen when connecting to another MAC.  I even reproduced this in a Parallels Virtual Machine -- 100% CLEAN INSTALL of 10.11.6 not a single thing done to it.

Comments

Force SMB2

Still using El Capitan in our environment with El Capitan Server running on a MacPro. We're trying to switch to SMB cause Photoshop CC's ACL's are broken in AFP. Also having issues with Macs not shutting down. We tried using nsmb.conf file on the clients with this configuration - [default] smb_neg=smb2_only Which forces the connection to SMB2.1 (you can check that using smbutil statshares -a). Seems like SMB3 adds a layer of encryption to the connection which was not in SMB2. Anyway - we still experience shut down hangs like that. So I'm not sure it's only SMB3. BTW - we have shares from a Fiber storage and users don't connect to the root of it. So this is a huge problem - were probably going to roll back to Afp.

Asleep at Apple

10.12.1 (16B2555) has been released. As expected, I installed it on my 2 Macs and it hasn't helped this bug at all. Still bad as ever. I updated the radar and my bugreport with the new info. Not that anyone is listening.

By luke.hamburg at Oct. 25, 2016, 5:23 a.m. (reply...)

10.12 (16A323) - GM seed - bug has not been touched

I have been trying to get Apple to notice this bug all the way through the beta cycle but they have not even so much as commented on it. Sad to see that even with the "final" version this bug is still there and as bas as ever.

By luke.hamburg at Sept. 18, 2016, 9:25 p.m. (reply...)

Guess what? DP8 has not fixed it.

I know you must be shocked, but DP8 still hasn't fixed this bug. I have been trying to get someone's attention at Apple but so far I haven't even received a single response to my bugreport.

By luke.hamburg at Sept. 5, 2016, 12:41 a.m. (reply...)

DP7 - no change

Updated to 10.12 beta 7 (16A304a) and the bug is still present.

By luke.hamburg at Aug. 23, 2016, 2:57 a.m. (reply...)

Still bugged - DP6

Updated to 10.12 DP6 (16A294a) - still bugged. Updated ticket with Apple. Still have not received a response from them.

By luke.hamburg at Aug. 17, 2016, 12:35 p.m. (reply...)

DP5 too

Updated to 10.12 DP5 (16A286a) - bug still exists!

(I have added this to my official bugreport with Apple. No response as of yet)

By luke.hamburg at Aug. 13, 2016, 2:33 p.m. (reply...)

Also affects macOS Sierra!

Installed macOS Sierra 10.12 DP4 (16A239m) to see if there was any change with this bug (there isn't). It still hangs exactly the same way.

By luke.hamburg at Aug. 13, 2016, 2:31 p.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!