-
Notifications
You must be signed in to change notification settings - Fork 284
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
build is not identical on macos with sandboxing #136
Comments
@ittaiz I don't see how it is related to that. If I disable sandboxing, the test passes. Only with sandboxing enabled to I get different hashes. Did I misunderstand your point? The issues you link to above were about md5 vs md5sum and doing the shell test in bazel, no? |
sorry for the late reply. it seems I've misunderstood you, thanks for the explanation |
There is a similar issue with the go rules. It has to do with the randomly generated sandbox paths being included as debug symbols. |
@chrismcbride Thanks for the pointer! |
I somehow can't reproduce this now. I was trying to fix it and see if some paths were getting in somewhere. If anyone else can repro, let me know. I hope it is not sporadic. |
I might be mixing stuff up but when I run ____Loading complete. Analyzing... ____Found 68 targets... ____Elapsed time: 0.114s, Critical Path: 0.00s ____Starting clean (this may take a while). Consider using --async if the clean takes more than several minutes. ____Loading package: test/data ____Loading package: @bazel_tools//tools/cpp ____Loading package: @local_jdk// ____Loading package: @local_config_cc// ____Loading package: @local_config_xcode// ____Loading complete. Analyzing... ____Loading package: @bazel_tools//third_party/java/jdk/langtools ____Loading package: src/java/com/google/devtools/build/lib ____Found 68 targets... ____Building... ____[0 / 1] BazelWorkspaceStatusAction stable-status.txt ____[1 / 51] Writing file build-info-redacted.properties ____[30 / 271] Writing file src/scala/io/bazel/rules_scala/tut_support/tut_compiler_lib_MANIFEST.MF [for host] ____[30 / 283] Writing file test/src/main/scala/scala/test/twitter_scrooge/mixed_MANIFEST.MF ____[30 / 286] Writing file test/src/main/scala/scala/test/twitter_scrooge/justscrooges_MANIFEST.MF ____[86 / 291] Extracting interface @libthrift//jar:jar ____[86 / 291] Extracting interface @util_logging//jar:jar [for host] ____[97 / 291] Creating runfiles tree bazel-out/local-fastbuild/bin/test/JavaBinary.runfiles ____[225 / 291] Still waiting for 16 jobs to complete: Running (sandbox): scala //scala/support:test_reporter, 10 s scala //src/scala/io/bazel/rules_scala/tut_support:tut_compiler_lib, 10 s scala //test:JavaOnlySources, 10 s scala //test:MoreScalaLibResources, 10 s scala //test:ScalaLibResources, 10 s scala //test:SuiteSrcs_lib_DataRoot1.scala, 10 s scala //test/tut:test_dep [for host], 10 s scala //test/tut:test_dep, 10 s scala //src/scala/io/bazel/rules_scala/tut_support:tut_compiler_lib [for host], 10 s scala //test:SuiteSrcs_lib_DataRoot2.scala, 10 s Scheduling: scala //test:MixJavaScalaLib, 10 s scala //test:MacroTest, 10 s scala //test:Runtime, 10 s scala //src/scala/io/bazel/rules_scala/scrooge_support:focused_zip_importer [for host], 10 s scala //test:Exported, 10 s scala //test/src/main/scala/scala/test/srcjars:source_jar, 10 s ____[234 / 291] Still waiting for 11 jobs to complete: Running (sandbox): scala //scala/support:test_reporter, 37 s scala //test:MixJavaScalaLib, 19 s scala //test:MacroTest, 18 s scala //test:Runtime, 18 s scala //src/scala/io/bazel/rules_scala/scrooge_support:focused_zip_importer [for host], 15 s scala //test:Exported, 15 s scala //test/src/main/scala/scala/test/srcjars:source_jar, 14 s scala //test:ConsumeSuite, 14 s scala //test:ScalaLibBinary, 11 s scala //test:MoreScalaLibBinary, 10 s Scheduling: Executing genrule //test/tut:some_example__tut, 11 s ____From scala //test:MacroTest: warning: there was one deprecation warning; re-run with -deprecation for details one warning found ____From Executing genrule //test/tut:some_example__tut: [tut] compiling: test/tut/SomeExample.md wrote: bazel-out/local-fastbuild/genfiles/test/tut/some_example_tut.md ____From scala //test:HelloLib: test/HelloLib.scala:20: warning: Remove the if expression and use the condition directly. def dumb(x: Int) = if (x == 3) true else false ^ one warning found ____From scala //test:ScalaBinary: Compiler runtime: 7894ms. ____From scala //src/scala/scripts:generator_lib [for host]: warning: there were two deprecation warnings; re-run with -deprecation for details one warning found ____From scala //test/src/main/scala/scala/test/twitter_scrooge:twodeep: warning: there was one feature warning; re-run with -feature for details one warning found ____From scala //test/src/main/scala/scala/test/twitter_scrooge:mixed: warning: there was one feature warning; re-run with -feature for details one warning found ____Elapsed time: 148.072s, Critical Path: 143.13s 42d41 < MD5 (bazel-bin/test/libOtherJavaLib-hjar.jar) = f57034a0379fbc0ca5b42e1677aa45f5 Is this what you're looking for? Because as far as I can see I'm not using sandboxing. |
I just ran |
I don't think so I just ran with HEAD~2 and it failed. I think that it
passes on some machines (Oscar- it always passes on yours, right?) but
fails on others (I think it never passed on my machine).
…On Wed, Jul 12, 2017 at 9:38 PM gkk-stripe ***@***.***> wrote:
I just ran bash test_run.sh on MacOSX with bazel 0.5.2 and it passed. I
came here from README that says test_run.sh doesn't pass due to this
issue. Did something get fixed?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#136 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABUIF-7ftnfliitwVeHLbpMv0JUnYGIJks5sNRKigaJpZM4L48S_>
.
|
I'm closing this as I haven't been able to reproduce this for some time. |
Reopening since I've started hitting this again locally :( |
@gkk-stripe also saw this on our Linux CI but it seemed like macros were at play. There may be two different issues. Clearly a macro can be non reproducible since it can use the clock or it could use a identity based hashCode. |
You mean Scala macros right?
…On Mon, 4 Dec 2017 at 17:21 P. Oscar Boykin ***@***.***> wrote:
@gkk-stripe <https://github.com/gkk-stripe> also saw this on our Linux CI
but it seemed like macros were at play. There may be two different issues.
Clearly a macro can be non reproducible since it can use the clock or it
could use a identity based hashCode.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#136 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABUIF6sURXZJTTYtcZa4sVSlDfT2J9xiks5s9A39gaJpZM4L48S_>
.
|
yes |
So I'm hitting this with build is identical in this repo.
Wdyt about my suggestion?
…On Mon, 4 Dec 2017 at 19:44 P. Oscar Boykin ***@***.***> wrote:
yes
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#136 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABUIFypu88MsiLLRoP7zGmE0yJBGHCrkks5s9C-KgaJpZM4L48S_>
.
|
I like your suggestion! I'd love to get to the bottom of this. |
The most common reason for macros to be non-deterministic is to rely on object identity for hash code. If you put them in a map, the order of iteration is non-deterministic. |
Issues referenced for building in MAC (bazelbuild#136, bazelbuild#396 and bazelbuild#398) are closed/merged Having the comment `This doesn't currently pass on OS X (see bazelbuild#136 for details)` is not accurate. BTW, I cannot confirm it's true, cause in my env have bazel 0.14 and `test_all.sh` is failing (`bazel test //test/...` is OK)
Issues referenced for building in MAC (#136, #396 and #398) are closed/merged Having the comment `This doesn't currently pass on OS X (see #136 for details)` is not accurate. BTW, I cannot confirm it's true, cause in my env have bazel 0.14 and `test_all.sh` is failing (`bazel test //test/...` is OK)
Using homebrew bazel 0.4.4 with:
build --spawn_strategy=sandboxed --genrule_strategy=sandboxed
in .bazelrc, I get:
The text was updated successfully, but these errors were encountered: