Skip to content

AWS Workspaces 5.27.1.5420 crashes when attempting to connect due to incorrect PerformanceCounter

0

Immediately after entering the registration key into AWS Workspaces 5.27.1.5420 on Windows 11 64-bit, the process dies. It logs the following relevant snippet, prior to uploading crash information back to Amazon:

2025-06-04T04:09:28.476Z { Version: "5.27.1.5420" }: [INF] Navigating to Use Case WorkSpacesClient.Common.UseCases.BeginPreSessionUseCase.BeginPreSessionPresenter
2025-06-04T04:09:28.476Z { Version: "5.27.1.5420" }: [DBG] Recording Metric-> Application::SavedRegistration=0
2025-06-04T04:09:28.518Z { Version: "5.27.1.5420" }: [ERR] Fatal Error caught in WorkSpacesClient.Windows.Infrastructure.NavigationService - BeginUseCase of Presenter WorkSpacesClient.Windows.Infrastructure.NavigationService . System.InvalidOperationException: Instance 'workspaces' does not exist in the specified Category.
   at System.Diagnostics.CounterDefinitionSample.GetInstanceValue(String instanceName)
   at System.Diagnostics.PerformanceCounter.NextSample()
   at System.Diagnostics.PerformanceCounter.NextValue()
   at WorkSpacesClient.Windows.Infrastructure.Diagnostics.PerformanceCounter.get_ProcessorTime()
   at WorkSpacesClient.Common.Infrastructure.Diagnostics.PerformanceMonitor.Log(String message)
   at WorkSpacesClient.Common.Infrastructure.Diagnostics.PerformanceMarker.Mark(String name)
   at WorkSpacesClient.Common.Infrastructure.Diagnostics.PerformanceMarker.Log(Boolean start)
   at WorkSpacesClient.Common.Infrastructure.Diagnostics.PerformanceMarker..ctor(String name)
   at WorkSpacesClient.Common.UseCases.BeginPreSessionUseCase.BeginPreSessionPresenter.BeginUseCase()
   at WorkSpacesClient.Windows.Infrastructure.NavigationService.<>c__DisplayClass8_0`4.<<InternalNavigateToAsync>b__0>d.MoveNext()

The issue is that to access the "% Processor Time" for the current process, via Windows performance counters, the instance names needs to be Process.GetCurrentProcess()?.ProcessName concatenated with "_" and then with Process.GetCurrentProcess()?.Id.

In the above log, you can see that it is simply trying to access 'workspaces', which is how performance counters used to work, but Windows now expects it to be of the work 'workspaces_<pid>'. i.e. if my PID is 45678, then it should be passing the instanceName of workspaces_45678.

This change is a documented change in Microsoft Windows 11, see https://learn.microsoft.com/en-us/windows/win32/perfctrs/handling-duplicate-instance-names.

A temporary workaround is to set HKLM\System\CurrentControlSet\Services\Perfproc\Performance "ProcessNameFormat" to 1, however Microsoft's default from Windows 11 onwards seems to be 2.

asked a year ago203 views
1 Answer
1

The issue you're experiencing with AWS WorkSpaces client version 5.27.1.5420 on Windows 11 is related to a change in how Windows handles performance counters, specifically for process names.

In Windows 11, Microsoft changed the format of process instance names for performance counters. Previously, the instance name was simply the process name (e.g., 'workspaces'). Now, it requires the format 'processname_pid' (e.g., 'workspaces_45678').

The error message indicates that the AWS WorkSpaces client is still trying to access the performance counter using the old format, which no longer exists in Windows 11. This causes the "Instance 'workspaces' does not exist in the specified Category" error and subsequently crashes the application.

You've correctly identified the root cause and the proper solution. The AWS WorkSpaces client needs to be updated to use the new format for accessing performance counters, which involves concatenating the process name with an underscore and the process ID.

While setting the registry key HKLM\System\CurrentControlSet\Services\Perfproc\Performance "ProcessNameFormat" to 1 can serve as a temporary workaround, it's not recommended as a long-term solution. This change affects the entire system and may impact other applications that expect the new behavior.

The best course of action would be to report this issue to AWS support so they can update the WorkSpaces client to be compatible with the new Windows 11 performance counter naming convention. In the meantime, you might consider using an older version of the AWS WorkSpaces client if possible, as it may be compatible with Windows 11's performance counter changes.
Sources
AWS VPN Client does not work since Version 5.x (5.2.2) | AWS re:Post

answered a year ago
EXPERT
reviewed a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.