[GH-ISSUE #2572] Windows: site-based split tunneling with more than 500 routes causes system operations to hang, likely due to wcmSvc suspension workaround #1164

Open
opened 2026-10-14 03:35:31 +07:00 by bsakaguchi · 8 comments
Owner

Originally created by @yupic on GitHub (May 5, 2026).
Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/2572

Describe the bug

On Windows, CIDR/site split tunneling with more than ~500 routes causes unrelated Windows operations to hang.

I connect using the VLESS protocol and use split tunneling by CIDR routes, not by applications. When the route list is large, Windows starts behaving as if some system checks never complete. For example:

  • some applications do not start after clicking them;
  • small browser downloads may hang at the final “write to disk” stage;
  • opening/starting some media may hang before playback.

As soon as I disconnect the VPN connection, the pending operations complete immediately: the application starts, and the browser finishes saving the downloaded file.

I investigated this locally and it appears to be caused by AmneziaVPN-service.exe suspending the Windows Connection Manager service (wcmSvc) after more than 500 routes are added.

The log shows this directly:

[2026-05-05 09:54:01.191Z] [DEBUG] Amnezia  : Router::routeAddList finished, success:  2 / 2
[2026-05-05 09:54:01.193Z] [DEBUG] Amnezia  : Router::routeDeleteList finished, success:  0 / 1
[2026-05-05 09:54:01.194Z] [DEBUG] Amnezia  : Router::routeAddList finished, success:  1 / 1
[2026-05-05 09:54:01.194Z] [DEBUG] Amnezia  : Router::routeAddList finished, success:  1 / 1
[2026-05-05 09:54:01.195Z] [DEBUG] Amnezia  : Router::routeAddList finished, success:  1 / 1
[2026-05-05 09:54:01.221Z] [DEBUG] Amnezia  : Router::routeAddList finished, success:  511 / 511
[2026-05-05 09:54:01.222Z] [DEBUG] Amnezia  : RouterWin::routeAddList succeed to suspend wcmSvc

There is code in service/server/router_win.cpp:

if (m_ipForwardRows.size() > 500) suspendWcmSvc(true);

The comment near suspendWcmSvc() says:

// Solve Windows bug (routes > 1000)

This looks like a workaround for some old Windows routing bug from 2021. It may no longer be valid or safe on current Windows 11 builds.

To Reproduce

  1. Configure a VLESS connection on Windows.
  2. Enable split tunneling by CIDR/site routes.
  3. Add about 490 CIDR routes.
  4. Connect VPN.
  5. Wait 10-20 minutes.
  6. Observe that Windows works normally.
  7. Increase the CIDR route list to about 510 routes.
  8. Connect VPN again.
  9. Observe that wcmSvc is suspended by AmneziaVPN service.
  10. Wait 10-20 minutes.
  11. Try to open a video file from Downloads folder or download a small file in a browser.
  12. Observe that the operation may hang.
  13. Disconnect VPN.
  14. Observe that the pending operation completes immediately: the application starts, or the browser finishes saving the downloaded file.

The issue is also reproducible with my real split tunneling list of about 3000 routes.

I attached two autogenerated example route lists used for testing:

Expected behavior

AmneziaVPN should add CIDR routes without suspending Windows system services. Windows applications, browser downloads, and media playback should continue to work normally.

Log files

Relevant log fragment:

[2026-05-05 09:54:01.191Z] [DEBUG] Amnezia  : Router::routeAddList finished, success:  2 / 2
[2026-05-05 09:54:01.193Z] [DEBUG] Amnezia  : Router::routeDeleteList finished, success:  0 / 1
[2026-05-05 09:54:01.194Z] [DEBUG] Amnezia  : Router::routeAddList finished, success:  1 / 1
[2026-05-05 09:54:01.194Z] [DEBUG] Amnezia  : Router::routeAddList finished, success:  1 / 1
[2026-05-05 09:54:01.195Z] [DEBUG] Amnezia  : Router::routeAddList finished, success:  1 / 1
[2026-05-05 09:54:01.221Z] [DEBUG] Amnezia  : Router::routeAddList finished, success:  511 / 511
[2026-05-05 09:54:01.222Z] [DEBUG] Amnezia  : RouterWin::routeAddList succeed to **suspend wcmSvc**

Screenshots

Not applicable.

Desktop (please complete the following information):

  • OS: Microsoft Windows 11 Home Single Language
  • OS version: 10.0.26200.8246, Build 26200, 25H2
  • Architecture: x64
  • AmneziaVPN Version: 4.8.14.5
  • AmneziaVPN Service Version: 4.8.14.5
  • Protocol: VLESS

Smartphone (please complete the following information):

Not applicable.

Server (please complete the following information):

  • Protocol: VLESS

Additional context

I locally patched AmneziaVPN-service.exe to prevent the suspendWcmSvc(true) call from being triggered for my route list.

After this patch, the Windows hangs no longer reproduce so far with the same route list.

This suggests that suspending wcmSvc is likely the cause, or at least a major contributing factor.

The workaround appears to have been introduced in 2021 in this commit: github.com/amnezia-vpn/amnezia-client@9dbe15a0e3

Could this workaround be removed, made optional, or replaced with a safer implementation?

Originally created by @yupic on GitHub (May 5, 2026). Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/2572 **Describe the bug** On Windows, CIDR/site split tunneling with more than ~500 routes causes unrelated Windows operations to hang. I connect using the VLESS protocol and use split tunneling by CIDR routes, not by applications. When the route list is large, Windows starts behaving as if some system checks never complete. For example: - some applications do not start after clicking them; - small browser downloads may hang at the final “write to disk” stage; - opening/starting some media may hang before playback. As soon as I disconnect the VPN connection, the *pending operations complete immediately*: the application starts, and the browser finishes saving the downloaded file. I investigated this locally and it appears to be caused by `AmneziaVPN-service.exe` suspending the Windows Connection Manager service (`wcmSvc`) after more than 500 routes are added. The log shows this directly: ```text [2026-05-05 09:54:01.191Z] [DEBUG] Amnezia : Router::routeAddList finished, success: 2 / 2 [2026-05-05 09:54:01.193Z] [DEBUG] Amnezia : Router::routeDeleteList finished, success: 0 / 1 [2026-05-05 09:54:01.194Z] [DEBUG] Amnezia : Router::routeAddList finished, success: 1 / 1 [2026-05-05 09:54:01.194Z] [DEBUG] Amnezia : Router::routeAddList finished, success: 1 / 1 [2026-05-05 09:54:01.195Z] [DEBUG] Amnezia : Router::routeAddList finished, success: 1 / 1 [2026-05-05 09:54:01.221Z] [DEBUG] Amnezia : Router::routeAddList finished, success: 511 / 511 [2026-05-05 09:54:01.222Z] [DEBUG] Amnezia : RouterWin::routeAddList succeed to suspend wcmSvc ``` There is code in `service/server/router_win.cpp`: ```cpp if (m_ipForwardRows.size() > 500) suspendWcmSvc(true); ``` The comment near `suspendWcmSvc()` says: ```cpp // Solve Windows bug (routes > 1000) ``` This looks like a workaround for some old Windows routing bug from 2021. It may no longer be valid or safe on current Windows 11 builds. **To Reproduce** 1. Configure a VLESS connection on Windows. 2. Enable split tunneling by CIDR/site routes. 3. Add about 490 CIDR routes. 4. Connect VPN. 5. Wait 10-20 minutes. 6. Observe that Windows works normally. 7. Increase the CIDR route list to about 510 routes. 8. Connect VPN again. 9. Observe that `wcmSvc` is suspended by AmneziaVPN service. 10. Wait 10-20 minutes. 10. Try to open a video file from Downloads folder or download a small file in a browser. 11. Observe that the operation may hang. 12. Disconnect VPN. 13. Observe that the pending operation completes immediately: the application starts, or the browser finishes saving the downloaded file. The issue is also reproducible with my real split tunneling list of about 3000 routes. I attached two autogenerated example route lists used for testing: - [amnezia-exclude-510.json](https://github.com/user-attachments/files/27398371/amnezia-exclude-510.json): does not reproduce the issue. - [amnezia-exclude-490.json](https://github.com/user-attachments/files/27398370/amnezia-exclude-490.json): reproduces the issue and triggers `suspend wcmSvc`. **Expected behavior** AmneziaVPN should add CIDR routes without suspending Windows system services. Windows applications, browser downloads, and media playback should continue to work normally. **Log files** Relevant log fragment: ``` [2026-05-05 09:54:01.191Z] [DEBUG] Amnezia : Router::routeAddList finished, success: 2 / 2 [2026-05-05 09:54:01.193Z] [DEBUG] Amnezia : Router::routeDeleteList finished, success: 0 / 1 [2026-05-05 09:54:01.194Z] [DEBUG] Amnezia : Router::routeAddList finished, success: 1 / 1 [2026-05-05 09:54:01.194Z] [DEBUG] Amnezia : Router::routeAddList finished, success: 1 / 1 [2026-05-05 09:54:01.195Z] [DEBUG] Amnezia : Router::routeAddList finished, success: 1 / 1 [2026-05-05 09:54:01.221Z] [DEBUG] Amnezia : Router::routeAddList finished, success: 511 / 511 [2026-05-05 09:54:01.222Z] [DEBUG] Amnezia : RouterWin::routeAddList succeed to **suspend wcmSvc** ``` **Screenshots** Not applicable. **Desktop (please complete the following information):** - OS: Microsoft Windows 11 Home Single Language - OS version: 10.0.26200.8246, Build 26200, 25H2 - Architecture: x64 - AmneziaVPN Version: 4.8.14.5 - AmneziaVPN Service Version: 4.8.14.5 - Protocol: VLESS **Smartphone (please complete the following information):** Not applicable. **Server (please complete the following information):** - Protocol: VLESS **Additional context** I locally patched `AmneziaVPN-service.exe` to prevent the `suspendWcmSvc(true)` call from being triggered for my route list. After this patch, the Windows hangs no longer reproduce so far with the same route list. This suggests that suspending `wcmSvc` is likely the cause, or at least a major contributing factor. The workaround appears to have been introduced in 2021 in this commit: https://github.com/amnezia-vpn/amnezia-client/commit/9dbe15a0e3df359e34465dad7f3340947dc84e02 Could this workaround be removed, made optional, or replaced with a safer implementation?
Author
Owner

@serega0005 commented on GitHub (May 18, 2026):

Такая же проблема. В журнале ошибок зафиксирована проблема по usb, но это связано косвенно, т.к при всех отключенных устройствах все равно зависания фиксируются. Я прогнал журналы ошибок через claude вот краткое резюме. При отключении vpn начинает работать все нормально

Image
<!-- gh-comment-id:4474740991 --> @serega0005 commented on GitHub (May 18, 2026): Такая же проблема. В журнале ошибок зафиксирована проблема по usb, но это связано косвенно, т.к при всех отключенных устройствах все равно зависания фиксируются. Я прогнал журналы ошибок через claude вот краткое резюме. При отключении vpn начинает работать все нормально <img width="2283" height="981" alt="Image" src="https://github.com/user-attachments/assets/fdbcd153-81d6-4b60-8db3-c0de66d4eff6" />
Author
Owner

@SankohTew commented on GitHub (May 23, 2026):

Could you please drop your local fix "AmneziaVPN-service.exe "?

<!-- gh-comment-id:4525617602 --> @SankohTew commented on GitHub (May 23, 2026): Could you please drop your local fix "AmneziaVPN-service.exe "?
Author
Owner

@yupic commented on GitHub (May 23, 2026):

@SankohTew Вот в этом коммите изменения: github.com/yupic/amnezia-client@239a5ee238
Вообще, у меня целая ветка на основе v.4.8.15.4 : https://github.com/yupic/amnezia-client/commits/split-tun-fixes
Но там все изменения делал Codex, я в них не вникал, поэтому можно использовать только на свой страх и риск.

<!-- gh-comment-id:4525880389 --> @yupic commented on GitHub (May 23, 2026): @SankohTew Вот в этом коммите изменения: https://github.com/yupic/amnezia-client/commit/239a5ee238202bb3e29cfbd0fb83475434584513 Вообще, у меня целая ветка на основе v.4.8.15.4 : https://github.com/yupic/amnezia-client/commits/split-tun-fixes Но там все изменения делал Codex, я в них не вникал, поэтому можно использовать только на свой страх и риск.
Author
Owner

@SankohTew commented on GitHub (May 23, 2026):

Спасибо.

<!-- gh-comment-id:4526017658 --> @SankohTew commented on GitHub (May 23, 2026): Спасибо.
Author
Owner

@SankohTew commented on GitHub (May 23, 2026):

А готового exe нету? Я просто не разбираюсь, не шарю, как установщик создать из файлов коммита.

<!-- gh-comment-id:4526114769 --> @SankohTew commented on GitHub (May 23, 2026): А готового exe нету? Я просто не разбираюсь, не шарю, как установщик создать из файлов коммита.
Author
Owner

@yupic commented on GitHub (May 23, 2026):

@SankohTew Да, на самом деле, если вы никогда не собирали код, может быть сложно понять как и что делать. Потому что нужно взять правильную версию исходников и т.п.
В общем, выложил бинарник сюда и там же написал инструкцию как устанавливать (надеюсь, ничего не забыл): https://github.com/yupic/amnezia-client/releases/tag/4.8.15.4-patch-1

<!-- gh-comment-id:4526484213 --> @yupic commented on GitHub (May 23, 2026): @SankohTew Да, на самом деле, если вы никогда не собирали код, может быть сложно понять как и что делать. Потому что нужно взять правильную версию исходников и т.п. В общем, выложил бинарник сюда и там же написал инструкцию как устанавливать (надеюсь, ничего не забыл): https://github.com/yupic/amnezia-client/releases/tag/4.8.15.4-patch-1
Author
Owner

@SankohTew commented on GitHub (May 23, 2026):

Спасибо большое, всё получилось)

<!-- gh-comment-id:4526660723 --> @SankohTew commented on GitHub (May 23, 2026): Спасибо большое, всё получилось)
Author
Owner

@DenTheProgrammer commented on GitHub (Oct 3, 2026):

Additional confirmed reproduction on AmneziaVPN 4.8.19.0 (client and service), Windows 11 Home Single Language 25H2, build 26200.9457, x64.

The user-visible symptom is a frozen Win+V clipboard-history panel that remains open and stops handling input. Start/search had previously shown a similar WinHTTP wait. Restarting Explorer temporarily masks the symptom.

During the actual Win+V freeze:

  • The active site/CIDR split-tunneling setup had about 810 manually added IPv4 routes on the physical interface, exceeding the 500-route threshold. No route contents or VPN credentials are included here.
  • SCM reported Wcmsvc as Running, but all 22 threads of its dedicated svchost process were in Wait / Suspended state. A briefly inspected thread already had a suspend count of 1 before the diagnostic inspection.
  • WinHttpAutoProxySvc had roughly 290 threads, most waiting for shared/exclusive locks. A pending call was blocked in DNSAPI!DnsConnectionGetProxyInfoForHostUrlEx -> wcmapi!WcmGetInterfaceContextTable -> RPC.
  • TextInputHost's affected UI thread was blocked in WinHTTP!WinHttpResolverGetProxyForUrl, reached through WinINET/URLMON/EdgeHTML. Other TextInputHost threads were waiting for it.
  • The ordinary clipboard was not locked by an application. User proxy auto-detection and machine WinHTTP WPAD detection were already disabled; that did not prevent this hang.

Controlled recovery without restarting Explorer, TextInputHost, the VPN, or the network services: resuming only the suspended Wcmsvc process with NtResumeProcess restored service-control responsiveness (successful sc interrogate Wcmsvc in about 99 ms). The same TextInputHost UI thread immediately returned to its normal message-wait loop. VPN connectivity and the existing routes were preserved.

The current release source still contains the indefinite suspension:

This demonstrates an impact on Windows shell UI, beyond application launch/download hangs. It would be helpful to remove the workaround on affected Windows versions, make it explicitly optional, or limit suspension to the route-update operation rather than keeping a fundamental Windows service suspended for the entire VPN session.

The installed Amnezia binary was not patched. Full process dumps, clipboard contents, server addresses, credentials, and route lists are deliberately omitted.

<!-- gh-comment-id:5968800423 --> @DenTheProgrammer commented on GitHub (Oct 3, 2026): Additional confirmed reproduction on **AmneziaVPN 4.8.19.0** (client and service), **Windows 11 Home Single Language 25H2, build 26200.9457, x64**. The user-visible symptom is a frozen **Win+V clipboard-history panel** that remains open and stops handling input. Start/search had previously shown a similar WinHTTP wait. Restarting Explorer temporarily masks the symptom. During the actual Win+V freeze: - The active site/CIDR split-tunneling setup had about 810 manually added IPv4 routes on the physical interface, exceeding the 500-route threshold. No route contents or VPN credentials are included here. - SCM reported `Wcmsvc` as Running, but **all 22 threads of its dedicated svchost process were in `Wait / Suspended` state**. A briefly inspected thread already had a **suspend count of 1 before the diagnostic inspection**. - `WinHttpAutoProxySvc` had roughly 290 threads, most waiting for shared/exclusive locks. A pending call was blocked in `DNSAPI!DnsConnectionGetProxyInfoForHostUrlEx -> wcmapi!WcmGetInterfaceContextTable -> RPC`. - `TextInputHost`'s affected UI thread was blocked in `WinHTTP!WinHttpResolverGetProxyForUrl`, reached through WinINET/URLMON/EdgeHTML. Other TextInputHost threads were waiting for it. - The ordinary clipboard was not locked by an application. User proxy auto-detection and machine WinHTTP WPAD detection were already disabled; that did not prevent this hang. **Controlled recovery without restarting Explorer, TextInputHost, the VPN, or the network services:** resuming only the suspended `Wcmsvc` process with `NtResumeProcess` restored service-control responsiveness (successful `sc interrogate Wcmsvc` in about 99 ms). The same TextInputHost UI thread immediately returned to its normal message-wait loop. VPN connectivity and the existing routes were preserved. The current release source still contains the indefinite suspension: - [5.0.3.0 RouterWin::routeAddList](https://github.com/amnezia-vpn/amnezia-client/blob/5.0.3.0/service/server/router_win.cpp#L135): `if (m_ipForwardRows.size() > 500) suspendWcmSvc(true);` - [clearSavedRoutes](https://github.com/amnezia-vpn/amnezia-client/blob/5.0.3.0/service/server/router_win.cpp#L184) is where the matching resume happens. This demonstrates an impact on Windows shell UI, beyond application launch/download hangs. It would be helpful to remove the workaround on affected Windows versions, make it explicitly optional, or limit suspension to the route-update operation rather than keeping a fundamental Windows service suspended for the entire VPN session. The installed Amnezia binary was not patched. Full process dumps, clipboard contents, server addresses, credentials, and route lists are deliberately omitted.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
amnezia-vpn/amnezia-client#1164
No description provided.