Function svds freezes in 0.6

bug

#1

Hi all, I’m experiencing a problem with svds in Julia 0.6.0-dev.2439, commit 953029f, on macOS. What happens is that the REPL freezes after invoking svds, as in

x = randn(10,10)
out = svds(x, nsv=3)

After cmd+c’ing and re-issuing the latter command, the output is produced correctly.

I couldn’t find any open issue related to this. Is this a known issue? Should I open one?


#2

For the record, I see similar behavior on Linux-x86_64 with today’s 0.6.0-dev nightly, except that the first svds finally completes after at least 100 sec of CPU. (It is about 4 sec with 0.5.0, and the second call with these small matrices takes about 10ms in both versions.) Furthermore, this delay happens even if I have invoked eigs before calling svds. (eigs itself has no such problem.) Profiling shows a staggering amount of recursion in inference.jl. If I interpret it correctly, the actual CPU hog is C code invoked from _methods_by_ftype in reflection.jl.

So I think you should open an issue.


#3

Similar issue running the ScikitLearn.jl tests in OSX on 0.6.0-pre.alpha.34. The problematic test only hangs if some other code was run before it; otherwise it runs fine. CPU is at 0% for me. It can be interrupted. It completes (with error) if I rerun it afterwards.

julia> include("test_quickstart.jl")
^C^CERROR: LoadError: InterruptException:
Stacktrace:
 [1] yieldto(::Task, ::ANY) at ./event.jl:160
 [2] wait() at ./event.jl:193
 [3] wait(::Condition) at ./event.jl:27
 [4] require(::Symbol) at /Users/cedric/.julia/v0.6/Requires/src/require.jl:25
 [5] include_from_node1(::String) at ./loading.jl:539
 [6] include(::String) at ./sysimg.jl:14
while loading /Users/cedric/.julia/v0.6/ScikitLearn/test/test_quickstart.jl, in expression starting on line 4

julia> include("test_quickstart.jl")
ERROR: LoadError: UndefVarError: dataset not defined
Stacktrace:
 [1] include_from_node1(::String) at ./loading.jl:539
 [2] include(::String) at ./sysimg.jl:14
while loading /Users/cedric/.julia/v0.6/ScikitLearn/test/test_quickstart.jl, in expression starting on line 4