Device numbers overflow on Linux x86_64
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-
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-