Created attachment 18303 [details] Contains packet traces & a synthetic client to repro the issue Scenario: 1) Client sends open1 with OpLock lease & requests for Durable Handle 2) Open1 Succeeds & Durable Handle is granted 3) Client sends another open2 for same file with OpLock lease & requests for Durable Handle 4) Open2 Succeeds & Durable Handle is granted **** Disconnect***** 5) Client Reconnects to DH granted to open1 6) Succeeds 7) Client Reconnects to DH granted to open2 8) Fails with FILE_NOT_FOUND I debugged it briefly & saw that when Disconnect happens, the open2 is freed from smbXsrv_open_global. And then when request #7 lands on samba server, we don't find the open handle & fail the request. Tried the same scenario against a windows server & it works fine (Traces attached). P.S: The packets attached is just a representation of the bug using a synthetic client. I'm hitting this bug while using a Microsoft tool to dump the data after 10+ hours over a slow network (GBs of traces, so cant attach that here & attaching only the relevant packets to repro the issue)
This is a known (since a few weeks) deficiency in Samba's DH code that was built on the assumption that the spec would mandata to only ever allow one DH per file. This is apparently wrong. Carefully crafted fixes plus tests are highly welcome!
*** Bug 15526 has been marked as a duplicate of this bug. ***