Created attachment 17405 [details] Packet traces showing Samba Failure and Windows Server working Configuration: QNAP TVS-h1288X (QuTS hero) Firmware: h5.0.0.1892 smbd (samba daemon) Version 4.13.14 Steps to Reproduce: 1. First SMB Client logs into the server 2. Second SMB Client logs into the server 3. First client Creates test dirs and test file of PR_blah/PT_0000000000/testfile and writes initial data into the file. A Read/Write/Handle lease is requested and granted. 4. Second client attempts to open the same file 5. Lease Break Notification is sent by server changing lease from RWH to Read/Handle 6. Second client opens test file and does read of initial data 7. First Client does a write on the file Expected Results: The write should generate a lease break from RH to none to the second client. Actual Results: Samba server does not send out any lease break to second client. This is incorrect according to [MS-SMB2] 3.3.14 which states that the server must Read caching if data is written to the file. I have attached a packet trace showing the incorrect behavior from Samba (Write attempt at 202) and the correct behavior from Windows (Write attempt at 206).
Can you upload a debug level 10 log from the smbd processes as well ? We should see a debug message from contend_level2_oplocks_begin_default() in the smbd that receives the write that looks like: DEBUG(10, ("Breaking through lease key %"PRIu64"/%"PRIu64"\n", state.lease_key.data[0], state.lease_key.data[1]));
Created attachment 17408 [details] smbdDebugLogAndPackets
(In reply to suinn from comment #2) Yeah, same problem. log.smbd doesn't match the packet traces :-(.
Created attachment 17438 [details] Samba log and packet trace
Created attachment 17439 [details] QNAP script that enables/disables the Samba logging I run it with "samba_log.sh redirect" Run my test, then wait a min or so, then run "samba_log.sh default" Then copy the logs out of Public/log.*