Bug 13698 - Mac OS X SMB2 implmenetation sees Input/output error or Resource temporarily unavailable and drops connection
Mac OS X SMB2 implmenetation sees Input/output error or Resource temporarily ...
Status: NEW
Product: Samba 4.1 and newer
Classification: Unclassified
Component: File services
unspecified
All All
: P5 normal
: ---
Assigned To: Samba QA Contact
Samba QA Contact
:
Depends on: 13796
Blocks:
  Show dependency treegraph
 
Reported: 2018-11-30 15:51 UTC by Richard Sharpe
Modified: 2019-04-15 13:57 UTC (History)
3 users (show)

See Also:


Attachments
First part of capture containing the issue (4.88 MB, application/gzip)
2018-11-30 15:53 UTC, Richard Sharpe
no flags Details
Second part (4.88 MB, application/octet-stream)
2018-11-30 15:54 UTC, Richard Sharpe
no flags Details
Third part (4.88 MB, application/octet-stream)
2018-11-30 15:55 UTC, Richard Sharpe
no flags Details
fourth part (4.88 MB, application/octet-stream)
2018-11-30 15:56 UTC, Richard Sharpe
no flags Details
Fifth part (4.88 MB, application/octet-stream)
2018-11-30 15:56 UTC, Richard Sharpe
no flags Details
Sixth and last part (2.61 MB, application/octet-stream)
2018-11-30 15:57 UTC, Richard Sharpe
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Sharpe 2018-11-30 15:51:49 UTC
I have seen several complaints that applications running on Mac OS X will fail with errors like "Input/output Error" or "Resource temporarily unavailable".

Often when that happens we also see an error in the Samba log like:

[2018/10/02 09:22:29.926391,  0] ../source3/smbd/smb2_server.c:625(smb2_validate_sequence_number)
  smb2_validate_sequence_number: bad message_id 4047 (sequence id 4047) (granted = 8, low = 1999, range = 2048)

After examining the code it seemed like some message id were not being used by the Mac.

Yesterday, with the help of a Cubro EX2+, I finally got a complete capture that demonstrates that Mac OS X is incorrectly setting the message ID on a Notify request when it falls in the middle of a bunch of other requests.

I have reported the issue to Apple and they will look at it soon.

Attached is the capture file. It is in six segments that you will have to put back together. In the attached file, look for msg id == 4169 and notice that the next one used is 4193, which is erroneous. (smb2.msg_id == 4169).

I am filing it so others can be aware of the issue
When Apple fixes the problem we can close this bug report.
Comment 1 Richard Sharpe 2018-11-30 15:53:40 UTC
Created attachment 14705 [details]
First part of capture containing the issue
Comment 2 Richard Sharpe 2018-11-30 15:54:14 UTC
Created attachment 14706 [details]
Second part
Comment 3 Richard Sharpe 2018-11-30 15:55:02 UTC
Created attachment 14707 [details]
Third part
Comment 4 Richard Sharpe 2018-11-30 15:56:08 UTC
Created attachment 14708 [details]
fourth part
Comment 5 Richard Sharpe 2018-11-30 15:56:40 UTC
Created attachment 14709 [details]
Fifth part
Comment 6 Richard Sharpe 2018-11-30 15:57:08 UTC
Created attachment 14710 [details]
Sixth and last part
Comment 7 Richard Sharpe 2018-11-30 15:59:50 UTC
The actual problem seems to be that Mac OS X has sent out a Write request with Msg ID 4169 of size 262144, which should consume 4 message IDs/sequence numbers.

The next request is a Notify request on msg ID 4193, which is 24 beyond 4169.

Since Samba did not see 4173, it is still waiting for 4173 and Samba stops issuing credits which prevents the client from sending any more requests.
Comment 8 Janusz Baranek 2019-01-23 00:28:16 UTC
Richard,
Could you state the versions of MacOS in which you encountered the problem?
Thanks,
Janusz
Comment 9 Stefan Metzmacher 2019-04-15 13:57:06 UTC
The patches on bug #13796 should fix this...