SMB read hangs on Mac Big Sur
There have been several reports of problems with accessing illumos SMB shares from MacOS Big Sur, on both Intel and M1 macbooks.
The symptom is that the reading application (often Finder) hangs and there is a constant stream of network traffic between the client and server, with the client continually attempting to read data at the end of the file offset. The only way to stop it is to turn the network off and on again.
This is an example of the repeating pattern - this request and response pair just keeps happening.
Read Request (0x08) StructureSize: 0x0031 0000 0000 0011 000. = Fixed Part Length: 24 .... .... .... ...1 = Dynamic Part: True Padding: 0x00 Flags: 0x00 .... ...0 = Unbuffered: Client is NOT asking for UNBUFFERED read .... ..0. = Compressed: Client is NOT asking for COMPRESSED data Read Length: 40960 File Offset: 85438464 GUID handle File: 13DC7E10-1408-59A1-AE88-85AF27546D28.sparsebundle\bands\3 File Id: d65cc408-01e8-0000-2100-000000000000 [Frame handle opened: 350910] Min Count: 1 Channel: None (0x00000000) Remaining Bytes: 0 Blob Offset: 0x00000000 Blob Length: 0 Channel Info Blob: NO DATA Read Response (0x08) StructureSize: 0x0011 0000 0000 0001 000. = Fixed Part Length: 8 .... .... .... ...1 = Dynamic Part: True Data Offset: 0x0050 Read Length: 0 Read Remaining: 0 Reserved: 00000000 Read Data: <MISSING>
Updated by Gordon Ross 5 months ago
- Status changed from New to In Progress
- Assignee set to Gordon Ross
What's actually shown in the network capture is that MacOS "Big Sur" repeatedly sends
SMB2 read requests at an offset matching the end of file, specifying a "Minimum Count" of one,
and the native SMB server repeatedly returns success with a zero length result.
According to the MS-SMB2 spec. section 188.8.131.52 that's not quite right:
[MS-SMB2] If the read returns fewer bytes than specified by
the MinimumCount field of the request, the server MUST fail
the request with STATUS_END_OF_FILE
Thanks to Matt Barden for noticing that part of the specification and
the fact that the mac was sending Minimum Count > 0.
Updated by Electric Monk 5 months ago
- Status changed from In Progress to Closed
- % Done changed from 0 to 100
commit 4d2aba2f17eed4643aa996841698226ff2673205 Author: Gordon Ross <email@example.com> Date: 2020-11-27T20:34:32.000Z 13330 SMB read hangs on Mac Big Sur Reviewed by: Robert Mustacchi <firstname.lastname@example.org> Reviewed by: Paul Winder <email@example.com> Reviewed by: Andy Fiddaman <firstname.lastname@example.org> Reviewed by: Matt Barden <email@example.com> Approved by: Richard Lowe <firstname.lastname@example.org>