Bug#848408: libapp-termcast-perl: FTBFS randomly (failing tests)

Niko Tyni ntyni at debian.org
Wed Dec 28 21:31:51 UTC 2016


(from https://bugs.debian.org/848408 in libapp-termcast-perl / App-Termcast :)

On Wed, Dec 28, 2016 at 11:07:14PM +0200, Niko Tyni wrote:

> I can reproduce this in a single CPU virtual machine, running
> the test case in a loop.
> 
> The process at the bottom of the stack is running 
> 
>  perl -ple 'last if /^\$/'
> 
> and it looks like the race is between this process exiting and its parent
> (IO::Pty::Easy) having enough time to read the last echoed newline.
> 
> Unfortunately it goes away with 'strace -f', so I don't have the full
> analysis, but the attached script reliably fixes it for me.

I note that all the occasionally failing tests in Term::Filter
(https://bugs.debian.org/843052) use the same style of running the
above script inside IO::Pty::Easy.  I expect they would also get fixed
by injecting sleep calls before the exit.

However, that is starting to feel more like a workaround than a real
fix. Instead, it would be better for IO::Pty::Easy not to lose the last
bits of output from its child processes.

I'm copying Jesse Luehrs, the upstream maintainer of all the three
affected modules. Jesse: I'll look into the IO::Pty::Easy side, but
please let me know if you have ideas.

(These are also filed as https://rt.cpan.org/Ticket/Display.html?id=118719
and https://github.com/doy/app-termcast/issues/3 )
-- 
Niko Tyni   ntyni at debian.org



More information about the pkg-perl-maintainers mailing list