Strange CLI Hang
The Problem
Spoiler: I fixed the bug. Now I’m just trying to figure out what exactly was going on under the hood to cause it.
So, here’s the setup: running the
magic
CLI with commands like:
would just hang. Like, forever. Adding -v
didn’t help—no extra logs, no hints, just silence. Strangely enough, the same command worked fine on another computer, so clearly, it wasn’t magic
itself but something about this specific machine. Time to dig.
Debugging the Problem
After using strace
to trace the syscalls from magic
, a pattern started to emerge:
- It was constantly making calls related to network interfaces, sockets, and futex (thread synchronization).
- A bunch of processes were stuck on FUTEX_WAIT
, and there were many interactions with netlink
(the thing Linux uses to mess with networking stuff).
- Then I noticed something specific: all the netlink traffic seemed tied to a virtual interface called tailscale0
.
Tailscale (a VPN thing) was running on the machine, so I stopped it as a test:
And guess what? Problem solved.
Question
So, does anyone know why Tailscale and magic
got into this weird interaction? What’s happening under the hood that makes Tailscale’s setup interfere like this?
If this turns out to be a bug on the magic side, I'll file a github issue3 Replies
There's an existing thread about this issue with Magic.
(Beyond that, I don't know anything about this issue.)
Maybe message @ms he had an issue with tailscale the other day
there are multiple reported bugs on this issue already, and a workaround fix got pushed out as a prerelease. next update should have the fix