Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac Travis build output truncated, hiding build failure details #4223

Closed
derekbruening opened this issue Mar 26, 2020 · 3 comments · Fixed by #4345
Closed

Mac Travis build output truncated, hiding build failure details #4223

derekbruening opened this issue Mar 26, 2020 · 3 comments · Fixed by #4345

Comments

@derekbruening
Copy link
Contributor

This just showed up on PR #4221 3 times in a row (every build there including a restart I tried):

https://travis-ci.com/github/DynamoRIO/dynamorio/jobs/304776211

4080[ 22%] Building C object suite/tests/CMakeFiles/tool.fib_plus.dir/__/__/clients/drcachesim/tests/fib_plus.c.o
4081[ 22%] Linking C executable bin/tool.fib_plus
4082[ 22%] Built target tool.fib_plus
4083[ 22%] 

It looks like something external is killing the build process.
Xref #4126 where the same thing was happening but there it was after 10
minutes: here it's only 1 minute in.

@derekbruening
Copy link
Contributor Author

Wow, master has a compile failure from that PR #4421! So probably the problem is log buffering by Travis and not printing everything out?!? Possibly the tee in our script but why would it be non-deterministic?
https://travis-ci.com/github/DynamoRIO/dynamorio/jobs/304949581

4182[ 33%] Building ASM_NASM object suite/tests/CMakeFiles/client.drwrap-test.appdll.dir/drwrap-test.appdll.c_asm.asm.o
4183/Users/travis/build/DynamoRIO/dynamorio/build_debug-internal-64/suite/tests/drwrap-test.appdll.c_asm.asm:402: error: symbol `tailcall_tail' undefined
4184/Users/travis/build/DynamoRIO/dynamorio/build_debug-internal-64/suite/tests/drwrap-test.appdll.c_asm.asm:409: error: label `_tailcall_tail' changed during code generation [-w+error=label-redef-late]
4185make[2]: *** [suite/tests/CMakeFiles/client.drwrap-test.appdll.dir/drwrap-test.appdll.c_asm.asm.o] Error 1

derekbruening added a commit that referenced this issue Mar 26, 2020
PR #4221 broke the Mac build, but Travis failed to show the failure in
the logs in the PR builds (some buffering issue filed as #4223).  We
fix the Mac build here.

Issue: #4197, #4223
@derekbruening derekbruening changed the title Mac Travis build terminates early for unknown reasons Mac Travis build output truncated, hiding build failure details Mar 26, 2020
derekbruening added a commit that referenced this issue Mar 26, 2020
PR #4221 broke the Mac build, but Travis failed to show the failure in
the logs in the PR builds (some buffering issue filed as #4223).  We
fix the Mac build here.

Issue: #4197, #4223
@derekbruening
Copy link
Contributor Author

This seems to be happening again. For PR #4292 the Mac build output just ends mid-build, even after re-run: https://travis-ci.com/github/DynamoRIO/dynamorio/jobs/332667228

Looking closely there is a build failure:

/Users/travis/build/DynamoRIO/dynamorio/core/unix/injector.c:221:17: error: unused variable 'ld_preload' [-Werror,-Wunused-variable]
    const char *ld_preload = NULL;
                ^
Users/travis/build/DynamoRIO/dynamorio/core/unix/injector.c:223:17: error: unused variable 'cur_preload' [-Werror,-Wunused-variable]
    const char *cur_preload = getenv("LD_PRELOAD");
                ^
/Users/travis/build/DynamoRIO/dynamorio/core/unix/injector.c:222:17: error: unused variable 'dr_ld_preload_libs' [-Werror,-Wunused-variable]
    const char *dr_ld_preload_libs = "libdynamorio.so libdrpreload.so";
                ^
/Users/travis/build/DynamoRIO/dynamorio/core/unix/injector.c:216:10: error: unused variable 'ld_preload_libs' [-Werror,-Wunused-variable]
    char ld_preload_libs[MAX_OPTIONS_STRING];

@abhinav92003
Copy link
Contributor

Found some relevant Travis issues: travis-ci/travis-ci#8973 and travis-ci/travis-ci#6018, with some possible workarounds.

I tried using fcntl to clear status flag for stdout before the build, but that didn't help.

Adding sleep after script execution (or error) seems to do the trick. It gives Travis enough time to capture the complete log before the VM exits. It's not an ideal solution, but should work for now.

derekbruening pushed a commit that referenced this issue Jul 1, 2020
Sleep for 10 seconds after script run/failure on MacOS to allow some time for Travis to capture the complete log. It was used as a workaround also at travis-ci/travis-ci#6018.
    
Fixes: #4223
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants