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


Message #30 received at [email protected] (full text, mbox, reply):

Received: (at 836211) by bugs.debian.org; 2 Sep 2016 13:04:03 +0000
From [email protected] Fri Sep 02 13:04:03 2016
X-Spam-Checker-Version: SpamAssassin 3.4.0-bugs.debian.org_2005_01_02
	(2014-02-07) on buxtehude.debian.org
X-Spam-Level: 
X-Spam-Status: No, score=-10.5 required=4.0 tests=BAYES_00,FROMDEVELOPER,
	HAS_BUG_NUMBER,RP_MATCHES_RCVD autolearn=ham autolearn_force=no
	version=3.4.0-bugs.debian.org_2005_01_02
X-Spam-Bayes: score:0.0000 Tokens: new, 14; hammy, 150; neutral, 102; spammy,
	0. spammytokens: hammytokens:0.000-+--H*F:U*guillem,
	0.000-+--H*rp:D*master.debian.org, 0.000-+--H*r:guillem, 0.000-+--H*RU:216,
	0.000-+--Hx-spam-relays-external:216
Return-path: <[email protected]>
Received: from master.debian.org ([2001:41b8:202:deb:216:36ff:fe40:4001])
	from C=NA,ST=NA,L=Ankh Morpork,O=Debian SMTP,OU=Debian SMTP CA,CN=master.debian.org,[email protected] (verified)
	by buxtehude.debian.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
	(Exim 4.84_2)
	(envelope-from <[email protected]>)
	id 1bfo8Y-0007Tc-Ss
	for [email protected]; Fri, 02 Sep 2016 13:04:03 +0000
Received: from guillem by master.debian.org with local (Exim 4.84_2)
	(envelope-from <[email protected]>)
	id 1bfo8W-0004mL-8m; Fri, 02 Sep 2016 13:04:00 +0000
Date: Fri, 2 Sep 2016 15:03:54 +0200
From: Guillem Jover <[email protected]>
To: Miklos Szeredi <[email protected]>, [email protected]
Cc: Raphael Hertzog <[email protected]>,
	Felipe Sateler <[email protected]>,
	"[email protected]" <[email protected]>
Subject: Re: Bug#836211: dpkg: Cannot upgrade some packages on overlayfs:
 Invalid cross-device link
Message-ID: <[email protected]>
Mail-Followup-To: Guillem Jover <[email protected]>,
	Miklos Szeredi <[email protected]>, [email protected],
	Raphael Hertzog <[email protected]>,
	Felipe Sateler <[email protected]>,
	"[email protected]" <[email protected]>
References: <147265657047.31705.7496372748096616425.reportbug@felipepc>
 <[email protected]>
 <CAJfpegu-JhRpDmzx1=fLsnL+=FTsAX21Up5A6s4eQFDPZ2ET3g@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <CAJfpegu-JhRpDmzx1=fLsnL+=FTsAX21Up5A6s4eQFDPZ2ET3g@mail.gmail.com>
User-Agent: NeoMutt/ (1.7.0)
Hi!

On Fri, 2016-09-02 at 14:30:58 +0200, Miklos Szeredi wrote:
> You are the first to report that this quirk actually causes problems
> in real life.
> 
> I have plans to fix this by adding a "redirector" attribute so that
> copied up directories (and perhaps files) can refer to lower directory
> that is found at a different ___location relative to the root of the
> overlay from the ___location of the upper directory.
> 
> Maybe an example can make this more clear:
> 
> lower/foo/bar/baz
> upper/foo/bar <- whiteout
> upper/moved/here <- redirects to "foo/bar"
> 
> will result in the tree:
> 
> overlay/moved/here/baz

That'd be very much appreciated, thanks!

> > It does not seem very correct to put the burden on user-space to be aware
> > of overlayfs restrictions such as this one. Renaming a directory is
> > not something that happens often in practice in the uses cases where
> > we use overlayfs but it's still frequent enough to deserve better than
> > a EXDEV error IMO and dpkg trying to rename "foo/" into "foo.dpkg-tmp/"
> > is in its right to assume that this rename will not cross any device
> > boundary.
> 
> The EXDEV trick  just works for mv(1), hence this didn't seem to be a
> big issue in practice.

In dpkg, the directory is rename(2)d to perform an atomic temporary backup,
so that it can be rolled-back in case of errors during unpacking. Having to
possibly do a deep-copy and a deep-remove, and then trying to recover from
errors inbetween those, would be very unsatisfactory.

Thanks,
Guillem



Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Mon May 12 02:39:16 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.