[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[lintian] Reimplementing t/runtests with IO::Async instead of threads



Hi,

I have started a branch where I have replaced the use of threads with
IO::Async in t/runtests.  This is because Perl "ithreads" are not really
working too well.
  In particular, I have seen seemly random crashes from them and in
Wheezy + Precise, we even see race-conditions, where perl refuses to
terminate (despite no more tests needs to be run).

Cons:
 * It will completely break the Precise build, since my implementation
   requires libio-async-perl 0.46 and Precise has 0.45. However, Wheezy
   still works AFAICT.
   - Can be fixed, if someone backports a newer version of
     libio-async-perl to Precise.

Pros:
 * We avoid all the "not quite so well-tested" parts of threaded perl
   that randomly crashes or gets stuck.
   - That would make our CI setup reliable for Wheezy at the price of
     dropping support for testing on Precise.
 * We can get Wheezy testing re-enabled on jenkins.d.n
   - I had Holger disable it due to the random deadlocks
 * We stop using "discouraged" parts of the Perl API[1].
 * We can start using IPC::Run / Lintian::Command in t/runtests again
   (I removed that because it sometimes deadlocked under threads).


The branch is available from my [git repository].  Review and patches
welcome.  Outstanding issues / known broken stuff:
 * Pretty/fancy process printing
 * Dumping of build logs on build failures
 * Showing the diff between expected and actual output on test failures
 * Recording of skipped/failed tests so the summary can list them

What works:
 * All the tests (in all suites) \o/

During the test, you will see the "raw" message dump from worker
processes, e.g.:

"""
progress -- debs::unpack-numerical-owner [Running unpack-[...] ]
progress -- debs::unpack-numerical-owner [building... ]
progress -- debs::unpack-numerical-owner [testing... ]
pass -- debs::md5sums-traversal []
"""

Before the rewrite, those 4 lines would have been "fancy-printed" as:

"Running unpack-numerical-owner... building... testing... done"

Anyway, checkout it, play with it and feel free to fix the stuff I broke! :)

~Niels

[1] The use of ithreads is being discouraged in Perl 5.20

http://perl5.git.perl.org/perl.git/commitdiff/10a4597703f4b044d3f968bf3923644ea2387f5c

[my git repository]
http://anonscm.debian.org/gitweb/?p=users/nthykier/lintian.git;a=shortlog;h=refs/heads/use-io-async



Reply to: