FS#73591 - apt-get install fails on LXC container: Invalid cross-device link

Attached to Project: Arch Linux
Opened by Mark Wigzell (mwigzell) - Wednesday, 02 February 2022, 00:10 GMT
Last edited by Andreas Radke (AndyRTR) - Friday, 11 February 2022, 20:13 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture x86_64
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
After making a copy of my LXC container, I then tried to install some packages. All packages I tried failed with "Invalid cross-device link" as reported below.
The LXC container was cloned from one created from an Ubuntu 20.04 amd64 image.

Additional info:
build: 5.16.3-arch1-1 #1 SMP PREEMPT Thu, 27 Jan 2022 14:18:25
* package version(s)
[code]
[root@confucius playtime_base]# pacman -Si lxc
Repository : community
Name : lxc
Version : 1:4.0.11-2
Description : Linux Containers
Architecture : x86_64
URL : https://linuxcontainers.org
Licenses : LGPL
Groups : None
Provides : None
Depends On : bash perl libseccomp libcap python rsync wget
Optional Deps : dnsmasq: lxc-net.service
lua
lua-filesystem: lxc-top
lua-alt-getopt: lxc-top
Conflicts With : None
Replaces : None
Download Size : 2.21 MiB
Installed Size : 23.03 MiB
Packager : Morten Linderud <foxboron@archlinux.org>
Build Date : Sun 24 Oct 2021 03:56:45 AM PDT
Validated By : MD5 Sum SHA-256 Sum Signature
[/code]
* config and/or log files etc.
root@playtimebase1:/usr/bin# apt-get install mesa-utils
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libdrm-amdgpu1 libdrm-common libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2 libgl1 libgl1-mesa-dri libglapi-mesa
libglvnd0 libglx-mesa0 libglx0 libllvm12 libpciaccess0 libsensors-config libsensors5 libvulkan1 libwayland-client0
libx11-xcb1 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-randr0 libxcb-shm0 libxcb-sync1
libxcb-xfixes0 libxfixes3 libxshmfence1 libxxf86vm1 mesa-vulkan-drivers
Suggested packages:
pciutils lm-sensors
The following NEW packages will be installed:
libdrm-amdgpu1 libdrm-common libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2 libgl1 libgl1-mesa-dri libglapi-mesa
libglvnd0 libglx-mesa0 libglx0 libllvm12 libpciaccess0 libsensors-config libsensors5 libvulkan1 libwayland-client0
libx11-xcb1 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-randr0 libxcb-shm0 libxcb-sync1
libxcb-xfixes0 libxfixes3 libxshmfence1 libxxf86vm1 mesa-utils mesa-vulkan-drivers
0 upgraded, 32 newly installed, 0 to remove and 0 not upgraded.
Need to get 34.9 MB of archives.
After this operation, 458 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libdrm-common all 2.4.105-3~20.04.2 [5552 B]
Get:2 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libdrm2 amd64 2.4.105-3~20.04.2 [32.3 kB]
Get:3 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libdrm-amdgpu1 amd64 2.4.105-3~20.04.2 [18.4 kB]
Get:4 http://archive.ubuntu.com/ubuntu focal/main amd64 libpciaccess0 amd64 0.16-0ubuntu1 [17.9 kB]
Get:5 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libdrm-intel1 amd64 2.4.105-3~20.04.2 [60.7 kB]
Get:6 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libdrm-nouveau2 amd64 2.4.105-3~20.04.2 [16.4 kB]
Get:7 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libdrm-radeon1 amd64 2.4.105-3~20.04.2 [19.7 kB]
Get:8 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libglapi-mesa amd64 21.0.3-0ubuntu0.3~20.04.5 [26.8 kB]
Get:9 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libllvm12 amd64 1:12.0.0-3ubuntu1~20.04.4 [18.8 MB]
Get:10 http://archive.ubuntu.com/ubuntu focal/main amd64 libsensors-config all 1:3.6.0-2ubuntu1 [6092 B]
Get:11 http://archive.ubuntu.com/ubuntu focal/main amd64 libsensors5 amd64 1:3.6.0-2ubuntu1 [27.4 kB]
Get:12 http://archive.ubuntu.com/ubuntu focal/main amd64 libvulkan1 amd64 1.2.131.2-1 [93.3 kB]
Get:13 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libgl1-mesa-dri amd64 21.0.3-0ubuntu0.3~20.04.5 [10.5 MB]
Get:14 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libx11-xcb1 amd64 2:1.6.9-2ubuntu1.2 [9372 B]
Get:15 http://archive.ubuntu.com/ubuntu focal/main amd64 libxcb-dri2-0 amd64 1.14-2 [6920 B]
Get:16 http://archive.ubuntu.com/ubuntu focal/main amd64 libxcb-dri3-0 amd64 1.14-2 [6552 B]
Get:17 http://archive.ubuntu.com/ubuntu focal/main amd64 libxcb-glx0 amd64 1.14-2 [22.1 kB]
Get:18 http://archive.ubuntu.com/ubuntu focal/main amd64 libxcb-present0 amd64 1.14-2 [5560 B]
Get:19 http://archive.ubuntu.com/ubuntu focal/main amd64 libxcb-shm0 amd64 1.14-2 [5584 B]
Get:20 http://archive.ubuntu.com/ubuntu focal/main amd64 libxcb-sync1 amd64 1.14-2 [8884 B]
Get:21 http://archive.ubuntu.com/ubuntu focal/main amd64 libxcb-xfixes0 amd64 1.14-2 [9296 B]
Get:22 http://archive.ubuntu.com/ubuntu focal/main amd64 libxfixes3 amd64 1:5.0.3-2 [10.9 kB]
Get:23 http://archive.ubuntu.com/ubuntu focal/main amd64 libxshmfence1 amd64 1.3-1 [5028 B]
Get:24 http://archive.ubuntu.com/ubuntu focal/main amd64 libxxf86vm1 amd64 1:1.1.4-1build1 [10.2 kB]
Get:25 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libglx-mesa0 amd64 21.0.3-0ubuntu0.3~20.04.5 [138 kB]
Get:26 http://archive.ubuntu.com/ubuntu focal/main amd64 libwayland-client0 amd64 1.18.0-1 [23.9 kB]
Get:27 http://archive.ubuntu.com/ubuntu focal/main amd64 libxcb-randr0 amd64 1.14-2 [16.3 kB]
Get:28 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 mesa-vulkan-drivers amd64 21.0.3-0ubuntu0.3~20.04.5 [4731 kB]
Get:29 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libglvnd0 amd64 1.3.2-1~ubuntu0.20.04.1 [51.4 kB]
Get:30 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libglx0 amd64 1.3.2-1~ubuntu0.20.04.1 [32.6 kB]
Get:31 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libgl1 amd64 1.3.2-1~ubuntu0.20.04.1 [86.9 kB]
Get:32 http://archive.ubuntu.com/ubuntu focal/universe amd64 mesa-utils amd64 8.4.0-1build1 [34.2 kB]
Fetched 34.9 MB in 8s (4470 kB/s)
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7, <> line 32.)
debconf: falling back to frontend: Teletype
Extracting templates from packages: 100%
Selecting previously unselected package libdrm-common.
(Reading database ... 15943 files and directories currently installed.)
Preparing to unpack .../00-libdrm-common_2.4.105-3~20.04.2_all.deb ...
Unpacking libdrm-common (2.4.105-3~20.04.2) ...
dpkg: error processing archive /tmp/apt-dpkg-install-8ibGfo/00-libdrm-common_2.4.105-3~20.04.2_all.deb (--unpack):
unable to install new version of './usr/share/doc/libdrm-common': Invalid cross-device link
Selecting previously unselected package libdrm2:amd64.
Preparing to unpack .../01-libdrm2_2.4.105-3~20.04.2_amd64.deb ...
Unpacking libdrm2:amd64 (2.4.105-3~20.04.2) ...
dpkg: error processing archive /tmp/apt-dpkg-install-8ibGfo/01-libdrm2_2.4.105-3~20.04.2_amd64.deb (--unpack):
unable to install new version of './usr/share/doc/libdrm2': Invalid cross-device link
* link to upstream bug report, if any
https://github.com/docker/for-linux/issues/480

Steps to reproduce:
As above: build an LXC container, bridged from Ubuntu 20.04 image. so xlc-copy to create a new image. attach to the new image and try to install a package with apt-get install.

This task depends upon

Closed by  Andreas Radke (AndyRTR)
Friday, 11 February 2022, 20:13 GMT
Reason for closing:  None
Additional comments about closing:  use IRC or forum for generic help
Comment by Magnus (DeArchDev) - Sunday, 06 February 2022, 08:33 GMT
This might help you(https://bbs.archlinux.org/viewtopic.php?id=241866)
Comment by Mark Wigzell (mwigzell) - Sunday, 06 February 2022, 20:37 GMT
Yes, is same symptoms of the link I posted above. The commonality I believe is that both Docker and LXC use the Overlay FS in order to store only the differences betweeen a parent and child container. But then when you go to update, you are getting a mix up of file systems which is causing that error message. The error message about cross-device linking is same if you link across two partitions, right? In order to run the Overlay FS the Kernel has to play ball. But surely someone knows about this? I don't.

Loading...