Bug#796798: perl: FTBFS on kfreebsd-*: t/op/stat.t failure

Steven Chamberlain steven at pyro.eu.org
Thu Dec 17 02:41:30 UTC 2015


Control: tags -1 + patch

Hi,

Sorry I didn't reply on this thread sooner.

Niko Tyni wrote:
> > On Mon, Aug 24, 2015 at 07:15:19PM +0300, Niko Tyni wrote:
> > >   t/op/stat ..................................................... FAILED at test 9
> 
> > > I see the buildds are now running kernel 10.1-0 while the earlier
> > > builds were on 9.0-2.
> > > 
> > > @buildd admins: any ideas? Are there known issues with ctime in
> > > /tmp on the buildds?

It could have been a configuration change on the buildds (maybe
softupdates are enabled now?) or otherwise a kernel code change in ufs,
nullfs (used for bind mounts) or vfs (file I/O more generally).

Looking at it more closely, the testcase is essentially:

  echo stuff > foo	# we expect mtime == ctime
  sleep 2
  ln foo bar		# this should update ctime of foo
  stat foo		# we expect mtime != ctime

If I merely stat() the file before the sleep - that fixes it - this is
actually a heisenbug!

The problem is with mtime.  It seems to be not calculated immediately,
but deferred until the next stat, after the hard link is created, such
that mtime=ctime and so the test fails.  A stat() right before the
sleep, or a much longer sleep (~30s), causes mtime to be calculated
earlier and so fixes it.

It's obviously a kernel behaviour, its unclear if it's a bug (it may be
an expected quirk of softupdates), and in any case definitely not a Perl
bug.  Might we please add a stat() to work around it, as attached;  that
would allow the test to still run, and still return a meaningful result
rather than skipping/ignoring the test on kfreebsd.

Thanks!
Regards,
-- 
Steven Chamberlain
steven at pyro.eu.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kfreebsd-bug796798.diff
Type: text/x-diff
Size: 518 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/perl-maintainers/attachments/20151217/d36495fe/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/perl-maintainers/attachments/20151217/d36495fe/attachment.sig>


More information about the Perl-maintainers mailing list