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