Open ghost opened 1 year ago
this was the command i used which had this issue:
sudo bwrap \
--die-with-parent \
--ro-bind / / \
--tmpfs /tmp \
--dev-bind /dev/null /dev/null \
/usr/bin/bash
But it's also reproducible with all flatpak apps I use. CopyQ to name one.
Adding No it's not. Repeatedly retried to reproduce and bubblewrap still froze, despite hard
mount option appears to workaround the issue, however it's not really a workaround as it tends to freeze the accessing program forever until it became reachable again.hard
mount option being used.
The precise condition to reproduce this issue, is to make sure automount unit is active, and mount unit is stuck at mounting state (attempting to mount an unreachable filesystem), then all newly executed bubblewrap will also freeze, until the mount unit is timed out and failed, then bubblewrap will also fail complaining about the Can't bind mount
error.
bubblewrap will not freeze / throw error if only automount unit is active and mount unit is already failed. And of course it also won't freeze when mount unit is active.
to make sure mount unit is stuck at mounting state, you can configure firewall to drop all packets. bubblewrap will always freeze as the mount unit is stuck and throw error as soon as the mount unit is timed out and failed.
something's probably wrong with bubblewrap's bind mount handling.
sorry if the issue looks messy, i was tired trying to troubleshoot the root cause of my flatpak apps not autostarting.
for now setting automount path to /run/user/1000/mount
and then create a symlink ~/mount -> /run/user/1000/mount
workarounds the issue.
I still don't know why is having automount in /var/home
a issue, but not in /run/user
. but bruh, whatever.
If you setup a systemd automount similar to this:
And place bwrap/flatpak application desktop file into xdg-autostart directory (~/.config/autostart),(← this is unnecessary. just an unreachable automount is enough to reproduce the issue) it'll stuck for a very long time then give up:For instance, ALL my flatpak apps refuse to autostart just because an automount exists, the same error spams in
journalctl
. Disabling the automount fixes the issue.