Bug#806534: libio-pty-easy-perl: nondeterministic failures in t/read-write.t

Niko Tyni ntyni at debian.org
Sat Nov 28 15:19:07 UTC 2015


Package: libio-pty-easy-perl
Version: 0.09-1
Severity: normal
Forwarded: https://rt.cpan.org/Public/Bug/Display.html?id=95702
User: debian-perl at lists.debian.org
Usertags: autopkgtest

Test 3 in t/read-write.t occasionally fails on ci.debian.net. See
 https://ci.debian.net/packages/libi/libio-pty-easy-perl/unstable/amd64/

I can reproduce this by running the test in a loop and adding
other load to the system. It could make the build fail, although
the reproducible.debian.net system hasn't seen that yet.

The test writes a large (1M) string to a subprocess that doesn't consume
any input. This write is presumably expected to block. The test then sets
up a timed alarm (1s) with a handler that immediately tries to write even
more. The second write is expected to fail, but it sometimes succeeds,
causing a test failure.

Looking at strace output for the test failure, the select() call in
IO::PTY::Easy::write() indeed returns immediately indicating that the
write FD is ready for writing. The number of bytes written when the alarm
signal arrives is a bit less than for the "normal" case, 11776 vs. 13824,
but giving the syswrite() more time doesn't make the bug go away.

Given the next test is a related TODO test for write timeouts, I'd say
this is not worth the trouble. I'm inclined to just disable the test.

This is also [rt.cpan.org #95702], and there's plenty of failure reports
on CPAN testers.
-- 
Niko Tyni   ntyni at debian.org



More information about the pkg-perl-maintainers mailing list