Page MenuHomePhabricator

Workaround to Travis-CI Wine/Mingw build hanging occasionally
ClosedPublic

Authored by CCulianu on Aug 27 2017, 03:06.

Details

Summary

As you may recall, I investigated T44 and determined that it's a bug with Wine on Ubuntu 14.04. As such, occasionally and randomly, mingw builds fail on travis with no output for 10 mins.

On my Ubuntu 14.04 system I can also reproduce the hang (very occasionally) and when I do, indeed bitcoint_test.exe takes forever to run but it does complete.

So, as a workaround, I added travis vars and a small modification to test_bitcoin to print output to the console. Note: in order to do this I had to replace the default automake test logger with something that also spits to console.

This has been testedon travis and only in Windows builds on travis do we get the output. On linux and other builds everything works as before.

Test Plan

push a commit to GitHub on a travis-enabled repository and see if the windows builds error out with the '10 mins no output' bug. They shouldn't.

Here is a sample Travis build that worked perfectly. Note the Windows builds had console output to keep them alive:

https://travis-ci.org/cculianu/bitcoin-abc/builds/268807063

Diff Detail

Repository
rABC Bitcoin ABC
Branch
travis_nohang
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 772
Build 772: arc lint + arc unit

Event Timeline

Rebased to include all changes

Refactored the two test-driver scripts into 1 script for simplicity.

Is the problem this is working around happening for core ? What are the next step here. This would be acceptable as a transitional solution, but doesn't seems like a good plan long term.

configure.ac
1124 ↗(On Diff #1234)

Unused now, can get rid of

src/test/test-bitcoin-driver
113 ↗(On Diff #1234)

This condition deserves an explanatory comment I think.
Would be good to add a reference to the ticket or diff that prompted its addition,
and if this workaround is temporary but maybe the driver persists, maybe a TODO to remove this clause when possible.

All fair points.. I'll implement your recommendations.

Added freetrader's recommended changes

Is the problem this is working around happening for core ? What are the next step here. This would be acceptable as a transitional solution, but doesn't seems like a good plan long term.

Well, to be honest it's not the end of the world for test_bitcoin to spit some output. The python scripts do it likely for the same reason.

But the next step would be to figure out a way to debug wine and see if we can fix the actual test_bitcoin program to not trigger whatever bug in wine is happening.

Alternatively we can switch our travis build to use a later version of Ubuntu which hopefully wouldn't have this bug.

This revision is now accepted and ready to land.Aug 28 2017, 16:42
This revision was automatically updated to reflect the committed changes.