89luca89 / distrobox

Use any linux distribution inside your terminal. Enable both backward and forward compatibility with software and freedom to use whatever distribution you’re more comfortable with. Mirror available at: https://gitlab.com/89luca89/distrobox

Home Page:https://distrobox.it/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Container crashes when installing some applications

rioka opened this issue · comments

Describe the bug
Cannot install VSCode on some distribution, experiencing a behavior close to the one described in [Error] using apt install, distrobox crash

To Reproduce

  • create distrobox container using debian (12 or testing images) or arch

    if using debian, simply followed official instruction

  • install vscode, either using apt or pacman

  • Installation fails; only relevant message I get is in journald

    Mar 31 12:42:07 ****** podman[82314]: 2024-03-31 12:42:07.543188948 +0100 BST m=+0.062748687 container exec_died 1935296f38e046c8eb2631c3c949a45cec802f229fc10840270b6037ba...

Expected behavior
VSCode is installed successfully.

Logs

Host system: debian testing, with

  • podman v4.9.3 (installed using apt)
  • distrobox v1.7.0.1 (installed using apt)

Additional context

  • Used images listed in distrobox-compatibility
  • Installation succeeds when using a Fedora 39 container
  • Installation succeeds when using a debian 12 container with podman "directly", i.e. podman create... then installing vscode in the container (I've only verified installation completes)
  • Got the same behavior with another application, but cannot recall which one 🤦‍♂️

This is a problem fixed on 1.7.1

I have the same issue in 1.7.1 with podman 5.0.0 on Arch
Running pacman -Syu always crashes the container (corrupting pacman database) during "Processing triggers" like mentioned in #1312

Maybe there's something more going on there?

Let's see I'll reopen this issue
Maybe it is something different

I'll try when back from holidays

For now can you try with a freshly pulled image, create a new container with 1.7.1 and see if this occurs?

Thanks!

I couldn't reproduce the issue with a freshly pulled archlinux:base-20240101.0.204074 image.

I noticed on the container with the issue that /usr/share/libalpm/scripts/distrobox_post_hook.sh contained 64 times:

#!/bin/sh
echo -e '#!/bin/sh\nexit 0' > /usr/share/libalpm/scripts/systemd-hook;

Which is not the case in the fresh container (the two lines are only present once).

It's probably time to upgrade my containers anyway, it seems the new assemble feature will make this easier. Usually I pacman -Syu them but maybe it's better practice to pull the latest image and reinstall all the packages every once in a while.