-
Notifications
You must be signed in to change notification settings - Fork 387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Error] Container with root + init logs out host user when first running distrobox enter #1193
Comments
@vitedevs thanks for reporting, can you try with last git version? there are lots of fixes on root+init containers I cannot reproduce on Aeon, Ubuntu and Fedora hosts |
i am seeing something similar, root+init freeze my whole system,
When i try to
my whole system freezes, nothing respond after "Firing up init system... " UPDATE: |
I was able to replicate the issue on a nixos env using sway, same results |
yeah i also see that, i think is odd but unrelated, i think the problematic line is on distrobox-init |
I suspect this is caused by some newly enabled systemd service. I get this under a specific sub-condition/case/variation: distrobox create --name "boxxy" --init --image ubuntu:22.04 --additional-packages "systemd libpam-systemd"
exit
distrobox enter "boxxy" # fine
exit
distrobox stop "boxxy"
distrobox enter "boxxy" # STILL fine
sudo systemctl list-unit-files | grep enabled | sort > ./before-desktop # I'm suspicous
sudo apt -y update && sudo apt -y install ubuntu-desktop # use apt-fast or nala if it's too slow for you, I usually just say "screw it" and mount /etc/apt from the host
sudo systemctl list-unit-files | grep enabled | sort > ./after-desktop
exit
distrobox stop "boxxy"
distrobox enter "boxxy" # BOOM, even after I log back in, I can't re-enter the distrobox I suspect something is attempting to grab the display (or account service, for that matter), kicking the user out. I haven't used arch in a while but I assume something in the default image is giving you an Xorg server and/or DM and/or WM and/or L(ogin)M(anager). Diffing the files... I may be inept, but I can't make heads or tails of the diff. But I can pipe them into python and know how to use sets! >>> from collections import namedtuple
>>> from pprint import pprint
>>> SystemctlUnit = namedtuple("SystemctlUnit", field_names="name,state,preset")
>>> before = set([SystemctlUnit(*x.strip().split()) for x in open("./before-desktop").readlines()])
>>> after = set([SystemctlUnit(*x.strip().split()) for x in open("./after-desktop").readlines()])
>>> pprint(after - before)
{SystemctlUnit(name='ModemManager.service', state='enabled', preset='enabled'),
SystemctlUnit(name='NetworkManager-dispatcher.service', state='enabled', preset='enabled'),
SystemctlUnit(name='NetworkManager-wait-online.service', state='enabled', preset='enabled'),
SystemctlUnit(name='NetworkManager.service', state='enabled', preset='enabled'),
SystemctlUnit(name='accounts-daemon.service', state='enabled', preset='enabled'),
SystemctlUnit(name='acpid.path', state='enabled', preset='enabled'),
SystemctlUnit(name='acpid.service', state='disabled', preset='enabled'),
SystemctlUnit(name='acpid.socket', state='enabled', preset='enabled'),
SystemctlUnit(name='alsa-utils.service', state='masked', preset='enabled'),
SystemctlUnit(name='anacron.service', state='enabled', preset='enabled'),
SystemctlUnit(name='anacron.timer', state='enabled', preset='enabled'),
SystemctlUnit(name='apparmor.service', state='enabled', preset='enabled'),
SystemctlUnit(name='apport-autoreport.path', state='enabled', preset='enabled'),
SystemctlUnit(name='apport-autoreport.timer', state='enabled', preset='enabled'),
SystemctlUnit(name='apport-forward.socket', state='enabled', preset='enabled'),
SystemctlUnit(name='bluetooth.service', state='enabled', preset='enabled'),
SystemctlUnit(name='brltty.service', state='disabled', preset='enabled'),
SystemctlUnit(name='cron.service', state='enabled', preset='enabled'),
SystemctlUnit(name='cups-browsed.service', state='enabled', preset='enabled'),
SystemctlUnit(name='cups.path', state='enabled', preset='enabled'),
SystemctlUnit(name='cups.service', state='enabled', preset='enabled'),
SystemctlUnit(name='cups.socket', state='enabled', preset='enabled'),
SystemctlUnit(name='fwupd-refresh.timer', state='enabled', preset='enabled'),
SystemctlUnit(name='gpu-manager.service', state='enabled', preset='enabled'),
SystemctlUnit(name='kerneloops.service', state='enabled', preset='enabled'),
SystemctlUnit(name='[email protected]', state='disabled', preset='enabled'),
SystemctlUnit(name='[email protected]', state='disabled', preset='enabled'),
SystemctlUnit(name='openvpn.service', state='enabled', preset='enabled'),
SystemctlUnit(name='[email protected]', state='disabled', preset='enabled'),
SystemctlUnit(name='power-profiles-daemon.service', state='enabled', preset='enabled'),
SystemctlUnit(name='pulseaudio-enable-autospawn.service', state='masked', preset='enabled'),
SystemctlUnit(name='rtkit-daemon.service', state='disabled', preset='enabled'),
SystemctlUnit(name='saned.service', state='masked', preset='enabled'),
SystemctlUnit(name='saned.socket', state='disabled', preset='enabled'),
SystemctlUnit(name='[email protected]', state='indirect', preset='enabled'),
SystemctlUnit(name='secureboot-db.service', state='enabled', preset='enabled'),
SystemctlUnit(name='snapd.apparmor.service', state='enabled', preset='enabled'),
SystemctlUnit(name='snapd.autoimport.service', state='enabled', preset='enabled'),
SystemctlUnit(name='snapd.core-fixup.service', state='enabled', preset='enabled'),
SystemctlUnit(name='snapd.recovery-chooser-trigger.service', state='enabled', preset='enabled'),
SystemctlUnit(name='snapd.seeded.service', state='enabled', preset='enabled'),
SystemctlUnit(name='snapd.service', state='enabled', preset='enabled'),
SystemctlUnit(name='snapd.snap-repair.timer', state='enabled', preset='enabled'),
SystemctlUnit(name='snapd.socket', state='enabled', preset='enabled'),
SystemctlUnit(name='snapd.system-shutdown.service', state='enabled', preset='enabled'),
SystemctlUnit(name='speech-dispatcherd.service', state='disabled', preset='enabled'),
SystemctlUnit(name='spice-vdagentd.service', state='indirect', preset='enabled'),
SystemctlUnit(name='sssd-autofs.service', state='indirect', preset='enabled'),
SystemctlUnit(name='sssd-autofs.socket', state='enabled', preset='enabled'),
SystemctlUnit(name='sssd-nss.service', state='indirect', preset='enabled'),
SystemctlUnit(name='sssd-nss.socket', state='enabled', preset='enabled'),
SystemctlUnit(name='sssd-pac.service', state='indirect', preset='enabled'),
SystemctlUnit(name='sssd-pac.socket', state='enabled', preset='enabled'),
SystemctlUnit(name='sssd-pam-priv.socket', state='enabled', preset='enabled'),
SystemctlUnit(name='sssd-pam.service', state='indirect', preset='enabled'),
SystemctlUnit(name='sssd-pam.socket', state='enabled', preset='enabled'),
SystemctlUnit(name='sssd-ssh.service', state='indirect', preset='enabled'),
SystemctlUnit(name='sssd-ssh.socket', state='enabled', preset='enabled'),
SystemctlUnit(name='sssd-sudo.service', state='indirect', preset='enabled'),
SystemctlUnit(name='sssd-sudo.socket', state='enabled', preset='enabled'),
SystemctlUnit(name='sssd.service', state='enabled', preset='enabled'),
SystemctlUnit(name='switcheroo-control.service', state='enabled', preset='enabled'),
SystemctlUnit(name='systemd-oomd.service', state='enabled', preset='enabled'),
SystemctlUnit(name='ua-reboot-cmds.service', state='enabled', preset='enabled'),
SystemctlUnit(name='ua-timer.timer', state='enabled', preset='enabled'),
SystemctlUnit(name='ubuntu-advantage.service', state='enabled', preset='enabled'),
SystemctlUnit(name='udisks2.service', state='enabled', preset='enabled'),
SystemctlUnit(name='unattended-upgrades.service', state='enabled', preset='enabled'),
SystemctlUnit(name='update-notifier-download.timer', state='enabled', preset='enabled'),
SystemctlUnit(name='update-notifier-motd.timer', state='enabled', preset='enabled'),
SystemctlUnit(name='upower.service', state='disabled', preset='enabled'),
SystemctlUnit(name='whoopsie.path', state='enabled', preset='enabled'),
SystemctlUnit(name='[email protected]', state='disabled', preset='enabled'),
SystemctlUnit(name='[email protected]', state='disabled', preset='enabled'),
SystemctlUnit(name='wpa_supplicant.service', state='enabled', preset='enabled'),
SystemctlUnit(name='[email protected]', state='disabled', preset='enabled')}
>>> pprint(before-after)
set()
with open("./disabler.sh", "a") as f:
for x in after - before:
print(f"systemctl disable {x.name}", file=f) For the sake of argument I said fuck it-- disable them all! sudo ./disabler.sh
exit Then stop and start-- it still logs me out, but, I can re-enter the distrobox sans-issue, which is progress. E: My issue appears to be resolved via |
Is this still happening with 1.7+? I still can't reproduce the issue with podman, rootful podman and docker sadly |
yes, i still can reproduce on
|
I'll need to check on Sericea then Quite busy with other stuff now, maybe a thing to check would be to send both podman and journalctl logs to a file while launching this, so we can try to pinpoint what unit triggers this |
i temporarily rebased to kinoite to test this out and i saw a quick disconnect on my internet but everything worked fine after it, so the issue seems related to how sway systemd services are setup IMO |
More than a sway problem, it probably still is a service that distrobox should mask, maybe you can do a diff between |
Hello, I created the container with this command: I see this line in the I have another ArchLinux container that was created with the command: And neither the issue nor the line posted above is present. Please find here out_ubuntu.log the output of |
Just a thought-- it would be great to dump a log of what services are being started to a known location, so issues like this could be debugged more easily. |
I tried to do my best, Those are my specs: here is systemctlstatus log before running After crashing I entered another tty and logged journalctl.log after crashing (started distrobox enter on 23:32:00 but wasn't sure on what to exclude, so I just kept the raw result of The journalctl). And another systemctl status here (for after crashing period, but on tty) systemctllog2.log |
This has been fixed as of commit a537dff |
Describe the bug
The same issue as: #344
I have an Arch container with some exported apps. Every time I enter the container or launch one of the exported apps, I get logged out from my (host) system. After that it works fine - until next host (re)boot.
To Reproduce
Expected behavior
Not be logged out.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: