Device numbers overflow on Linux x86_64

Bug #755583 reported by Nate Eldredge
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Duplicity
New
Undecided
Unassigned

Bug Description

In trying to use Duplicity to archive some backups from another OS, I found that it fails on device files with certain major/minor numbers. This is on Linux Ubuntu maverick x86_64; I cannot reproduce it on 32-bit x86. I've attached a log with the error message.

This is Duplicity 0.6.13, using the ubuntu package 0.6.13-0ubuntu1~maverick1. Python is 2.6.6, using the ubuntu package 2.6.6-2ubuntu2. The filesystem is ext4.

It seems this happens when the device file's st_rdev exceeds 2^31. The major and minor numbers are packed into this field in a funny way so it takes a little thought to see how to reproduce this. The encoding goes as follows: the 32 bits of st_rdev from high to low are:

MIN[19:8] MAJ[11:0] MIN[7:0]

(Actually it looks like st_rdev is really 64 bits, encoded as MAJ[31:12] MIN[31:8] MAJ[11:0] MIN[7:0], but it is not currently possible to create a device with the high 32 bits nonzero.)

So we have a 12-bit major number and a 20-bit minor number. It appears duplicity fails when bit 20 of the minor number is set. E.g. 'mknod foo c 0xfff 0xfffff' or 'mknod foo c 0x000 0x80000'.

Using the --exclude-device-files options does NOT prevent duplicity from failing.

Revision history for this message
Nate Eldredge (nate-thatsmathematics) wrote :
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.