[cifs-protocol] [EXTERNAL] MS-SMB2: Reconnect of second disconnected PH on a file fails if contending open broke H lease - TrackingID#2509250040006209

Ralph Boehme slow at samba.org
Mon Oct 20 19:28:11 UTC 2025


Hi Obaid,

can you please try:

$ sudo mkdir -p /usr/local/samba/etc/
$ sudo touch /usr/local/samba/etc/smb.conf

Btw, user option -U should \ to seperate domain and username and if the 
passwort contains special characters like ! you have to encluse it in '', eg

-U 'contoso\administrator%Password01!'


On 10/20/25 9:08 PM, Obaid Farooqi wrote:
> Hi Ralph:
> Thanks for the instructions. I was able to fetch and checkout the branch but cannot run the testcase. I am using the following command:
> 
> $ bin/smbtorture -d 0 -U 'USER%PASSWORD' //SERVER/SHARE smb2.persistent-open.reconnect-contended-two --option=torture:single=yes --option=torture:subtest=17
> 
> abc at DESKTOP-0F1ASDC:~/slow/samba$ ./bin/smbtorture //192.168.1.200/smbclustered -Ucontoso/administrator%Password01! -d 0 smb2.persistent-open.reconnect-contended-two --option=torture:single=yes --option=torture:subtest=17
> smbtorture 4.24.0pre1-DEVELOPERBUILD
> Can't load /usr/local/samba/etc/smb.conf - run testparm to debug it
> Using seed 1760987220
> time: 2025-10-20 19:07:00.543647
> Unknown torture operation 'smb2.persistent-open.reconnect-contended-two'
> 
> 
> 
> I checked and the test case does not exist.
> 
>   abc at DESKTOP-0F1ASDC:~/slow/samba$ git branch
>    ph-not-found-bug
> * slow/ph-for-obaid
> abc at DESKTOP-0F1ASDC:~/slow/samba$ ./bin/smbtorture --list | grep -i smb2.persistent
> Can't load /usr/local/samba/etc/smb.conf - run testparm to debug it
> smb2.persistent-open.reconnect-lease.reconnect-lease
> smb2.persistent-open.reconnect-contended.reconnect-contended
> smb2.persistent-open.reconnect-contended-oplock.reconnect-contended-oplock
> smb2.persistent-open.reconnect-contended-replay.reconnect-contended-replay
> smb2.persistent-open.timeout_5.timeout_5
> smb2.persistent-open.rename-dir-open-files.rename-dir-open-files
> smb2.persistent-open.replay-reconnect.replay-reconnect
> smb2.persistent-open.replay-multi.replay-multi
> smb2.persistent-timeout.timeout_0.timeout_0
> smb2.persistent-timeout.timeout_299.timeout_299
> smb2.persistent-timeout.timeout_301.timeout_301
> smb2.persistent-timeout.timeout_301.timeout_301
> abc at DESKTOP-0F1ASDC:~/slow/samba$
> 
> Regards,
> Obaid Farooqi
> Sr. Escalation Engineer | Microsoft
> 
> -----Original Message-----
> From: Ralph Boehme <slow at samba.org>
> Sent: Monday, October 20, 2025 11:31 AM
> To: Obaid Farooqi <obaidf at microsoft.com>
> Cc: cifs-protocol at lists.samba.org; Microsoft Support <supportmail at microsoft.com>
> Subject: Re: [EXTERNAL] MS-SMB2: Reconnect of second disconnected PH on a file fails if contending open broke H lease - TrackingID#2509250040006209
> 
> Hi Obaid
> 
> sorry, the below command requires a gitlab account, you can use https
> instead:
> 
> $ git fetch https://gitlab.com/samba-team/devel/samba.git slow/ph-for-obaid ...
> $ git checkout -b slow/ph-for-obaid FETCH_HEAD ...
> 
> I've created a seperate more stable branch "ph-for-obaid" because "ph-testes" is still in flux and may be unstable.
> 
> Let me know if this works.
> 
> -Ralph
> 
> On 10/13/25 4:19 AM, Obaid Farooqi wrote:
>> Hi Ralph:
>> The following command does not work. Here is what I see when executing these commands:
>>
>> abc at DESKTOP-0F1ASDC:~/slow/samba$ git fetch "git at gitlab.com:samba-team/devel/samba.git" 'slow/ph-tests'
>> git at gitlab.com: Permission denied (publickey).
>> fatal: Could not read from remote repository.
>>
>> Please make sure you have the correct access rights and the repository
>> exists.
>> abc at DESKTOP-0F1ASDC:~/slow/samba$
>>
>> Regards,
>> Obaid Farooqi
>> Sr. Escalation Engineer | Microsoft
>>
>> -----Original Message-----
>> From: Ralph Boehme <slow at samba.org>
>> Sent: Monday, October 6, 2025 5:26 AM
>> To: Obaid Farooqi <obaidf at microsoft.com>
>> Cc: cifs-protocol at lists.samba.org; Microsoft Support
>> <supportmail at microsoft.com>
>> Subject: Re: [EXTERNAL] MS-SMB2: Reconnect of second disconnected PH
>> on a file fails if contending open broke H lease -
>> TrackingID#2509250040006209
>>
>> Hi Obaid,
>>
>> https://gitlab.com/samba-team/samba/-/merge_requests/4188
>>
>> $ git fetch "git at gitlab.com:samba-team/devel/samba.git" 'slow/ph-tests'
>> $ git checkout -b 'samba-slow/ph-tests' FETCH_HEAD
>>
>> The test:
>>
>> $ bin/smbtorture -d 0 -U 'USER%PASSWORD' //SERVER/SHARE
>> smb2.persistent-open.reconnect-contended-two
>> --option=torture:single=yes
>> --option=torture:subtest=17
>>
>> Server must be Fileserver-For-General-Use.
>>
>> Thanks!
>>
>> On 10/4/25 12:36 AM, Obaid Farooqi wrote:
>>> Hi Ralph:
>>> Is this one of the PH test cases that I can run?
>>> Please let me know the test case # and, also upload a network capture of this scenario to the following link:
>>>
>>>     
>>> https://support.microsoft.com/files?workspace=eyJhbGciOiJSUzI1NiIsImt
>>> p
>>> ZCI6IjJBNzk1QUQxMDNDQTM4OEZENEQzREQxQTZERkU4QTE2RDkyMkNDQkMiLCJ0eXAiO
>>> i
>>> JKV1QifQ.eyJ3c2lkIjoiNzUzYTIwMzktY2Q3OS00ZWZjLTg0YmYtZTIyYzIzZDQyNzE2
>>> I
>>> iwic3IiOiIyNTA5MjUwMDQwMDA2MjA5Iiwic3YiOiJ2MSIsInJzIjoiRXh0ZXJuYWwiLC
>>> J
>>> 3dGlkIjoiNjRhMzY4NTMtNjdmYS00NWQ3LTg5NjItMjc0ZGZiZGViYWRhIiwiYXBwaWQi
>>> O
>>> iI0ZTc2ODkxZC04NDUwLTRlNWUtYmUzOC1lYTNiZDZlZjIxZTUiLCJuYmYiOjE3NTk1Mz
>>> A
>>> 4OTYsImV4cCI6MTc2NzMwNjg5NSwiaWF0IjoxNzU5NTMwODk2LCJpc3MiOiJodHRwczov
>>> L
>>> 2FwaS5kdG1uZWJ1bGEubWljcm9zb2Z0LmNvbSIsImF1ZCI6Imh0dHA6Ly9zbWMifQ.J0g
>>> P
>>> 8LIQEThWlwlLlFsh6XIgtWNkc4vnRFxWjaVFXmmWzFbkUXuT647F4sRMgnYP6CWx27weu
>>> Z
>>> 9Vo7LdUqS1lupAXlJBeHlzq5sEsvA8Xl1H_gsLrGMJROpJl1aE9GUBzjrypWjB6wI0WZc
>>> 9
>>> 9JuiQ3eEW9-aVlauQOziwvzm_5DYd8SQ9Cje91qnBhR2Zoy7wwK3laKh_-WtCHe1xkWCu
>>> X
>>> V7ywV2tSwdvnPrCJLiQObWZxailC1xgaRQ9gvSL1_PAqCfT98bOkuCPdX6VlJ5Va7DpBP
>>> d
>>> 24dZCdUlJxjOs12pwgcTP1Ibz_G0DrxMqr7-VUI62XhfktAQIzABLgYnwg&wid=753a20
>>> 3
>>> 9-cd79-4efc-84bf-e22c23d42716
>>>
>>> Regards,
>>> Obaid Farooqi
>>> Sr. Escalation Engineer | Microsoft
>>>
>>> -----Original Message-----
>>> From: Michael Bowen <Mike.Bowen at microsoft.com>
>>> Sent: Thursday, September 25, 2025 10:07 AM
>>> To: Ralph Boehme <slow at samba.org>
>>> Cc: cifs-protocol at lists.samba.org; Microsoft Support
>>> <supportmail at microsoft.com>
>>> Subject: RE: [EXTERNAL] MS-SMB2: Reconnect of second disconnected PH
>>> on a file fails if contending open broke H lease -
>>> TrackingID#2509250040006209
>>>
>>> Hi Ralph,
>>>
>>> Thanks for your question. I've created case number 2509250040006209to track this issue. Please leave the number in the subject line and use reply all your correspondence. One of our engineers will contact you soon.
>>>
>>> Best regards,
>>> Michael Bowen
>>> Sr. Escalation Engineer - Microsoft® Corporation
>>>     
>>>
>>>
>>> -----Original Message-----
>>> From: Ralph Boehme <slow at samba.org>
>>> Sent: Thursday, September 25, 2025 7:46 AM
>>> To: Interoperability Documentation Help <dochelp at microsoft.com>
>>> Cc: cifs-protocol at lists.samba.org
>>> Subject: [EXTERNAL] MS-SMB2: Reconnect of second disconnected PH on a
>>> file fails if contending open broke H lease
>>>
>>> Hi dochelp!
>>>
>>> I'm sorry, but I just ran into another issue I fail to understand...
>>> :)
>>>
>>> Scenario:
>>>
>>> Reconnect of second disconnected PH on a file fails if contending open caused a break of the H lease.
>>>
>>> Server: Windows 2025, Fileserver for General Use
>>> Client: smbtorture
>>>
>>> CG := Create Guid
>>> LK := Lease Key
>>>
>>> 1. Client 1: open file with PH, lease=RWH, LK=X, CG=Y 2. Client 1:
>>> another open on the same file with PH, lease=RWH, LK=X, CG=Z (same LK
>>> as in 1) 3. Disconnect 4. Client 2: content disconnected handles with
>>> another open that triggers a break and is suspended 5. Client 1
>>> reconnects 6. Client 1 reconnects first PH 7. Server sends lease
>>> break for LK=X to NONE to client 1 8. Client 1 acks lease break 9.
>>> Client 1 attempts to reconnect second PH but this fails with
>>> STATUS_FILE_NOT_AVAILABLE
>>>
>>> In my understanding 9 should not fail and in my implementation of PH in Samba it succeeds.
>>>
>>> Am I missing anything in the docs why 9 should fail?
>>>
>>> In my testing with various lease levels and different sharemodes and access masks of the contending open, the pattern seems to be that the second reconnect alway fails if the contending open triggered a H lease break.
>>>
>>> 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/20251020/50cde53b/OpenPGP_signature.sig>


More information about the cifs-protocol mailing list