[GH-ISSUE #3391] [Linux][5.0.3.0] Error 101: sudo stalls during hostname resolution in IPv6 setup #3241

Open
opened 2026-11-07 17:58:02 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @artxxx001 on GitHub (Nov 3, 2026).
Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/3391

Environment

  • OS: Pop!_OS 24.04 LTS (x86_64), COSMIC desktop
  • Client: AmneziaVPN 5.0.3.0 (de93650)
  • VPN protocol: Xray
  • Connection imported via Share connection from phone
  • Service: AmneziaVPN.service running as root; ExecStart=/opt/AmneziaVPN/bin/AmneziaVPN-service

Description

On Linux, attempting to connect ends with ErrorCode::101 (Internal Error). Xray and tun2socks start, but the client fails at the step where it tries to disable IPv6 routing:

Failed to disable IPv6 routing
Could not disable ipv6
QProcess: Destroyed while process ("sudo") is still running.

In this case the underlying cause was a blocking hostname-resolution call from sudo, not an inability of the Linux kernel to change the IPv6 setting.

Reproduction and evidence

The computer hostname was Vector, but /etc/hosts did not initially contain an entry for that hostname:

127.0.0.1 localhost
::1 localhost

/etc/nsswitch.conf used:

hosts: files mdns4_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] dns myhostname

A trace of the Amnezia service and its children showed the following sequence (trimmed for clarity):

14:06:38.406468 execve("/usr/bin/sudo", ["/usr/bin/sudo", "sysctl", "-w", "net.ipv6.conf.all.disable_ipv6=1"], ...)
...
connect(6, {sa_family=AF_UNIX, sun_path="/run/systemd/resolve/io.systemd.Resolve"}, 42) = 0
sendto(6, "{\"method\":\"io.systemd.Resolve.ResolveHostname\",\"parameters\":{\"name\":\"Vector\",\"flags\":0}}\\0", ...) = 89
recvfrom(6, ..., MSG_DONTWAIT, ...) = -1 EAGAIN
ppoll([{fd=6, events=POLLIN}], 1, {tv_sec=119, ...}, NULL, 8 <unfinished ...>
14:06:40.418560 kill(87730, SIGKILL) = 0
...
+++ killed by SIGKILL +++

A second trace reproduced the same pattern, again showing sudo waiting for a reply from systemd-resolved and being killed about 2 seconds later.

Other findings:

  • /dev/net/tun was present and usable.
  • The Amnezia systemd service ran as root; PATH included /usr/bin and /usr/sbin.
  • IPv6 was enabled at kernel level (net.ipv6.conf.all.disable_ipv6=0).
  • Manually setting net.ipv6.conf.all.disable_ipv6=1 and net.ipv6.conf.default.disable_ipv6=1, then restoring both to 0, completed within approximately 1–6 ms.
  • The equivalent privileged writes via sudo in a temporary systemd service also completed in approximately 5–6 ms.
  • A service restart alone did not resolve the original connection failure.

Confirmed workaround

Adding a local hostname mapping and restarting the service:

127.0.1.1 Vector
sudo systemctl restart AmneziaVPN.service

After this, the client successfully established the VPN connection and stopped reporting Error 101.

Expected behavior

The client should handle hostname-resolution/subprocess failures gracefully and display a precise diagnostic rather than a generic IPv6 error. Since the service already runs as root, consider whether calling sudo is necessary. At minimum, the failure should identify a subprocess timeout or local hostname-resolution issue.

After connection succeeded, a shared-Xray-config DNS issue remained; it was fixed by reissuing the share link with AmneziaDNS disabled and is being documented separately in #3198.

Originally created by @artxxx001 on GitHub (Nov 3, 2026). Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/3391 ## Environment - OS: Pop!_OS 24.04 LTS (x86_64), COSMIC desktop - Client: AmneziaVPN 5.0.3.0 (`de93650`) - VPN protocol: Xray - Connection imported via **Share connection** from phone - Service: `AmneziaVPN.service` running as root; `ExecStart=/opt/AmneziaVPN/bin/AmneziaVPN-service` ## Description On Linux, attempting to connect ends with `ErrorCode::101 (Internal Error)`. Xray and `tun2socks` start, but the client fails at the step where it tries to disable IPv6 routing: ```text Failed to disable IPv6 routing Could not disable ipv6 QProcess: Destroyed while process ("sudo") is still running. ``` In this case the underlying cause was a blocking hostname-resolution call from `sudo`, not an inability of the Linux kernel to change the IPv6 setting. ## Reproduction and evidence The computer hostname was `Vector`, but `/etc/hosts` did **not** initially contain an entry for that hostname: ```text 127.0.0.1 localhost ::1 localhost ``` `/etc/nsswitch.conf` used: ```text hosts: files mdns4_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] dns myhostname ``` A trace of the Amnezia service and its children showed the following sequence (trimmed for clarity): ```text 14:06:38.406468 execve("/usr/bin/sudo", ["/usr/bin/sudo", "sysctl", "-w", "net.ipv6.conf.all.disable_ipv6=1"], ...) ... connect(6, {sa_family=AF_UNIX, sun_path="/run/systemd/resolve/io.systemd.Resolve"}, 42) = 0 sendto(6, "{\"method\":\"io.systemd.Resolve.ResolveHostname\",\"parameters\":{\"name\":\"Vector\",\"flags\":0}}\\0", ...) = 89 recvfrom(6, ..., MSG_DONTWAIT, ...) = -1 EAGAIN ppoll([{fd=6, events=POLLIN}], 1, {tv_sec=119, ...}, NULL, 8 <unfinished ...> 14:06:40.418560 kill(87730, SIGKILL) = 0 ... +++ killed by SIGKILL +++ ``` A second trace reproduced the same pattern, again showing `sudo` waiting for a reply from `systemd-resolved` and being killed about 2 seconds later. Other findings: - `/dev/net/tun` was present and usable. - The Amnezia systemd service ran as root; `PATH` included `/usr/bin` and `/usr/sbin`. - IPv6 was enabled at kernel level (`net.ipv6.conf.all.disable_ipv6=0`). - Manually setting `net.ipv6.conf.all.disable_ipv6=1` and `net.ipv6.conf.default.disable_ipv6=1`, then restoring both to `0`, completed within approximately 1–6 ms. - The equivalent privileged writes via `sudo` in a temporary systemd service also completed in approximately 5–6 ms. - A service restart alone did not resolve the original connection failure. ## Confirmed workaround Adding a local hostname mapping and restarting the service: ```text 127.0.1.1 Vector ``` ```bash sudo systemctl restart AmneziaVPN.service ``` After this, the client successfully established the VPN connection and stopped reporting Error 101. ## Expected behavior The client should handle hostname-resolution/subprocess failures gracefully and display a precise diagnostic rather than a generic IPv6 error. Since the service already runs as root, consider whether calling `sudo` is necessary. At minimum, the failure should identify a subprocess timeout or local hostname-resolution issue. ## Related, separate problem After connection succeeded, a shared-Xray-config DNS issue remained; it was fixed by reissuing the share link with AmneziaDNS disabled and is being documented separately in #3198.
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#3241
No description provided.