package espeak-data 1.46.02-2ubuntu1 failed to install/upgrade: unable to move aside `./usr/lib/i386-linux-gnu/espeak-data/voices/en' to install new version: Invalid cross-device link

Bug #1220681 reported by Tobiasz Jarczyk
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
espeak (Ubuntu)
Fix Released
Undecided
Martin Pitt
Saucy
Fix Released
Medium
Unassigned

Bug Description

automated report during do-release-upgrade -s -d

---- relevant log ----
Preparing to replace espeak-data:i386 1.46.02-2ubuntu1 (using .../espeak-data_1.47.11-1_i386.deb) ...
Unpacking replacement espeak-data:i386 ...
dpkg: error processing /var/cache/apt/archives/espeak-data_1.47.11-1_i386.deb (--unpack):
 unable to move aside `./usr/lib/i386-linux-gnu/espeak-data/voices/en' to install new version: Invalid cross-device link
-----------------------

ProblemType: Package
DistroRelease: Ubuntu 13.10
Package: espeak-data 1.46.02-2ubuntu1
ProcVersionSignature: Ubuntu 3.8.0-29.42-generic 3.8.13.5
Uname: Linux 3.8.0-29-generic i686
NonfreeKernelModules: wl
ApportVersion: 2.9.2-0ubuntu8.3
Architecture: i386
CheckboxSubmission: b5c71cdd2e648a5dc8e6dfd1c7c6007f
CheckboxSystem: 669b662da410063cc918e0f60cf6cddf
Date: Wed Sep 4 13:26:42 2013
Dependencies:

DuplicateSignature: package:espeak-data:1.46.02-2ubuntu1:ErrorMessage: nie można przenieść "./usr/lib/i386-linux-gnu/espeak-data/voices/en", aby zainstalować nową wersję: Błędne dowiązanie między urządzeniami
ErrorMessage: ErrorMessage: nie można przenieść "./usr/lib/i386-linux-gnu/espeak-data/voices/en", aby zainstalować nową wersję: Błędne dowiązanie między urządzeniami
InstallationDate: Installed on 2011-02-25 (921 days ago)
InstallationMedia: Ubuntu-Netbook 10.10 "Maverick Meerkat" - Release i386 (20101007)
MarkForUpload: True
SourcePackage: espeak
Title: package espeak-data 1.46.02-2ubuntu1 failed to install/upgrade: ErrorMessage: nie można przenieść "./usr/lib/i386-linux-gnu/espeak-data/voices/en", aby zainstalować nową wersję: Błędne dowiązanie między urządzeniami
UpgradeStatus: Upgraded to saucy on 2013-09-04 (0 days ago)

Revision history for this message
Tobiasz Jarczyk (dotnokato-q) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Martin Pitt (pitti) wrote :

This is reproduced in the automatic upgrade testing:

  http://d-jenkins.ubuntu-ci:8080/view/Upgrade/job/upgrade-ubuntu-quantal-trusty-desktop-i386/3/console

Sorry, not viewable to non-Canonical folks yet, and not yet mirrored to jenkins.qa.ubuntu.com

summary: - package espeak-data 1.46.02-2ubuntu1 failed to install/upgrade:
- ErrorMessage: nie można przenieść "./usr/lib/i386-linux-gnu/espeak-
- data/voices/en", aby zainstalować nową wersję: Błędne dowiązanie między
- urządzeniami
+ package espeak-data 1.46.02-2ubuntu1 failed to install/upgrade: unable
+ to move aside `./usr/lib/i386-linux-gnu/espeak-data/voices/en' to
+ install new version: Invalid cross-device link
Changed in espeak (Ubuntu):
status: New → Confirmed
description: updated
Revision history for this message
Martin Pitt (pitti) wrote :

In the old version, voices/en/ is a directory:

  /usr/lib/x86_64-linux-gnu/espeak-data/voices/en/
  /usr/lib/x86_64-linux-gnu/espeak-data/voices/en/en
  /usr/lib/x86_64-linux-gnu/espeak-data/voices/en/en-us

(containing "en", "en-us", etc.), while in the new version it is a plain file:

  /usr/lib/x86_64-linux-gnu/espeak-data/voices/en
  /usr/lib/x86_64-linux-gnu/espeak-data/voices/en-us

So it looks to me like dpkg sometimes has troubles to replace the old directory with a file?

I tried this upgrade in a precise and quantal schroot (one using overlayfs, the other isn't, it's a tarball schroot) as well as just with espeak-data quantal → trusty upgrade on my production system, and on a precise live image. I also tried that upgrade with the old and new dpkg. In no case I could reproduce this bug.

As a workaround we might add a preinst script which just rm -r's /usr/lib/x86_64-linux-gnu/espeak-data/voices before the upgrade, but that would actually be wrong in the case that the upgrade fails, and it would not explain why that bug happens in the first place.

Revision history for this message
Martin Pitt (pitti) wrote :

Note that this doesn't seem to affect upgrades from precise: In 1.46.02-0ubuntu1 the files were still in /usr/share/espeak-data/voices/.

Revision history for this message
Martin Pitt (pitti) wrote :

I tried the update of that deb in a saucy LXC container, and I cannot recreate this bug there either.

Revision history for this message
Martin Pitt (pitti) wrote :

I logged into the DC machines, started a quantal container, and merely did

$ sudo apt-get install espeak-data
$ wget https://launchpad.net/ubuntu/+source/espeak/1.47.11-1/+build/4815697/+files/espeak-data_1.47.11-1_amd64.deb
$ sudo dpkg -i espeak-data_1.47.11-1_amd64.deb

This reproduces the bug. stracing yields:

1810 rename("/usr/lib/x86_64-linux-gnu/espeak-data/voices/en", "/usr/lib/x86_64-linux-gnu/espeak-data/voices/e
n.dpkg-tmp") = -1 EXDEV (Invalid cross-device link)

Curiously, calling mv on that very directory works fine:

$ sudo strace -fvvs1024 mv /usr/lib/x86_64-linux-gnu/espeak-data/voices/en{,.old}
[...]

2103 rename("/usr/lib/x86_64-linux-gnu/espeak-data/voices/en", "/usr/lib/x86_64-linux-gnu/espeak-data/voices/en.old") = 0

Revision history for this message
Martin Pitt (pitti) wrote :

Interestingly this only happens with lxc-start-ephemeral, i. e. with an aufs/overlayfs overlay. If I use lxc-clone/lxc-start, this upgrade works perfectly well. The EXDEV happens with both aufs and overlayfs though.

Tobiasz: What kind of upgrade did you do when you encountered this? Was this an LXC container or a physical machine?

Revision history for this message
Martin Pitt (pitti) wrote :

I tried to reproduce this locally on my trusty amd64, but this works:

sudo lxc-create -P /tmp/ -t ubuntu -n quantal-amd64 -- -r quantal
sudo lxc-start-ephemeral -P /tmp -o quantal-amd64

then in the container, as above:

sudo apt-get install espeak-data wget
wget http://archive.ubuntu.com/ubuntu/pool/main/e/espeak/espeak-data_1.47.11-1_amd64.deb
sudo dpkg -i espeak-data_1.47.11-1_amd64.deb

I tried this with both the current trusty (3.13.0-4 and -5) and saucy (3.11.0-15) on the host. However, this is a less complex VM than the one used in the auto upgrade tester.

Martin Pitt (pitti)
Changed in espeak (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
status: Confirmed → In Progress
Martin Pitt (pitti)
Changed in espeak (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Tobiasz Jarczyk (dotnokato-q) wrote :

Hi Martin,
This was run sandboxed (do-release-upgrade -s -d) on a physical machine.

Revision history for this message
Martin Pitt (pitti) wrote :

Thanks Tobiasz, that confirms the problem that it only happens with an overlay filesystem.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package espeak - 1.47.11-1ubuntu1

---------------
espeak (1.47.11-1ubuntu1) trusty; urgency=medium

  * Add debian/espeak-data.preinst.in: Move aside
    /usr/lib/<arch>/espeak-data/voices/en for upgrades; this directory got
    replaced with file, and triggers a bug in overlays when dist-upgrading
    containers. Add some magic to debian/rules to create the .preinst with
    filling out the particular architecture (as dpkg-architecure may not be
    available in the preinst). This is a hackish workaround and can be
    dropped again in trusty+1. (LP: #1220681)
 -- Martin Pitt <email address hidden> Tue, 21 Jan 2014 14:48:33 +0100

Changed in espeak (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

Uploaded saucy update (essentially the same as the trusty upload, just with slightly lower version number). Test case is in comment 6; I'm afraid I haven't yet found out how to reliably reproduce/verify that in a simpler way.

Changed in espeak (Ubuntu Saucy):
status: New → In Progress
Changed in espeak (Ubuntu Saucy):
importance: Undecided → Medium
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Tobiasz, or anyone else affected,

Accepted espeak into saucy-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/espeak/1.47.11-1ubuntu0.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in espeak (Ubuntu Saucy):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Martin Pitt (pitti) wrote :

For verification, I started an LXC quantal container, then

  sudo apt-get install espeak-data
  change /etc/apt/sources.list from quantal to saucy
  sudo apt-get install espeak-data # that also upgrades some other bits like libc
  → espeak-data fails with that error

Now, shut down container, start it again, but this time enable saucy-proposed. Now the install/upgrade succeeds without error.

-rw-r--r-- 1 root root 264 Jan 30 14:33 /usr/lib/x86_64-linux-gnu/espeak-data/voices/en-us

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package espeak - 1.47.11-1ubuntu0.1

---------------
espeak (1.47.11-1ubuntu0.1) saucy-proposed; urgency=medium

  * Add debian/espeak-data.preinst.in: Move aside
    /usr/lib/<arch>/espeak-data/voices/en for upgrades; this directory got
    replaced with file, and triggers a bug in overlays when dist-upgrading
    containers. Add some magic to debian/rules to create the .preinst with
    filling out the particular architecture (as dpkg-architecure may not be
    available in the preinst). This is a hackish workaround and can be
    dropped again in trusty+1. (LP: #1220681)
 -- Martin Pitt <email address hidden> Tue, 21 Jan 2014 14:48:33 +0100

Changed in espeak (Ubuntu Saucy):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for espeak has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.