Debian Bug report logs - #836211
dpkg: Cannot upgrade some packages on overlayfs: Invalid cross-device link

version graph

Package: linux; Maintainer for linux is Debian Kernel Team <[email protected]>;

Affects: dpkg

Reported by: Felipe Sateler <[email protected]>

Date: Wed, 31 Aug 2016 15:18:06 UTC

Severity: normal

Tags: upstream

Found in versions 4.12.6-1, 4.6.4-1

Forwarded to [email protected]

Full log


🔗 View this message in rfc822 format

MIME-Version: 1.0
X-Mailer: MIME-tools 5.508 (Entity 5.508)
X-Loop: [email protected]
From: [email protected] (Debian Bug Tracking System)
To: Felipe Sateler <[email protected]>
Subject: Bug#836211 closed by Raphael Hertzog <[email protected]> (Re:
 Bug#836211: dpkg: Cannot upgrade some packages on overlayfs: Invalid
 cross-device link)
Message-ID: <[email protected]>
References: <[email protected]>
 <147265657047.31705.7496372748096616425.reportbug@felipepc>
X-Debian-PR-Message: they-closed 836211
X-Debian-PR-Package: linux
X-Debian-PR-Keywords: upstream
X-Debian-PR-Source: linux
Reply-To: [email protected]
Date: Fri, 25 Aug 2017 19:45:10 +0000
Content-Type: multipart/mixed; boundary="----------=_1503690310-6617-1"
[Message part 1 (text/plain, inline)]
This is an automatic notification regarding your Bug report
which was filed against the linux package:

#836211: dpkg: Cannot upgrade some packages on overlayfs: Invalid cross-device link

It has been closed by Raphael Hertzog <[email protected]>.

Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact Raphael Hertzog <[email protected]> by
replying to this email.


-- 
836211: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=836211
Debian Bug Tracking System
Contact [email protected] with problems
[Message part 2 (message/rfc822, inline)]
From: Raphael Hertzog <[email protected]>
To: Guillem Jover <[email protected]>
Subject: Re: Bug#836211: dpkg: Cannot upgrade some packages on overlayfs: Invalid cross-device link
Date: Fri, 25 Aug 2017 21:34:32 +0200
Version: 4.10.0-1~exp1

On Sat, 17 Sep 2016, Guillem Jover wrote:
> [ Reassigning to linux, where this can be fixed. Upstream has provided
>   a preliminary patch to this bug report, which might need testing and
>   perhaps some polishing? Trimmed irrelevant information. ]

I verified today that the issue is gone with Linux 4.12 and apparently
the appropriate patches have been merged for Linux 4.10 already (merged by
linus in commit ff0f962ca3c38239b299a70e7eea27abfbb979c3).

So I'm closing this bug.

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Support Debian LTS: https://www.freexian.com/services/debian-lts.html
Learn to master Debian: https://debian-handbook.info/get/
[Message part 3 (message/rfc822, inline)]
From: Felipe Sateler <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Subject: dpkg: Cannot upgrade some packages on overlayfs: Invalid cross-device link
Date: Wed, 31 Aug 2016 12:16:10 -0300
Package: dpkg
Version: 1.18.10
Severity: normal

Hi,

overlayfs does not support renaming directories when the directories
live in the lower filesystem:

 * Directory renames only allowed on "pure upper" (already created on
 * upper filesystem, never copied up).  Directories which are on lower or
 * are merged may not be renamed.  For these -EXDEV is returned and
 * userspace has to deal with it.  This means, when copying up a
 * directory we can rely on it and ancestors being stable.

https://github.com/torvalds/linux/blob/v4.8-rc2/fs/overlayfs/copy_up.c#L318-L322

Unfortunately this means that dpkg fails at least in the case where a
directory is converted into a file: apt 1.3~rc2 moves
/usr/share/bug/apt/script to /usr/share/bug/apt . This causes dpkg to
fail when running in an overlayfs with the following error:

# dpkg -i /var/cache/apt/archives/apt_1.3~rc3_amd64.deb 
(Reading database ... 11401 files and directories currently installed.)
Preparing to unpack .../archives/apt_1.3~rc3_amd64.deb ...
Unpacking apt (1.3~rc3) over (1.3~rc2) ...
dpkg: error processing archive
/var/cache/apt/archives/apt_1.3~rc3_amd64.deb (--install):
 unable to move aside './usr/share/bug/apt' to install new version: Invalid cross-device link
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Processing triggers for libc-bin (2.23-5) ...
Errors were encountered while processing:
 /var/cache/apt/archives/apt_1.3~rc3_amd64.deb

I don't know what the correct workaround should be.

This can break pre-build upgrades in sbuild when the schroot is of
overlayfs type.

-- System Information:
Debian Release: stretch/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'unstable'), (1, 'experimental-debug'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.6.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages dpkg depends on:
ii  libbz2-1.0   1.0.6-8
ii  libc6        2.23-5
ii  liblzma5     5.1.1alpha+20120614-2.1
ii  libselinux1  2.5-3
ii  tar          1.29b-1
ii  zlib1g       1:1.2.8.dfsg-2+b1

dpkg recommends no packages.

Versions of packages dpkg suggests:
ii  apt  1.3~rc3

-- no debconf information

Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Mon May 12 02:56:09 2025; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.