Skip to content

Julia test failing (on Linux) #201

Closed
@lanctot

Description

@lanctot

Hi @findmyway , seems that as of a few days ago the julia test is failing (oddly, only the test fails... it still compiles fine). This was the original error I got

[100%] Built target spieljl
Test project /usr/local/google/home/lanctot/tmp/open_spiel/build
    Start 150: julia_test
1/1 Test #150: julia_test .......................***Failed   22.34 sec
   Testing OpenSpiel
 Resolving package versions...
/myhomedirpath/packages/julias/julia-1.3.1/bin/julia: symbol lookup error: /usr/local/google/home/lanctot/tmp/open_spiel/open_spiel/julia/deps/../../../build/julia/libspieljl.so: undefined symbol: _ZN5jlcxx19FunctionWrapperBase19set_pointer_indicesEv
ERROR: LoadError: Failed to precompile OpenSpiel [7e5d8dc8-489f-4be6-9273-f4c3010e6ec1] to /myhomedirpath/.julia/compiled/v1.3/OpenSpiel/pEQx0_MCr2V.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1283
 [3] _require(::Base.PkgId) at ./loading.jl:1024
 [4] require(::Base.PkgId) at ./loading.jl:922
 [5] require(::Module, ::Symbol) at ./loading.jl:917
 [6] include at ./boot.jl:328 [inlined]
 [7] include_relative(::Module, ::String) at ./loading.jl:1105
 [8] include(::Module, ::String) at ./Base.jl:31
 [9] include(::String) at ./client.jl:424
 [10] top-level scope at none:6
in expression starting at /usr/local/google/home/lanctot/tmp/open_spiel/open_spiel/julia/test/runtests.jl:1
ERROR: Package OpenSpiel errored during testing
Stacktrace:
 [1] pkgerror(::String, ::Vararg{String,N} where N) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Pkg/src/Types.jl:113
 [2] #test#131(::Bool, ::Nothing, ::Cmd, ::Cmd, ::typeof(Pkg.Operations.test), ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Pkg/src/Operations.jl:1372
 [3] #test at ./none:0 [inlined]
 [4] #test#62(::Bool, ::Nothing, ::Cmd, ::Cmd, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(Pkg.API.test), ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Pkg/src/API.jl:253
 [5] test(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Pkg/src/API.jl:239
 [6] #test#58 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Pkg/src/API.jl:233 [inlined]
 [7] test() at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Pkg/src/API.jl:230
 [8] top-level scope at none:1
0% tests passed, 1 tests failed out of 1
Total Test time (real) =  22.34 sec
The following tests FAILED:
	150 - julia_test (Failed)
Errors while running CTest
At least one test failed.
If this is the first time you have run these tests, try:
pip3 install -r requirements.txt
Note that outside a virtualenv, you will need to install the system 
wide matplotlib: sudo apt-get install python-matplotlib
Exiting virtualenv

Then when I removed julia and all the packages, starting from scratch (re-installing Julia via ./install.sh) I get a different error:

   Testing OpenSpiel
 Resolving package versions...
ERROR: LoadError: could not load library "/myhomedirpath/tmp/open_spiel/open_spiel/julia/deps/../../../build/julia/libspieljl"
/myhomedirpath/packages/julias/julia-1.3.1/bin/../lib/julia/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /myhomedirpathtmp/open_spiel/open_spiel/julia/deps/../../../build/julia/libspieljl.so)
Stacktrace:
 [1] #dlopen#3(::Bool, ::typeof(Libdl.dlopen), ::String, ::UInt32) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Libdl/src/Libdl.jl:109
 [2] dlopen at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Libdl/src/Libdl.jl:109 [inlined]
 [3] readmodule(::String, ::Symbol, ::Module, ::Nothing) at /usr/local/google/home/lanctot/.julia/packages/CxxWrap/LfTHV/src/CxxWrap.jl:700
 [4] wrapmodule(::String, ::Symbol, ::Module, ::Nothing) at /usr/local/google/home/lanctot/.julia/packages/CxxWrap/LfTHV/src/CxxWrap.jl:705
 [5] top-level scope at /usr/local/google/home/lanctot/tmp/open_spiel/open_spiel/julia/src/OpenSpiel.jl:9
 [6] include at ./boot.jl:328 [inlined]
 [7] include_relative(::Module, ::String) at ./loading.jl:1105
 [8] include(::Module, ::String) at ./Base.jl:31
 [9] top-level scope at none:2
 [10] eval at ./boot.jl:330 [inlined]
 [11] eval(::Expr) at ./client.jl:425
 [12] top-level scope at ./none:3
in expression starting at /myhomedirpath/tmp/open_spiel/open_spiel/julia/src/OpenSpiel.jl:9
ERROR: LoadError: Failed to precompile OpenSpiel [7e5d8dc8-489f-4be6-9273-f4c3010e6ec1] to /usr/local/google/home/lanctot/.julia/compiled/v1.3/OpenSpiel/pEQx0_W2oS3.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1283
 [3] _require(::Base.PkgId) at ./loading.jl:1024
 [4] require(::Base.PkgId) at ./loading.jl:922
 [5] require(::Module, ::Symbol) at ./loading.jl:917
 [6] include at ./boot.jl:328 [inlined]
 [7] include_relative(::Module, ::String) at ./loading.jl:1105
 [8] include(::Module, ::String) at ./Base.jl:31
 [9] include(::String) at ./client.jl:424
 [10] top-level scope at none:6
in expression starting at /myhomedirpath/tmp/open_spiel/open_spiel/julia/test/runtests.jl:1
ERROR: Package OpenSpiel errored during testing
Stacktrace:
 [1] pkgerror(::String, ::Vararg{String,N} where N) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Pkg/src/Types.jl:113
 [2] #test#131(::Bool, ::Nothing, ::Cmd, ::Cmd, ::typeof(Pkg.Operations.test), ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Pkg/src/Operations.jl:1372
 [3] #test at ./none:0 [inlined]
 [4] #test#62(::Bool, ::Nothing, ::Cmd, ::Cmd, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(Pkg.API.test), ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Pkg/src/API.jl:253
 [5] test(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Pkg/src/API.jl:239
 [6] #test#58 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Pkg/src/API.jl:233 [inlined]
 [7] test() at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Pkg/src/API.jl:230
 [8] top-level scope at none:1

Did something change with the packages recently? Can you reproduce this?

Activity

findmyway

findmyway commented on May 4, 2020

@findmyway
Collaborator

🤔 That's strange. I can't reproduce the error on my local machine or on Travis. Is there any other environment change on the build machine?

lanctot

lanctot commented on May 4, 2020

@lanctot
CollaboratorAuthor

That is certainly possible, but I'm not sure what it could be.. it has not changed much and has been up for much longer than a few days. My guess is still that either CxxWrap or something changed in the Julia packaging and the new one doesn't work with our system.

Note that Travis does not build with Julia and hence does not test it (since it's an optional dependency).

Can I confirm that this command would remove everything related to the custom Julia installation? (So I can retry from scratch)

rm -rf ~/packages/julias/ ~/.julia/ ~/.local/bin/julia*
findmyway

findmyway commented on May 4, 2020

@findmyway
Collaborator

rm -rf ~/packages/julias/ ~/.julia/ ~/.local/bin/julia*

Yes, that would be enough to remove all Julia related.

My guess is still that either CxxWrap or something changed in the Julia packaging and the new one doesn't work with our system.

I can confirm that the latest release of CxxWrap is still v0.10.1. So this might not be the real reason.

Note that Travis does not build with Julia and hence does not test it (since it's an optional dependency).

Yes, but from the log it did build with Julia with DEFAULT_OPTIONAL_DEPENDENCY="ON"

lanctot

lanctot commented on May 7, 2020

@lanctot
CollaboratorAuthor

Yes, but from the log it did build with Julia with DEFAULT_OPTIONAL_DEPENDENCY="ON"

Hmm, you're right. I take it back: it's working on the Travis machines just not internally (or might just be my machine).

This is not ideal, we don't really have a way to test it before pushing to github. I'll try again before the next update, but if you have any other ideas I'd love to hear them.

findmyway

findmyway commented on May 8, 2020

@findmyway
Collaborator

@lanctot , I tried to search around and found a similar error with other packages here:

So is your OS also Ubuntu 19.10?

Could you try the workaround in the above link and see if it works for you?

Until this issue is fixed in Julia (see JuliaLang/julia#34276) a workaround is to replace Julias libstdc++ with the one of your OS:

# works for Ubuntu 19.10 64bit - match your locations accordingly!
cp /usr/lib/x86_64-linux-gnu/libstdc++.so.6 $JULIA_HOME/lib/julia/

I'm still using Ubuntu 18 so I can't reproduce the problem locally. I'll try in the docker environment and update what I can find here later.

lanctot

lanctot commented on May 8, 2020

@lanctot
CollaboratorAuthor

Ahh yes, I had to do that... right. And I think I got rid of that directory when we were testing other stuff, so I accidentally deleted it. Good catch! Ok, I'll try it on Monday when I go to do the update.

lanctot

lanctot commented on May 10, 2020

@lanctot
CollaboratorAuthor

Confirmed, that was indeed the problem. Thanks @findmyway!

added a commit that references this issue on Feb 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Julia test failing (on Linux) · Issue #201 · google-deepmind/open_spiel