CWA - Failed to connect to VDA randomly

book

Article ID: CTX695282

calendar_today

Updated On:

Description

Sometimes, End user failed to connected to VDA. The CWA threw an exception: "Unable to connect to VM. Please try again later."

Cause

During session launch, CWA process was crashed due to FreeHeap API, this is because the size of Heap is not correct. in unicode sceanrio, it should call GetDefaultPrinterW, not GetDefaultPrinterA API.

STACK_TEXT:  
0b0ff0e8 77ca6cfb     1d07c292 06f67970 00000002 ntdll!RtlReportFatalFailure+0x16
0b0ff17c 77cafdc4     00000001 77ce3990 77cadcb9 ntdll!RtlReportCriticalFailure+0x84
0b0ff188 77cadcb9     1d07c256 06f67970 06f67970 ntdll!RtlpReportHeapFailure+0x2f
0b0ff1b8 77cb6130     00000003 03c60000 06f67970 ntdll!RtlpHpHeapHandleError+0x89
0b0ff1d0 77c47c0a     06f67970 06f67988 00000000 ntdll!RtlpLogHeapFailure+0x43
0b0ff234 77c03ee6     00000000 00000000 00000000 ntdll!RtlpFreeHeapInternal+0x190
0b0ff250 76a8c9e3     03c60000 00000000 06f67988 ntdll!RtlFreeHeap+0x46
0b0ff26c 76a7a31a     06f67988 084aaf68 0b0ff298 rpcrt4!FreeWrapper+0x33
0b0ff27c 76a7a73b     06e8cfb8 084aaf68 00000000 rpcrt4!LRPC_BINDING_HANDLE::SetEndpoint+0x1a
0b0ff298 76a7a436     00000000 00000000 084ebfa8 rpcrt4!LRPC_BASE_BINDING_HANDLE::CompleteOnePart+0x5d
0b0ff2d8 76a7eb1d     084ebfa8 7596a2a8 00000000 rpcrt4!LRPC_BASE_BINDING_HANDLE::ResolveEndpoint+0x111
0b0ff334 76a7f9b7     00000000 00000000 084ebe10 rpcrt4!LRPC_BASE_BINDING_HANDLE::DriveStateForward+0x4cd
0b0ff39c 76a55ef2     0b0ff3b8 ee87f120 03d544b8 rpcrt4!LRPC_BINDING_HANDLE::NegotiateTransferSyntax+0x317
0b0ff7e8 76a54a64     759611e8 75964a1e 0b0ff80c rpcrt4!NdrClientCall2+0x742
0b0ff7fc 75977d42     759611e8 75964a1e 06e8c478 rpcrt4!NdrClientCall4+0x14
0b0ff87c 75977b8d     9274103d 0b0ffb10 0b0ffb24 winspool!OpenPrinterRPC+0x172
0b0ff8b8 5f24c81d     0b0ff8e0 0b0ffb24 0b0ffb10 winspool!OpenPrinter2W+0x6d
0b0ffaf0 5f24cad3     084b1a9c 0b0ffb24 0b0ffb10 vdspl30n!TryOpenPrinter2W+0x6d
0b0ffb1c 5f24ca1e     00000000 00000001 0b0ffb68 vdspl30n!_async_CheckAccessV1+0xa3
0b0ffb2c 5f24e82d     084acbc4 5f24e760 5f24e760 vdspl30n!_async_CheckAccess+0x2e
0b0ffb68 779cfcc9     00000001 779cfcb0 0b0ffbd4 vdspl30n!_async_WorkerThread+0xcd
0b0ffb78 77c282ae     00000001 1d07c83a 00000000 kernel32!BaseThreadInitThunk+0x19
0b0ffbd4 77c2827e     ffffffff 77c49330 00000000 ntdll!__RtlUserThreadStart+0x2f
0b0ffbe4 00000000     5f24e760 00000001 00000000 ntdll!_RtlUserThreadStart+0x1b

 

Resolution

Fixed on CWA side, make sure CWA transfer correct size to Windows API. the issue will be fixed in 2511 and 2507 CU1.

Issue/Introduction

CWA - Failed to connect to VDA randomly