-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
bugSomething isn't workingSomething isn't working

Description
Infinite non-cyclic recursion causing StackOverflow leads to crashed Julia session.
I think this is because it throws another stackoverflow trying to print the exception's Salsa Stack.. 😅 Maybe we want to special-case the exception printing to not print the whole thing in the case of a StackOverflow, and/or to have some cut-off for the stack depth we'll print?
Or figure out how to do it in a loop instead of recursively or something?
Here's an example crash:
julia> using Salsa
julia> @derived foo(rt, x) = foo(rt, x+1)
foo (generic function with 1 method)
julia> rt = Runtime()
Salsa.Runtime(Salsa.DefaultStorage(0, ...))
julia> foo(rt, 1)
[ Info: DOUBLING SALSA TRACE FREELIST ON THREAD 1
[ Info: DOUBLING SALSA TRACE FREELIST ON THREAD 1
Internal error: encountered unexpected error in runtime:
StackOverflowError()
Internal error: encountered unexpected error in runtime:
StackOverflowError()
jl_subtype_env at /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.6.dylib (unknown line)
simple_join at /Applications/Julia-1.6.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.6.dylib (unknown line)
...
Full log from the crash: https://gist.github.com/rai-nhdaly/69cb50b2a97ed0bf00485e1858725ea7
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working