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

tests fail with --inline=no when restricted to a single CPU #9565

Closed
simonster opened this issue Jan 2, 2015 · 6 comments
Closed

tests fail with --inline=no when restricted to a single CPU #9565

simonster opened this issue Jan 2, 2015 · 6 comments
Labels
bug Indicates an unexpected problem or unintended behavior

Comments

@simonster
Copy link
Member

When I comment out the addprocs call in runtests.jl and run julia --inline=no runtests.jl, the tests pass until resolve, which fails with:

     * resolve
exception on 1: ERROR: test error in expression: sanity_tst(deps_data)
BoundsError: attempt to access ()
  at index [1]
 in getindex at /usr/local/julia/usr/lib/julia/sys.dylib
 in hash at tuple.jl:90
 in hash at tuple.jl:88
 in hash at ./version.jl:159
 in ht_keyindex at ./dict.jl:501
 in haskey at dict.jl:657
 in deps_from_data at resolve.jl:65
 in sanity_tst at resolve.jl:88
 in sanity_tst at resolve.jl:98
 in anonymous at test.jl:85
 in do_test at test.jl:47
 in include at ./boot.jl:248
 in runtests at /usr/local/julia/test/testdefs.jl:5
 in anonymous at multi.jl:642
 in run_work_thunk at multi.jl:603
 in remotecall_fetch at multi.jl:676
 in remotecall_fetch at multi.jl:691
 in anonymous at task.jl:1614
while loading resolve.jl, in expression starting on line 436
ERROR: test error in expression: sanity_tst(deps_data)
BoundsError: attempt to access ()
  at index [1]
 in getindex at /usr/local/julia/usr/lib/julia/sys.dylib
 in hash at tuple.jl:90
 in hash at tuple.jl:88
 in hash at ./version.jl:159
 in ht_keyindex at ./dict.jl:501
 in haskey at dict.jl:657
 in deps_from_data at resolve.jl:65
 in sanity_tst at resolve.jl:88
 in sanity_tst at resolve.jl:98
 in anonymous at test.jl:85
 in do_test at test.jl:47
 in include at ./boot.jl:248
 in runtests at /usr/local/julia/test/testdefs.jl:5
 in anonymous at multi.jl:642
 in run_work_thunk at multi.jl:603
 in remotecall_fetch at multi.jl:676
 in remotecall_fetch at multi.jl:691
 in anonymous at task.jl:1614
while loading resolve.jl, in expression starting on line 436
while loading /usr/local/julia/test/runtests.jl, in expression starting on line 42

julia --inline=no runtests.jl resolve passes, as does julia runtests.jl. I found by bisecting the set of tests that julia --inline=no runtests.jl math resolve fails. Further bisection of the tests in math.jl shows that simply calling quadgk(cos, 0, BigFloat(1)) (but not quadgk(cos, 0, 1.0)) is sufficient to produce the failure in resolve.jl. My versioninfo is:

julia> versioninfo()
Julia Version 0.4.0-dev+2417
Commit 864c662* (2015-01-02 22:33 UTC)
Platform Info:
  System: Darwin (x86_64-apple-darwin14.1.0)
  CPU: Intel(R) Core(TM) i7-4850HQ CPU @ 2.30GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: libopenblas
  LIBM: libopenlibm
  LLVM: libLLVM-3.3
@simonster simonster added the bug Indicates an unexpected problem or unintended behavior label Jan 3, 2015
@tkelman
Copy link
Contributor

tkelman commented Jan 3, 2015

When I comment out the addprocs call in runtests.jl

You can also do make testall1 or JULIA_CPU_CORES=1 ./julia test/runtests.jl all

I can reproduce this on win64. Some odd interaction between MPFR, inlining, and dict hashing?

@simonster
Copy link
Member Author

It seems that what breaks this is actually:

hash((BigFloat, 256, 7))

This may be the same underlying issue as #8631.

@timholy
Copy link
Member

timholy commented Jan 3, 2015

Dupe of #9536. But having discovered a more minimal test is great; for the record,

$ julia --inline=no

julia> using Base.Test

julia> hash((BigFloat, 256, 7))
0x067ed70b544d0b4d

julia> include("test/resolve.jl")
ERROR: test error in expression: sanity_tst(deps_data)
BoundsError()
 in hash at tuple.jl:90
 in hash at tuple.jl:88
 in hash at ./version.jl:159
 in ht_keyindex at ./dict.jl:501
 in haskey at dict.jl:657
 in deps_from_data at /home/tim/src/julia/test/resolve.jl:65
 in sanity_tst at /home/tim/src/julia/test/resolve.jl:88
 in sanity_tst at /home/tim/src/julia/test/resolve.jl:98
 in anonymous at test.jl:85
 in do_test at test.jl:47
 in include at ./boot.jl:242
 in include_from_node1 at ./loading.jl:128
 in eval at no file
while loading /home/tim/src/julia/test/resolve.jl, in expression starting on line 436

But when I tested @vtjnash's patch, it didn't fix it (unless I did something wrong).

@tkelman
Copy link
Contributor

tkelman commented Jan 3, 2015

I found by bisecting the set of tests

If you have a script to automate that, can we add it into the makefiles?

@simonster
Copy link
Member Author

Ah, sorry for the dup.

@timholy
Copy link
Member

timholy commented Jan 3, 2015

No problem; your reduced test case was a huge help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

3 participants