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
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

CCulianu created this revision.Aug 27 2017, 03:06
Herald added a reviewer: Restricted Project. · View Herald TranscriptAug 27 2017, 03:06
CCulianu updated this revision to Diff 1232.Aug 27 2017, 03:11

Rebased to include all changes

CCulianu updated this revision to Diff 1233.Aug 27 2017, 09:59

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

CCulianu updated this revision to Diff 1234.Aug 27 2017, 10:01

Wrestling with arc

deadalnix edited edge metadata.Aug 27 2017, 11:15

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.

freetrader added inline comments.Aug 27 2017, 11:51
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.

CCulianu planned changes to this revision.Aug 27 2017, 12:47

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

CCulianu updated this revision to Diff 1240.Aug 27 2017, 13:02

Added freetrader's recommended changes

freetrader accepted this revision as: freetrader.Aug 27 2017, 14:42

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.

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