Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.bugs.dist > #1043211 > unrolled thread

Bug#884662: fakeroot: regular files sometimes treated as directories

Started byMattia Rizzolo <mattia@debian.org>
First post2021-01-19 00:40 +0100
Last post2021-01-19 18:10 +0100
Articles 3 — 3 participants

Back to article view | Back to linux.debian.bugs.dist

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Bug#884662: fakeroot: regular files sometimes treated as directories Mattia Rizzolo <mattia@debian.org> - 2021-01-19 00:40 +0100
    Bug#884662: fakeroot: regular files sometimes treated as directories Simon McVittie <smcv@debian.org> - 2021-01-19 09:40 +0100
    Bug#884662: fakeroot: regular files sometimes treated as directories Christoph Berg <myon@debian.org> - 2021-01-19 18:10 +0100

#1043211 — Bug#884662: fakeroot: regular files sometimes treated as directories

FromMattia Rizzolo <mattia@debian.org>
Date2021-01-19 00:40 +0100
SubjectBug#884662: fakeroot: regular files sometimes treated as directories
Message-ID<ByMhP-2op-3@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

Control: reassign -1 fakeroot 1.22-1
Control: retitle -1 fakeroot: regular files sometimes treated as directories when they are removed without fakeroot knowing
Control: affects -1 jenkins.debian.org

On Thu, Oct 08, 2020 at 01:39:09PM +0200, Christoph Berg wrote:
> > On Mon, 18 Dec 2017 at 23:30:05 +0000, Simon McVittie wrote:
> > > dpkg-deb: building package 'libglib2.0-data' in '../libglib2.0-data_2.54.2-2_all.deb'.
> > > tar: ./usr/share/locale/en_CA/LC_MESSAGES/glib20.mo/: Cannot savedir: Not a directory
> > 
> > This seems to be a symptom of some more general problem on the
> > reproducible-builds builders - I would guess it's either the
> > (FUSE?) filesystem, or a LD_PRELOAD hack that intercepts stat(), like
> > fakeroot does.
> 
> This "Not a directory" problem has started popping up in PostgreSQL
> build logs:
> 
> https://buildd.debian.org/status/fetch.php?pkg=pgagent&arch=alpha&ver=4.0.0-7&stamp=1602009768&raw=0

yay, at least we can't say it's a r-b infra problem only! \o/

> https://buildd.debian.org/status/fetch.php?pkg=pgagent&arch=sparc64&ver=4.0.0-7&stamp=1601991893&raw=0
> 
> It has also been seen on amd64.

> PG extension packages have started to run tests at build time, which
> is done via pg_virtualenv. Internally, for creating the temporary
> PostgreSQL server instance, LD_PRELOAD is unset, and that seems to be
> what confuses the "dh" and dpkg-buildpackage processes that share the
> same fakeroot instance.
> 
> jwilk did some debugging (thanks!) and came up with this simple
> recipe:
> 
> $ fakeroot sh -c 'mkdir foo; env -u LD_PRELOAD rmdir foo; touch bar; stat bar | grep directory' Size: 0               Blocks: 0          IO Block: 4096 directory
> 
> So, if "foo" is removed without fakeroot knowing, the "bar" file is
> reported as a directory. (It doesn't get it wrong for me, it depends
> on inode numbers being recycled and similar.)

Thank you for providing such simple reproducer!

The fact that it depends on inode number recylcing also expains why we
saw it more often in tests.r-b.o, since there we have many more
concurrent builds and as such more writes.

> jwilk also noted that glib-2.0's debian/rules unsets LD_PRELOAD for
> the test suite too which strengthens the evidence that fakeroot is to
> blame.

As such, I'm finally reasigning this bug to fakeroot, thank you to all
you involved in debugging the matter!

-- 
regards,
                        Mattia Rizzolo

GPG Key: 66AE 2B4A FCCF 3F52 DA18  4D18 4B04 3FCD B944 4540      .''`.
More about me:  https://mapreri.org                             : :'  :
Launchpad user: https://launchpad.net/~mapreri                  `. `'`
Debian QA page: https://qa.debian.org/developer.php?login=mattia  `-

[toc] | [next] | [standalone]


#1043257

FromSimon McVittie <smcv@debian.org>
Date2021-01-19 09:40 +0100
Message-ID<ByUIq-7CF-5@gated-at.bofh.it>
In reply to#1043211
On Tue, 19 Jan 2021 at 00:34:38 +0100, Mattia Rizzolo wrote:
> On Thu, Oct 08, 2020 at 01:39:09PM +0200, Christoph Berg wrote:
> > jwilk also noted that glib-2.0's debian/rules unsets LD_PRELOAD for
> > the test suite too which strengthens the evidence that fakeroot is to
> > blame.

FTR, we did that because it confuses unit tests that talk to each other
via D-Bus (I think the in-band communication based on geteuid() was faked
and said the client was uid 0, but the SCM_CREDENTIALS message still told
the truth and said it was uid > 0, making authentication fail). If it
avoids other fakeroot issues then that's just a happy coincidence.

    smcv

[toc] | [prev] | [next] | [standalone]


#1043341

FromChristoph Berg <myon@debian.org>
Date2021-01-19 18:10 +0100
Message-ID<Bz2FY-4l2-9@gated-at.bofh.it>
In reply to#1043211
Re: Mattia Rizzolo
> As such, I'm finally reasigning this bug to fakeroot, thank you to all
> you involved in debugging the matter!

Thanks!

Fwiw there is some other issue that looks similar but is afaict not
related to fakeroot because it persists with RRR:no. Debhelper thinks
some symlinks in debian/ were executable files even when they point to
plain files:

https://salsa.debian.org/salsa-ci-team/pipeline/-/issues/177
https://salsa.debian.org/postgresql/postgresql/-/jobs/1340632

If someone has an idea there that would connect the missing dots I'd
be very happy.

Christoph

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.bugs.dist


csiph-web