[GH-ISSUE #3130] [macOS 26.6.2] System-wide network deadlock in tun2socks/utun path triggered by Docker Desktop #1451

Open
opened 2026-10-14 03:42:44 +07:00 by bsakaguchi · 1 comment
Owner

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

[macOS 26.6.2] System-wide network deadlock in tun2socks/utun path triggered by Docker Desktop

Summary

macOS became completely unresponsive while AmneziaVPN was connected. The Apple-generated stackshot identified an explicit kernel lock cycle involving Docker Desktop and the input thread of the tunnel interface used by AmneziaVPN:

Deadlock: com.docker.backend (Docker) [81977] thread 0x9c5f82
  -> kernel_task [0] thread 0x91c3f9 "dlil_input_utun22"
  -> com.docker.backend (Docker) [81977] thread 0x9c5f82

Blocked by Deadlock: 58 tasks

The deadlock blocked WindowServer, Finder, Dock, runningboardd, powerd, mDNSResponder, AmneziaVPN, tun2socks, Docker Desktop, browsers, terminals, and IDEs. Normal Force Quit and shutdown were impossible, so the Mac had to be powered off by holding the power button.

This appears related to #2933 and possibly #2897, but the trigger and final lock graph are different. In this case, the lock cycle formed immediately after Docker Desktop started and opened many outbound connections through Amnezia's utun22 interface.

Environment

  • Hardware: MacBookPro18,2, Apple Silicon, 32 GB RAM
  • macOS: 26.6.2, build 25G83, arm64
  • AmneziaVPN: 5.0.1.5; bundle version 5.0.1 (5)
  • Tunnel process: /Applications/AmneziaVPN.app/Contents/MacOS/tun2socks
  • Tunnel interface: utun22
  • Protocol path: most likely XRay/VLESS or another Amnezia mode using the external tun2socks process
  • Docker Desktop: 4.66.1, build 222799
  • Docker networking: gVisor; UseVpnkit enabled
  • LuLu 4.5.1 network extension was also active
  • ProtonVPN was installed but disconnected

Expected behavior

Starting or using Docker Desktop while AmneziaVPN is connected should not deadlock the macOS networking stack. A failed socket or tunnel operation should return an error or time out without blocking unrelated applications, WindowServer, or system shutdown.

Actual behavior

Applications progressively stopped responding, followed by Finder, Dock, WindowServer, and essential system services. Keyboard shortcuts, Force Quit, terminal access, and normal shutdown stopped working. A forced power-off was required.

macOS recorded the reset as:

Boot failure count: 1
Boot faults: btn_rst,finger_reset force_off
Originally created by @sergiusd on GitHub (Sep 5, 2026). Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/3130 # [macOS 26.6.2] System-wide network deadlock in tun2socks/utun path triggered by Docker Desktop ## Summary macOS became completely unresponsive while AmneziaVPN was connected. The Apple-generated stackshot identified an explicit kernel lock cycle involving Docker Desktop and the input thread of the tunnel interface used by AmneziaVPN: ```text Deadlock: com.docker.backend (Docker) [81977] thread 0x9c5f82 -> kernel_task [0] thread 0x91c3f9 "dlil_input_utun22" -> com.docker.backend (Docker) [81977] thread 0x9c5f82 Blocked by Deadlock: 58 tasks ``` The deadlock blocked `WindowServer`, Finder, Dock, `runningboardd`, `powerd`, `mDNSResponder`, AmneziaVPN, `tun2socks`, Docker Desktop, browsers, terminals, and IDEs. Normal Force Quit and shutdown were impossible, so the Mac had to be powered off by holding the power button. This appears related to #2933 and possibly #2897, but the trigger and final lock graph are different. In this case, the lock cycle formed immediately after Docker Desktop started and opened many outbound connections through Amnezia's `utun22` interface. ## Environment - Hardware: MacBookPro18,2, Apple Silicon, 32 GB RAM - macOS: 26.6.2, build 25G83, arm64 - AmneziaVPN: 5.0.1.5; bundle version `5.0.1 (5)` - Tunnel process: `/Applications/AmneziaVPN.app/Contents/MacOS/tun2socks` - Tunnel interface: `utun22` - Protocol path: most likely XRay/VLESS or another Amnezia mode using the external `tun2socks` process - Docker Desktop: 4.66.1, build 222799 - Docker networking: gVisor; `UseVpnkit` enabled - LuLu 4.5.1 network extension was also active - ProtonVPN was installed but disconnected ## Expected behavior Starting or using Docker Desktop while AmneziaVPN is connected should not deadlock the macOS networking stack. A failed socket or tunnel operation should return an error or time out without blocking unrelated applications, `WindowServer`, or system shutdown. ## Actual behavior Applications progressively stopped responding, followed by Finder, Dock, `WindowServer`, and essential system services. Keyboard shortcuts, Force Quit, terminal access, and normal shutdown stopped working. A forced power-off was required. macOS recorded the reset as: ```text Boot failure count: 1 Boot faults: btn_rst,finger_reset force_off ```
Author
Owner

@stone-w4tch3r commented on GitHub (Oct 23, 2026):

I encountered repeated macos crashed with amnezia ON and docker ON. Reproduced it multiuple times, for me having both ON resulkts in crash in about 1h

This started only today, strange

I researched issue together with codex and asked it to upload info to github. Hope to help fixing it

ALL BELLOW THE LINE IS GENERATED BY CODEX GPT-6.1-SOL MEDIUM


Additional occurrence: the same Docker/kernel lock cycle also occurs with AmneziaWG

This appears to match this issue's lock-cycle signature. The additional finding is that the later incident used amneziawg-go, not tun2socks. The observations below were extracted from local Apple diagnostic reports, running-process snapshots, PF rules, and Docker's installer log. They do not establish which component introduces the locking bug.

All incident times below are October 23, 2026, UTC+05:00. The preface above describes the user's experience that day; this comment is being posted on October 24.

Environment

  • Apple Silicon Mac, model identifier Mac17,9, 48 GB RAM.
  • macOS 26.7.1, build 25G241.
  • AmneziaVPN 5.0.3 (0); installer version 5.0.3.0.
  • Docker Desktop 4.96.0 (243774) in the earlier hang report and 4.96.3 (244472) in the later report.
  • Docker's Use kernel networking for UDP setting was checked in the UI by the user and was off. This did not prevent recurrence.
  • The later working connection was managed by the root AmneziaVPN-service, with its child amneziawg-go, using utun6 with MTU 1376.

Other networking/security components were present and have not been isolated as variables:

  • Cisco AnyConnect Socket Filter Extension 4.10.02086, active.
  • Amiconnect tunnel extension 1.15.2573/1, active; its VPN reported connected.
  • Kaspersky system extension 12.2.0.32, active.
  • VMware Fusion networking services and virtual bridges were present.

This is not a clean-room reproduction. These components are disclosed as possible confounders, not identified causes.

Recorded incidents

1. First watchdog panic at 20:52

configd-2026-10-23-204953.ips identifies its unresponsive queue as IPConfigurationAgentQueue and records the following wait chain:

configd thread 1553334:
  kernel mutex 0xfffffe000c2b1be0 owned by thread 21088

com.docker.backend [3742], thread 21088:
  krwlock 0xfffffe000c2e4848 for reading owned by thread 1494558

kernel_task [0], thread 1494558, "dlil_input_utun22":
  kernel mutex 0x6ecd4ee646c791cd owned by thread 21088

The final two threads form a cycle. panic-full-2026-10-23-205224.0002.panic then records:

userspace watchdog timeout: no successful checkins from configd (1 induced crashes) in 180 seconds

2. Further hangs at 21:12 and 21:13

After the first reboot, two AmneziaVPN hang reports explicitly identify:

Deadlock: com.docker.backend (Docker) [13485] thread 0xdb33 -> kernel_task [0] thread 0xb9ed "dlil_input_utun22" -> com.docker.backend (Docker) [13485] thread 0xdb33

The reports list 35 and 37 tasks blocked by the deadlock. tun2socks and AmneziaVPN-service are among the blocked tasks. A shutdown-stall report was also generated before another reboot.

3. Recurrence with AmneziaWG at 23:16; watchdog panic at 23:31

After uninstalling and reinstalling AmneziaVPN, the user connected using AmneziaWG. Process snapshots verified amneziawg-go as the tunnel worker. The later AmneziaVPN hang report explicitly identifies:

Deadlock: com.docker.backend (Docker) [31595] thread 0x26382 -> kernel_task [0] thread 0x388f0 "dlil_input_utun6" -> com.docker.backend (Docker) [31595] thread 0x26382

The report lists 36 blocked tasks, including amneziawg-go [48098].

Docker thread 0x26382 is in close() and eventually waits in IORWLockRead on a read lock owned by kernel thread 0x388f0. The kernel tunnel input thread waits back on that Docker thread. The unsymbolicated intermediate kernel frames prevent attributing this to a specific kernel function from this report alone.

configd-2026-10-23-232925.ips again reports an unresponsive IPConfigurationAgentQueue, this time thread 357751. panic-full-2026-10-23-233149.0002.panic records the same 180-second configd watchdog timeout as the earlier panic.

The user reported loss of networking, an unresponsive AmneziaVPN GUI, Network/VPN/Wi-Fi settings failing to open, and an uninstaller that hung. macOS subsequently rebooted itself. Networking recovered after reboot.

Checks that passed before the later failure

At 22:42, the AmneziaWG connection completed nine HTTPS requests, three 10 MB downloads, and two 2 MB uploads. At 22:43–22:46, seven additional 5 MB downloads and seven Docker Engine API queries completed successfully over approximately three minutes. Docker backend PID 31595, which responded during those checks, is the process later identified in the deadlock.

These were brief transfer/API checks, not sustained container-network stress tests. Passing them did not establish stability.

The live PF audit during the working AmneziaWG connection showed amn/* anchors with outbound blocking, tunnel exceptions, IPv6 blocking, and DNS restrictions. No dummynet traffic-shaping rules were listed. The configured DNS destinations routed through utun6. Kill Switch and split-tunneling settings were not varied as controlled experiments.

Update timeline

Docker's installer log records:

  • October 21, 17:05: Docker 4.95.0 -> 4.96.0.
  • October 23, 22:06: Docker 4.96.0 -> 4.96.3.

The first recorded panic predates the second update, and the later deadlock occurred on 4.96.3. The user reports that the combination had previously worked for approximately one to two weeks. The exact change or workload that first triggered the problem around 20:30 has not been established; the upgrade timeline is correlation, not proof of a regression.

Relevance to this issue

  • The explicit Docker/backend-to-kernel-tunnel cycle matches the signature in this issue.
  • It also occurred with the full AmneziaVPN client's AmneziaWG path, so changing from its tun2socks path was insufficient on this machine.
  • The Docker kernel-UDP option being off was insufficient.
  • The client reinstall and Docker patch update were insufficient.
  • We have not tested whether the standalone App Store AmneziaWG Network Extension client avoids this failure.

Is there a maintainer-recommended workaround for this lock cycle, or a specific diagnostic capture that would help distinguish the PF, tunnel teardown, Docker socket-close, and third-party-filter paths? The raw Apple reports remain on the affected machine; this comment includes selected relevant excerpts rather than a full system diagnostic bundle.

<!-- gh-comment-id:6372778268 --> @stone-w4tch3r commented on GitHub (Oct 23, 2026): I encountered repeated macos crashed with amnezia ON and docker ON. Reproduced it multiuple times, for me having both ON resulkts in crash in about 1h This started only today, strange I researched issue together with codex and asked it to upload info to github. Hope to help fixing it ALL BELLOW THE LINE IS GENERATED BY CODEX GPT-6.1-SOL MEDIUM --- ## Additional occurrence: the same Docker/kernel lock cycle also occurs with AmneziaWG This appears to match this issue's lock-cycle signature. The additional finding is that the later incident used `amneziawg-go`, not `tun2socks`. The observations below were extracted from local Apple diagnostic reports, running-process snapshots, PF rules, and Docker's installer log. They do not establish which component introduces the locking bug. All incident times below are **October 23, 2026, UTC+05:00**. The preface above describes the user's experience that day; this comment is being posted on October 24. ## Environment - Apple Silicon Mac, model identifier `Mac17,9`, 48 GB RAM. - macOS **26.7.1**, build **25G241**. - AmneziaVPN **5.0.3 (0)**; installer version **5.0.3.0**. - Docker Desktop **4.96.0 (243774)** in the earlier hang report and **4.96.3 (244472)** in the later report. - Docker's **Use kernel networking for UDP** setting was checked in the UI by the user and was **off**. This did not prevent recurrence. - The later working connection was managed by the root `AmneziaVPN-service`, with its child `amneziawg-go`, using `utun6` with MTU 1376. Other networking/security components were present and have not been isolated as variables: - Cisco AnyConnect Socket Filter Extension **4.10.02086**, active. - Amiconnect tunnel extension **1.15.2573/1**, active; its VPN reported connected. - Kaspersky system extension **12.2.0.32**, active. - VMware Fusion networking services and virtual bridges were present. This is not a clean-room reproduction. These components are disclosed as possible confounders, not identified causes. ## Recorded incidents ### 1. First watchdog panic at 20:52 `configd-2026-10-23-204953.ips` identifies its unresponsive queue as `IPConfigurationAgentQueue` and records the following wait chain: ```text configd thread 1553334: kernel mutex 0xfffffe000c2b1be0 owned by thread 21088 com.docker.backend [3742], thread 21088: krwlock 0xfffffe000c2e4848 for reading owned by thread 1494558 kernel_task [0], thread 1494558, "dlil_input_utun22": kernel mutex 0x6ecd4ee646c791cd owned by thread 21088 ``` The final two threads form a cycle. `panic-full-2026-10-23-205224.0002.panic` then records: ```text userspace watchdog timeout: no successful checkins from configd (1 induced crashes) in 180 seconds ``` ### 2. Further hangs at 21:12 and 21:13 After the first reboot, two AmneziaVPN hang reports explicitly identify: ```text Deadlock: com.docker.backend (Docker) [13485] thread 0xdb33 -> kernel_task [0] thread 0xb9ed "dlil_input_utun22" -> com.docker.backend (Docker) [13485] thread 0xdb33 ``` The reports list 35 and 37 tasks blocked by the deadlock. `tun2socks` and `AmneziaVPN-service` are among the blocked tasks. A shutdown-stall report was also generated before another reboot. ### 3. Recurrence with AmneziaWG at 23:16; watchdog panic at 23:31 After uninstalling and reinstalling AmneziaVPN, the user connected using AmneziaWG. Process snapshots verified `amneziawg-go` as the tunnel worker. The later AmneziaVPN hang report explicitly identifies: ```text Deadlock: com.docker.backend (Docker) [31595] thread 0x26382 -> kernel_task [0] thread 0x388f0 "dlil_input_utun6" -> com.docker.backend (Docker) [31595] thread 0x26382 ``` The report lists **36 blocked tasks**, including `amneziawg-go [48098]`. Docker thread `0x26382` is in `close()` and eventually waits in `IORWLockRead` on a read lock owned by kernel thread `0x388f0`. The kernel tunnel input thread waits back on that Docker thread. The unsymbolicated intermediate kernel frames prevent attributing this to a specific kernel function from this report alone. `configd-2026-10-23-232925.ips` again reports an unresponsive `IPConfigurationAgentQueue`, this time thread `357751`. `panic-full-2026-10-23-233149.0002.panic` records the same 180-second `configd` watchdog timeout as the earlier panic. The user reported loss of networking, an unresponsive AmneziaVPN GUI, Network/VPN/Wi-Fi settings failing to open, and an uninstaller that hung. macOS subsequently rebooted itself. Networking recovered after reboot. ## Checks that passed before the later failure At 22:42, the AmneziaWG connection completed nine HTTPS requests, three 10 MB downloads, and two 2 MB uploads. At 22:43–22:46, seven additional 5 MB downloads and seven Docker Engine API queries completed successfully over approximately three minutes. Docker backend PID **31595**, which responded during those checks, is the process later identified in the deadlock. These were brief transfer/API checks, not sustained container-network stress tests. Passing them did not establish stability. The live PF audit during the working AmneziaWG connection showed `amn/*` anchors with outbound blocking, tunnel exceptions, IPv6 blocking, and DNS restrictions. No dummynet traffic-shaping rules were listed. The configured DNS destinations routed through `utun6`. Kill Switch and split-tunneling settings were not varied as controlled experiments. ## Update timeline Docker's installer log records: - **October 21, 17:05:** Docker **4.95.0 -> 4.96.0**. - **October 23, 22:06:** Docker **4.96.0 -> 4.96.3**. The first recorded panic predates the second update, and the later deadlock occurred on 4.96.3. The user reports that the combination had previously worked for approximately one to two weeks. The exact change or workload that first triggered the problem around 20:30 has not been established; the upgrade timeline is correlation, not proof of a regression. ## Relevance to this issue - The explicit Docker/backend-to-kernel-tunnel cycle matches the signature in this issue. - It also occurred with the full AmneziaVPN client's **AmneziaWG** path, so changing from its `tun2socks` path was insufficient on this machine. - The Docker kernel-UDP option being off was insufficient. - The client reinstall and Docker patch update were insufficient. - We have not tested whether the standalone App Store AmneziaWG Network Extension client avoids this failure. Is there a maintainer-recommended workaround for this lock cycle, or a specific diagnostic capture that would help distinguish the PF, tunnel teardown, Docker socket-close, and third-party-filter paths? The raw Apple reports remain on the affected machine; this comment includes selected relevant excerpts rather than a full system diagnostic bundle.
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#1451
No description provided.