[cifs-protocol] [EXTERNAL] Re: [MS-SMB2] disconnected PH looses RH lease - TrackingID#2508130040006291
Ralph Boehme
slow at samba.org
Mon Dec 29 11:25:19 UTC 2025
Hi Kristian!
Sorry for the slow response, but I was pretty busy finishing the
Persistent Handles implementation in Samba.
The current branch contains the following subtests:
$ git fetch https://gitlab.com/samba-team/devel/samba.git slow/ph-tests
...
$ git checkout -b ph-tests FETCH_HEAD
...
$ ./configure && make -j
...
$ bin/smbtorture ...
The comparable subtests that differ only in whether or not they take a
brl are:
1) subtest without brl is 2
2) subtest with brl is 120
Thanks!
On 11/20/25 7:54 PM, Kristian Smith wrote:
> Hi slow,
>
> I have created a Server 2025 cluster with an Ubuntu client to test this scenario where RH caching fails upon reconnect when a byte-range lock exists. I have located your test that aligns with the scenario (subtest=22). Can you please provide the test you had created without the byte range lock? This will make it much easier for me to compare server side processing between the two scenarios.
>
> Regards,
> Kristian Smith
> Escalation Engineer | Microsoft® Corporation
> Email: kristian.smith at microsoft.com
>
> -----Original Message-----
> From: Ralph Boehme <slow at samba.org>
> Sent: Sunday, September 14, 2025 10:43 AM
> To: Kristian Smith <Kristian.Smith at microsoft.com>
> Cc: cifs-protocol at lists.samba.org; Microsoft Support <supportmail at microsoft.com>
> Subject: [EXTERNAL] Re: [MS-SMB2] disconnected PH looses RH lease - TrackingID#2508130040006291
>
> Hi Kristian,
>
> thanks for looking into this!
>
> So it seems server side processing is dependent on whether the file has a brl nor not. Until now all my tests were always taking a brl.
>
> Modifying the test to not take a brl (and I'm going to duplicate my whole test matrix to cover both cases), the behavior changes to
>
> 1. Client 1 opens a file with PH, lease=RH, sharemode=NONE 2. Client 1 disconnects TCP 3. Client 2 wants to open the file for reading, server returns STATUS_PENDING 4. Client 1 reconnects SMB 5. Client 1 reconnects PH and in the response the lease state is RH 6. Server sends lease break RH->R to client 1, client 1 ACKs the break 7. Server continues to process CREATE from step 3 and fails the request with STATUS_SHARING_VIOLATION.
>
> So it the absence vs presence of a brl *completely* changes server processing. I'm currently a bit lost trying to make sense of it, figuring out the guiding principles all this is based on.
>
> Thanks!
> -slow
>
>
> On 9/8/25 7:27 PM, Kristian Smith wrote:
>> Hi Slow,
>>
>> With regard to the following circumstance for which you've outlined and gathered traces:
>>
>> "
>> 1. Client 1 opens a file with PH, lease=RH, sharemode=NONE 2. Client 1
>> disconnects TCP 3. Client 2 wants to open the file for reading, this
>> fails with STATUS_FILE_NOT_AVAILABLE 4. Client 1 reconnects SMB 5.
>> Client 1 reconnects PH and in the response the lease state is NONE
>> (and the epoch is unchanged) "
>>
>> I've debugged the scenario after locating the smbtorture test used and found that Windows has a condition where an existing byte range lock on a file will cause a reconnect request with RH to result in a response with a lease state of NONE. This is a unique scenario that I will work with the documentation team to specify in [MS-FSA]. Thanks for bringing this to our attention and helping us maintain accuracy in the docs. If you have any questions or concerns, please let me know.
>>
>> Regards,
>> Kristian Smith
>> Support Escalation Engineer | Microsoft® Corporation
>> Email: kristian.smith at microsoft.com
>>
>> -----Original Message-----
>> From: Kristian Smith
>> Sent: Wednesday, August 27, 2025 3:25 PM
>> To: 'Ralph Boehme' <slow at samba.org>
>> Cc: 'cifs-protocol at lists.samba.org' <cifs-protocol at lists.samba.org>;
>> Microsoft Support <supportmail at microsoft.com>
>> Subject: RE: [MS-SMB2] disconnected PH looses RH lease -
>> TrackingID#2508130040006291
>>
>> Hi Slow,
>>
>> I just wanted to let you know that I've received your traces and I'm currently investigating. I will be out of the office until the 2nd of September, but will return to my investigation at that time. If an urgent question arises in the meantime, please reach out to DocHelp at microsoft.com.
>>
>> Thanks for your patience.
>>
>> Regards,
>> Kristian Smith
>> Support Escalation Engineer | Microsoft® Corporation
>> Email: kristian.smith at microsoft.com
>>
>> -----Original Message-----
>> From: Kristian Smith
>> Sent: Tuesday, August 19, 2025 12:53 PM
>> To: Ralph Boehme <slow at samba.org>
>> Cc: cifs-protocol at lists.samba.org; Microsoft Support
>> <supportmail at microsoft.com>
>> Subject: RE: [MS-SMB2] disconnected PH looses RH lease -
>> TrackingID#2508130040006291
>>
>> Hi Slow,
>>
>> I'm looking into this issue for you. I think it would be easier to diagnose with the network and t.cmd traces. Would you please upload them to the link below?
>>
>> Collect SMB traces with t.cmd and gather WireShark trace
>> 1. Rename t.txt to t.cmd (file is attached)
>> 2. Open Command Prompt as Administrator (PowerShell works too, you just need to enter the command “cmd” when it opens)
>> 3. Navigate to the directory of t.cmd
>> 4. Run “t.cmd srvon”
>> 5. Start a network trace with WireShark
>> 5. Reproduce the scenario
>> 6. End network trace
>> 6. Run “t.cmd off”
>> 7. Upload the .cab file and network trace via link provided: https://support.microsoft.com/files?workspace=eyJhbGciOiJSUzI1NiIsImtpZCI6IjUwNjQwRTE0NEREODg5MzE5NzYzRTBFNjM5RjMzNjdFQUNDNzlBRDAiLCJ0eXAiOiJKV1QifQ.eyJ3c2lkIjoiOTE5NDM3ODAtNGUxZS00NzllLTk3NDgtMDBkOWNhNmY5MGQ2Iiwic3IiOiIyNTA4MTMwMDQwMDA2MjkxIiwic3YiOiJ2MSIsInJzIjoiRXh0ZXJuYWwiLCJ3dGlkIjoiMzY0ZDM0OWQtMWJiYi00NzYzLTllMTYtYjI1YjYyM2JkMTExIiwiYXBwaWQiOiI0ZTc2ODkxZC04NDUwLTRlNWUtYmUzOC1lYTNiZDZlZjIxZTUiLCJuYmYiOjE3NTU2MzMwMjUsImV4cCI6MTc2MzQwOTAyNCwiaWF0IjoxNzU1NjMzMDI1LCJpc3MiOiJodHRwczovL2FwaS5kdG1uZWJ1bGEubWljcm9zb2Z0LmNvbSIsImF1ZCI6Imh0dHA6Ly9zbWMifQ.fI8Km4wuEKzQV-vlA61yxw1UKkJLSNK4CH7LSRPGpFJw4B_usMsnDfWPj_MD7br6XLh-GLLhtRmAYhCiHcFciAt7pA4gTpFZBZGCpdYdVHCO4v3YVr7tMtLmN6nhtyo8xVpBFor04jA5nzYnSDThqmWZEGxW5Oc4dFqQ_aEfacCYn68KwqxgvqasQjGht9AV_Kdrz8L2oyHd2zgBaxR_Jag1VfF5nDexuJoVRR37kdvvMwCPZq-qZlGaVJtkgwk3t6ZE2lgF8laQOoZVYmwmKRJW1hub_beA6iTKT0EMV0H2XSwZAW9H744hUdnd41OePbzqUs43_IcDLq2mkxM7FQ&wid=91943780-4e1e-479e-9748-00d9ca6f90d6
>>
>> Let me know if you have any issues collecting the smb trace. Thanks for your time.
>>
>> Regards,
>> Kristian Smith
>> Support Escalation Engineer | Microsoft® Corporation
>> Email: kristian.smith at microsoft.com
>>
>> -----Original Message-----
>> From: Kristian Smith
>> Sent: Wednesday, August 13, 2025 8:36 AM
>> To: Ralph Boehme <slow at samba.org>
>> Cc: cifs-protocol at lists.samba.org; Microsoft Support
>> <supportmail at microsoft.com>
>> Subject: RE: [MS-SMB2] disconnected PH looses RH lease -
>> TrackingID#2508130040006291
>>
>> [DocHelp to Bcc]
>>
>> Hi Slow,
>>
>> Thanks again for your Persistent Handle question. I've created case 2508130040006291 to track the issue. One of our engineers will investigate this and reach out to you soon.
>>
>> Regards,
>> Kristian Smith
>> Support Escalation Engineer | Microsoft® Corporation
>> Email: kristian.smith at microsoft.com
>>
>> -----Original Message-----
>> From: Ralph Boehme <slow at samba.org>
>> Sent: Wednesday, August 13, 2025 3:33 AM
>> To: Interoperability Documentation Help <dochelp at microsoft.com>
>> Cc: cifs-protocol at lists.samba.org
>> Subject: [EXTERNAL] MS-SMB2: disconnected PH looses RH lease
>>
>> Hello dochelp,
>>
>> another one... :)
>>
>> I see the following unexpected behaviour against a Windows server with Fileserver for General Use role where a Persistent Handle with lease=RH is silently downgraded to NONE:
>>
>> 1. Client 1 opens a file with PH, lease=RH, sharemode=NONE 2. Client 1
>> disconnects TCP 3. Client 2 wants to open the file for reading, this
>> fails with STATUS_FILE_NOT_AVAILABLE 4. Client 1 reconnects SMB 5.
>> Client 1 reconnects PH and in the response the lease state is NONE
>> (and the epoch is unchanged)
>>
>> Accoding to "3.3.4.7 Object Store Indicates a Lease Break" it is ok to loose an R lease, but not an RH lease, similarly "SMB 2.2 : Bigger, Faster, Scalier (Part 2)", page 50, states breaking from RH to none is "illegal".
>>
>> Can you please clarify?
>>
>> Traces (pcap + t.cmd) available.
>>
>> Thanks!
>> -slow
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/cifs-protocol/attachments/20251229/9ef97198/OpenPGP_signature.sig>
More information about the cifs-protocol
mailing list