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

access to undefined reference in seed_threadrngs! #8

Open
colinxs opened this issue Jan 8, 2020 · 2 comments
Open

access to undefined reference in seed_threadrngs! #8

colinxs opened this issue Jan 8, 2020 · 2 comments

Comments

@colinxs
Copy link
Contributor

colinxs commented Jan 8, 2020

Ran into this:

(LyceumAI) pkg> test
   Testing LyceumAI
 Resolving package versions...
LyceumAI.jl: Error During Test at /home/colinxs/workspace/juliadev/LyceumAI/test/runtests.jl:30
  Got exception outside of a @test
  TaskFailedException:
  UndefRefError: access to undefined reference
  Stacktrace:
   [1] getindex at ./array.jl:744 [inlined]
   [2] ht_keyindex2!(::Dict{BigInt,Random.DSFMT.GF2X}, ::BigInt) at ./dict.jl:326
   [3] setindex!(::Dict{BigInt,Random.DSFMT.GF2X}, ::Random.DSFMT.GF2X, ::BigInt) at ./dict.jl:381
   [4] calc_jump(::BigInt, ::Random.DSFMT.GF2X) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Random/src/DSFMT.jl:179
   [5] calc_jump at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Random/src/DSFMT.jl:177 [inlined]
   [6] randjump at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Future/src/Future.jl:39 [inlined]
   [7] macro expansion at /home/colinxs/.julia/packages/LyceumBase/jOq5k/src/Tools/threading.jl:21 [inlined]
   [8] (::LyceumBase.Tools.var"#750#threadsfor_fun#52"{BigInt,Array{Random.MersenneTwister,1},UnitRange{Int64}})(::Bool) at ./threadingconstructs.jl:61
   [9] (::LyceumBase.Tools.var"#750#threadsfor_fun#52"{BigInt,Array{Random.MersenneTwister,1},UnitRange{Int64}})() at ./threadingconstructs.jl:28
  Stacktrace:
   [1] wait(::Task) at ./task.jl:251
   [2] macro expansion at ./threadingconstructs.jl:69 [inlined]
   [3] #seed_threadrngs!#51(::BigInt, ::typeof(seed_threadrngs!), ::Array{Random.MersenneTwister,1}, ::Int64) at /home/colinxs/.julia/packages/LyceumBase/jOq5k/src/Tools/threading.jl:18
   [4] #seed_threadrngs! at ./none:0 [inlined]
   [5] #seed_threadrngs!#50 at /home/colinxs/.julia/packages/LyceumBase/jOq5k/src/Tools/threading.jl:4 [inlined]
   [6] seed_threadrngs!(::Int64) at /home/colinxs/.julia/packages/LyceumBase/jOq5k/src/Tools/threading.jl:4
   [7] top-level scope at /home/colinxs/workspace/juliadev/LyceumAI/test/runtests.jl:32
   [8] top-level scope at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Test/src/Test.jl:1107
   [9] top-level scope at /home/colinxs/workspace/juliadev/LyceumAI/test/runtests.jl:32
   [10] include at ./boot.jl:328 [inlined]
   [11] include_relative(::Module, ::String) at ./loading.jl:1105
   [12] include(::Module, ::String) at ./Base.jl:31
   [13] include(::String) at ./client.jl:424
   [14] top-level scope at none:6
   [15] eval(::Module, ::Any) at ./boot.jl:330
   [16] exec_options(::Base.JLOptions) at ./client.jl:263
   [17] _start() at ./client.jl:460

coming from

function seed_threadrngs!(

Not really sure how this is happening as we clearly assign to rngs[1]. 0675394 adds a few "hail mary" attemps to fix this, namely 1) not inlining the function and 2) using a local variable MT for the call to randjump, but I don't see how this would actually do anything to address the issue (it should be semantically the same thing?!). That commit also adds some assert statements to hopefully catch the issue before the UndefRefError.

This issue is mostly just to track the problem and see if it comes up again.

@colinxs
Copy link
Contributor Author

colinxs commented Jan 9, 2020

Just ran into it again when running pkg> test...

@colinxs
Copy link
Contributor Author

colinxs commented Jan 10, 2020

So I think the issue is in how I'm testing, not in seed_threadrngs! itself

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant