# Function svds freezes in 0.6

**URL:** <https://discourse.julialang.org/t/function-svds-freezes-in-0-6/1738>\
**Category:** Internals & Design\
**Tags:** bug\
**Created:** [January 28, 2017, 12:52pm UTC](https://discourse.julialang.org/t/function-svds-freezes-in-0-6/1738 "2017-01-28T12:52:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lostella](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lostella/32/356_2.png) [@lostella](https://discourse.julialang.org/u/lostella)\
**Post date:** [January 28, 2017, 12:52pm UTC](https://discourse.julialang.org/t/function-svds-freezes-in-0-6/1738/1 "2017-01-28T12:52:51Z")

</div>

Hi all, I’m experiencing a problem with `svds` in Julia 0.6.0-dev.2439, commit [953029f](https://github.com/JuliaLang/julia/commit/953029fea4614b0ed60a317307386d38f568a5b4), on macOS. What happens is that the REPL freezes after invoking `svds`, as in

```julia
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?

---

<div class="post-metadata">

**Author:** ![Ralph\_Smith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ralph_smith/32/10344_2.png) [@Ralph\_Smith](https://discourse.julialang.org/u/Ralph_Smith)\
**Post date:** [January 28, 2017, 8:03pm UTC](https://discourse.julialang.org/t/function-svds-freezes-in-0-6/1738/2 "2017-01-28T20:03:23Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![cstjean](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cstjean/32/1444_2.png) [@cstjean](https://discourse.julialang.org/u/cstjean)\
**Post date:** [March 5, 2017, 4:42pm UTC](https://discourse.julialang.org/t/function-svds-freezes-in-0-6/1738/3 "2017-03-05T16:42:36Z")

</div>

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
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

```
