Mac sends compound rename request (create+setinfo+close) which will fail with NT_STATUS_INTERNAL_ERROR if the file has a lease so the setinfo triggers a lease break and wants to go async, as we don't allow async processing in a compound chain if the request is not the last one as required by MS-SMB2. It seems Windows is processing such requests without going async, bug 13634 has a network trace (attachment 14507 [details]) where packet 3210 to 3213 show that Windows server handles this just fine with a lease break. The situation is slightly different there, as the handle that is broken is a stream of the file that is about to be renamed (where we currently would return NT_STATUS_ACCESS_DENIED, another behaviour difference). In bug 15172 we fixed a similar issue for SMB2-FLUSH, the likely fix for this one would be to use the same logic to allow the compound rename.
This bug was referenced in samba master: 4932b433ff2f1c4e603073624a5d22140acfb2ed 42e739ab62cb573d72215737027cf3c7f1fcd212 3890ac2fafc5e17919fa39542440a05ef72a3fa5 a5635791cfdb10f64bf2bf7c72c58f7591249a0d bc2d87981967bc65155ba09eb5b3e3f913bec50e efbbe8d6f80ceb6107f20486623eee949409c0ff
Created attachment 18490 [details] Patch for 4.20 and 4.21 cherry-picked from master
Pushed to autobuild-v4-{21,20}-test.
This bug was referenced in samba v4-20-test: 6c4a0272e70db075943732f7caf750d08c45b9de 7e5019e845ad9f2405b4d47ca6a2d34a439db6d2 00fb1d0fe222fec3e68c3d7c25d6723efa862c51 9cdfb755b7a0111e5853ec6fd940c82163fa8bf5 ebf4b30d087b20c6f1e1547005ef9c1c452772f4 c9581976a4ef54fd3a522f6b6290c789d5d6dc56
This bug was referenced in samba v4-21-test: 52c3f27061000572d051506ca4878d2e3c5b463c 52b1c6aba35a7bb4939c3f99b7ddf09bf7435a02 ebe5e4c34994be1601ec707c8f80ca129770d07d b8a543f2ccb9af5765ec5bee8ea16f5f439267d9 4eaf7b8b8558c7ca08d557940b1e287ada787246 e47866ae948fef128627583ffe58a758cc264ca4
Closing out bug report. Thanks!
This bug was referenced in samba v4-21-stable (Release samba-4.21.3): 52c3f27061000572d051506ca4878d2e3c5b463c 52b1c6aba35a7bb4939c3f99b7ddf09bf7435a02 ebe5e4c34994be1601ec707c8f80ca129770d07d b8a543f2ccb9af5765ec5bee8ea16f5f439267d9 4eaf7b8b8558c7ca08d557940b1e287ada787246 e47866ae948fef128627583ffe58a758cc264ca4
This bug was referenced in samba v4-20-stable (Release samba-4.20.7): 6c4a0272e70db075943732f7caf750d08c45b9de 7e5019e845ad9f2405b4d47ca6a2d34a439db6d2 00fb1d0fe222fec3e68c3d7c25d6723efa862c51 9cdfb755b7a0111e5853ec6fd940c82163fa8bf5 ebf4b30d087b20c6f1e1547005ef9c1c452772f4 c9581976a4ef54fd3a522f6b6290c789d5d6dc56