[Bug 539814] Re: tar: futimens() with a bad file descriptor (AT_FDCWD) causes bootstrapping failure with kernels < 2.6.22

Nathan Stratton Treadway ubuntu.lp at nathanst.com
Mon Sep 20 15:00:11 BST 2010


On Fri, Sep 10, 2010 at 13:13:44 -0000, rollercoaster wrote:
> This also affects cp and touch from coreutils, maybe others.
> 
> root at monster:~# mkdir bla
> root at monster:~# cp -a bla blubb
> cp: preserving times for `blubb': Bad file descriptor
> root at monster:~# touch bla      
> touch: setting times of `bla': Bad file descriptor

(For what it's worth, LP: #552816 covers this gnulib/futimens()/old
kernel bug as it applies to coreutils .)

                                                Nathan

-- 
tar: futimens() with a bad file descriptor (AT_FDCWD) causes bootstrapping failure with kernels < 2.6.22
https://bugs.launchpad.net/bugs/539814
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is a direct subscriber.

Status in Ubuntu Release Notes: Triaged
Status in “tar” package in Ubuntu: Fix Released
Status in “tar” source package in Lucid: In Progress
Status in “tar” package in Debian: Fix Released
Status in “tar” package in Fedora: Unknown

Bug description:
Binary package hint: tar

Bootstrapping Ubuntu Lucid with debootstrap is currently impossible with any kernel < 2.6.22, due to a bug in tar - specifically it fails because of a change to eglibc.

According to the debian bug report It seems that before eglibc 2.10.2-3, calls to futimens failed silently, however due to a patch made to eglibc 2.10.2-3, if futimens is called without a valid file descriptor, it now fails with an "Bad File Descriptor" error, because the corresponding utimensat() syscall was not added until kernel 2.6.22

Test Case:
1) Boot a kernel older than 2.6.22
2) Attempt to Bootstrap Ubuntu Lucid to any target.
The bootstrap will fail once it attempts to unpack packages with: tar: ./postinst: Cannot utime: Bad file descriptor

A patch is available (attached in launchpad) originating from the associated debian bug, that ensures that futimens is only called with a valid file descriptor.
A debdiff for 1.22-2 ( changing to 1.22-2ubuntu1 ) will be attached shortly.






More information about the Ubuntu-sponsors mailing list