I've configured the system to use Tor by setting the SOCK proxy to port 9050 in Settings -> Network -> Network Proxy. At times, Tor takes ages to reconnect after the wifi driver crashes or whatever.
sudo killall -HUP tor does not put tor right again, so I'd naturally try
sudo systemctl restart tor instead.
This actually works, if I first switch to a text virtual console. Tor happily reconnects, usually quickly. I'm back at a lock screen when I switch back to X, or maybe even logged out, but the system stays up.
If however I do
sudo systemctl restart tor from a Terminal in X then the system hangs. I can still move the mouse, at least temporarily, but I cannot interact with anything. I cannot even switch to a text virtual console from the keyboard. I donno if
sshd stays up yet.
mutter, or another critical Gnome Shell component, has connections open through Tor, maybe even a connection to
dbus or X. And maybe it's a security vulnerability in the guilty process.
How should I go about diagnosing what Gnome Shell processes are talking to Tor, or the internet, that should not be? Are there AppArmor profiles or similar for Gnome Shell to fix this?