Home

Bug: no reconnect to disconnected session with fSingleSessionPerUser=0

%3CLINGO-SUB%20id%3D%22lingo-sub-218413%22%20slang%3D%22en-US%22%3EBug%3A%20no%20reconnect%20to%20disconnected%20session%20with%20fSingleSessionPerUser%3D0%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-218413%22%20slang%3D%22en-US%22%3E%3CP%3EAffected%3A%20All%20Server%202019%20Insider%20Previews%20including%20build%2017713%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESteps%20to%20reproduce%3A%20(no%20need%20to%20install%20RDSH%20role%20to%20reproduce%20the%20bug)%3C%2FP%3E%3CUL%3E%3CLI%3Eenable%20multiple%20sessions%20per%20user%3A%3CBR%20%2F%3EComputer%20Configuration%20-%26gt%3B%20Administrative%20Templates%20-%26gt%3B%20Windows%20Components%20-%26gt%3B%20Remote%20Desktop%20Services%20-%26gt%3B%20Remote%20Desktop%20Session%20Host%20-%26gt%3B%20Connections%20-%26gt%3B%20%22Restrict%20Remote%20Desktop%20Services%20users%20to%20a%20single%20Remote%20Desktop%20Services%20Session%22%20to%20%22Disabled%22%3C%2FLI%3E%3CLI%3Erdp%20to%20the%20server%20and%20log%20in%20as%20Administrator%3C%2FLI%3E%3CLI%3Eclose%20the%20mstsc%20window%20or%20disconnect%3C%2FLI%3E%3CLI%3Erdp%20to%20the%20server%20again%2C%20log%20in%20as%20Administrator%20and%20you%20will%20get%20a%20new%20session%3CBR%20%2F%3Etaskmgr%20now%20shows%202%20Administrator%20sessions%3A%20one%20disconnected%20and%20the%20new%20one%20just%20created%3C%2FLI%3E%3CLI%3Eclose%20the%20mstsc%20window%20or%20disconnect%3C%2FLI%3E%3CLI%3E%3CSPAN%3Erdp%20to%20the%20server%20again%2C%20log%20in%20as%20Administrator%20and%20you%20will%20get%20a%20new%20session%3CBR%20%2F%3Etaskmgr%20now%20shows%203%20Administrator%20sessions%3A%20two%20disconnected%20and%20the%20new%20one%20just%20created%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3E...%3C%2FLI%3E%3C%2FUL%3E%3CP%3EIf%20fSingleSessionPerUser%20%3D%3D%200%20you%20will%20not%20be%20able%20to%20reconnect%20to%20any%20disconnected%20session.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHowever%2C%20now%20the%20interesting%20part%3A%3CBR%20%2F%3EIf%20you%20lock%20the%20session%26nbsp%3B%3CSTRONG%3Ebefore%26nbsp%3B%3C%2FSTRONG%3Ethe%20disconnect%20(ctrl%2Balt%2Bend%20-%26gt%3B%20lock%2C%20then%20close%20mstsc)%20you%20will%20be%20successfully%20reconnected.%3C%2FP%3E%3CP%3EI%20suspect%20the%20error%20is%20in%26nbsp%3B%20termsrv.dll's%20CSessionArbitrationHelper%3A%3ASessions_EnumDisconnectedUserSessions%20function.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20can%20alsoe%20reproduce%20this%20without%20rdp%2C%20directly%20on%20the%20console.%3CBR%20%2F%3ESet%20the%20policy%20as%20mentioned%20above%2C%20log%20in%20as%20Administrator%2C%20disconnect%20your%20own%20session%20in%20task%20manager%2C%20log%20in%20again%20and%20you%20get%20a%20new%20session.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20bug%20seems%20to%20be%20in%20termsrv.dll%20since%20Windows%2010%201803%20already.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-218413%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ERemote%20Desktop%20Services%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESecurity%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-282056%22%20slang%3D%22en-US%22%3ERe%3A%20Bug%3A%20no%20reconnect%20to%20disconnected%20session%20with%20fSingleSessionPerUser%3D0%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-282056%22%20slang%3D%22en-US%22%3E%3CP%3EThe%20same%20problem%20still%20exist.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-221982%22%20slang%3D%22en-US%22%3ERe%3A%20Bug%3A%20no%20reconnect%20to%20disconnected%20session%20with%20fSingleSessionPerUser%3D0%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-221982%22%20slang%3D%22en-US%22%3E%3CP%3EThe%20bug%20still%20happens%20with%26nbsp%3BWindows%20Server%202019%20Insider%20Preview%20Build%2017723%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-219132%22%20slang%3D%22en-US%22%3ERE%3A%20Bug%3A%20no%20reconnect%20to%20disconnected%20session%20with%20fSingleSessionPerUser%3D0%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-219132%22%20slang%3D%22en-US%22%3EI%20wonder%20why%20there%20is%20no%20feedback%20for%20a%20proper%20bug%20report.%20Is%20this%20forum%20actually%20the%20right%20place%20to%20report%20bugs%20%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-528315%22%20slang%3D%22en-US%22%3ERe%3A%20Bug%3A%20no%20reconnect%20to%20disconnected%20session%20with%20fSingleSessionPerUser%3D0%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-528315%22%20slang%3D%22en-US%22%3E%3CP%3EDo%20we%20have%20any%20solutions%20for%20this%3F%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20have%20same%20problem%20even%20for%20current%20build%20of%202019%20server%20that%20is%20used%20in%20Production%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20problem%20migrated%20further..%3C%2FP%3E%3CP%3EPlease%20help%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-788190%22%20slang%3D%22en-US%22%3ERe%3A%20Bug%3A%20no%20reconnect%20to%20disconnected%20session%20with%20fSingleSessionPerUser%3D0%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-788190%22%20slang%3D%22en-US%22%3E%3CP%3E2016%20server%20task%20manager's%20user%20list%20has%20right-click%20%22Reconnect%22.%26nbsp%3B%20Seems%20like%20the%20community%20agrees%20this%20issue%20is%20a%20result%20of%20the%20RemoteFX%20configuration%20being%20enabled%20by%20default%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fprevious-versions%2Fwindows%2Fit-pro%2Fwindows-server-2008-R2-and-2008%2Fff817578(v%3Dws.10%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fprevious-versions%2Fwindows%2Fit-pro%2Fwindows-server-2008-R2-and-2008%2Fff817578(v%3Dws.10%3C%2FA%3E)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-800257%22%20slang%3D%22en-US%22%3ERe%3A%20Bug%3A%20no%20reconnect%20to%20disconnected%20session%20with%20fSingleSessionPerUser%3D0%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-800257%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F387423%22%20target%3D%22_blank%22%3E%40ScottMoore%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20mentioned%20some%20story%20(link%20was%20broken%2C%20i%20found%20it%20via%20search)..%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fsocial.technet.microsoft.com%2FForums%2Fwindowsserver%2Fen-US%2F68dfb072-9192-4f5e-a9e3-d75298d9f971%2Frd-is-terminated-before-even-starting-access-is-denied%3Fforum%3DwinserverTS%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fsocial.technet.microsoft.com%2FForums%2Fwindowsserver%2Fen-US%2F68dfb072-9192-4f5e-a9e3-d75298d9f971%2Frd-is-terminated-before-even-starting-access-is-denied%3Fforum%3DwinserverTS%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ebut%20as%20i%20can%20see%20it%20is%20not%20related%20to%20our%20issue..RD%20is%20terminated%20-%20is%20not%20the%20same%20that%20we%20have.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20always%20get%20a%20new%20session%2C%20no%20matter%20what%20happened%20(resize%2C%20short%20internet%20outage%2C%20etc).%3C%2FP%3E%3CP%3EJust%20not%20possible%20to%20connect%20to%20previously%20running%20session%2C%20when%20this%20feature%20is%20enabled.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERegards%2C%3C%2FP%3E%3CP%3ESergii%20Vinnikov%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-822263%22%20slang%3D%22en-US%22%3ERe%3A%20Bug%3A%20no%20reconnect%20to%20disconnected%20session%20with%20fSingleSessionPerUser%3D0%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-822263%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F167708%22%20target%3D%22_blank%22%3E%40Vinz%20Focker%3C%2FA%3E%3C%2FP%3E%3CP%3EWe%20have%20the%20same%20Problem%20with%20a%20Production%20Windows%202019%20Server%20(Build%2017763)%3C%2FP%3E%3CP%3ELocking%20the%20Session%20before%20disconnecting%20does%20seem%20to%20help%2C%20but%20is%20not%20a%20usable%20workaround%20for%20us.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Vinz Focker
New Contributor

Affected: All Server 2019 Insider Previews including build 17713

 

Steps to reproduce: (no need to install RDSH role to reproduce the bug)

  • enable multiple sessions per user:
    Computer Configuration -> Administrative Templates -> Windows Components -> Remote Desktop Services -> Remote Desktop Session Host -> Connections -> "Restrict Remote Desktop Services users to a single Remote Desktop Services Session" to "Disabled"
  • rdp to the server and log in as Administrator
  • close the mstsc window or disconnect
  • rdp to the server again, log in as Administrator and you will get a new session
    taskmgr now shows 2 Administrator sessions: one disconnected and the new one just created
  • close the mstsc window or disconnect
  • rdp to the server again, log in as Administrator and you will get a new session
    taskmgr now shows 3 Administrator sessions: two disconnected and the new one just created
  • ...

If fSingleSessionPerUser == 0 you will not be able to reconnect to any disconnected session.

 

However, now the interesting part:
If you lock the session before the disconnect (ctrl+alt+end -> lock, then close mstsc) you will be successfully reconnected.

I suspect the error is in  termsrv.dll's CSessionArbitrationHelper::Sessions_EnumDisconnectedUserSessions function.

 

You can alsoe reproduce this without rdp, directly on the console.
Set the policy as mentioned above, log in as Administrator, disconnect your own session in task manager, log in again and you get a new session.

 

This bug seems to be in termsrv.dll since Windows 10 1803 already.

 

7 Replies
I wonder why there is no feedback for a proper bug report. Is this forum actually the right place to report bugs ?

The bug still happens with Windows Server 2019 Insider Preview Build 17723

The same problem still exist. 

Do we have any solutions for this? 

We have same problem even for current build of 2019 server that is used in Production

 

So problem migrated further..

Please help

2016 server task manager's user list has right-click "Reconnect".  Seems like the community agrees this issue is a result of the RemoteFX configuration being enabled by default

 

https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/ff...)

 

 

@ScottMoore 

 

You mentioned some story (link was broken, i found it via search)..

https://social.technet.microsoft.com/Forums/windowsserver/en-US/68dfb072-9192-4f5e-a9e3-d75298d9f971...

 

but as i can see it is not related to our issue..RD is terminated - is not the same that we have.

 

We always get a new session, no matter what happened (resize, short internet outage, etc).

Just not possible to connect to previously running session, when this feature is enabled.

 

Regards,

Sergii Vinnikov

@Vinz Focker

We have the same Problem with a Production Windows 2019 Server (Build 17763)

Locking the Session before disconnecting does seem to help, but is not a usable workaround for us.

 

Related Conversations
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
Tabs and Dark Mode
cjc2112 in Discussions on
35 Replies
Extentions Synchronization
ChirmyRam in Discussions on
3 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
9 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies