drinkcat / chroagh

Chromium OS Archlinux Chroot Environment
BSD 3-Clause "New" or "Revised" License
241 stars 27 forks source link

dbus-daemon holds onto the chroot upon exit #79

Open pcarrier opened 9 years ago

pcarrier commented 9 years ago

When running enter-chroot then leaving, chroagh logs that it won't unmount the filesystem as it is still in use.

lsof shows 2 dbus-daemon processes.

Killing them and repeating the process leads to the same failure.

chronos@localhost / $ sudo enter-chroot
Entering /mnt/stateful_partition/crouton/chroots/arch...
[pcarrier@localhost ~]$ logout
Not unmounting /mnt/stateful_partition/crouton/chroots/arch as another instance is using it.
jetpacktuxedo commented 9 years ago

I am running into the same issue as well. If you log out to exit the chroot, then kill the dbus daemon process, and then run unmount chroot it seems to clean itself up, but it shouldn't be held up like this.

chronos@localhost / $ sudo sh /media/removable/SD\ Card/chroots/bin/unmount-chroot -ap
19213 dbus-daemon --system --fork
Not unmounting /media/removable/SD Card/chroots/chroots/arch as another instance is using it.
19213 dbus-daemon --system --fork
chronos@localhost / $ sudo kill 19213
chronos@localhost / $ sudo sh /media/removable/SD\ Card/chroots/bin/unmount-chroot -ap
Unmounting /media/removable/SD Card/chroots/chroots/arch...

I was on an old chroagh build (like... from November old) until last night when I wiped it and reinstalled. That is when I started hitting issues.

jetpacktuxedo commented 9 years ago

Additionally, it looks like rperce over in Bug #77 had similar issues and worked up a kind of hacky fix. It would still be nice to resolve the issue without something that wonky, though.

rperce commented 9 years ago

@jetpacktuxedo if you're using my hacky fix and use tmux or screen make sure they're not spawning login shells; for tmux add set -g default-command bash (or zsh or fish or whatever shell you use). Dunno what's screen's way to do that is, but I'm sure google knows. If they are your dbus-daemon will die after exiting a tmux shell, which is almost never what you actually want.