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

Julia 1.1.0 in MacOS: Segmentation fault when calling Dims on large array. #30892

Closed
galanakis opened this issue Jan 29, 2019 · 2 comments
Closed

Comments

@galanakis
Copy link

galanakis commented Jan 29, 2019

The following code causes a segmentation fault in a freshly started REPL session.

julia> R=Array{Int64}(undef,32745673)
julia> Dims(R)

The crash output is

signal (11): Segmentation fault: 11
in expression starting at no file:0
unknown function (ip: 0x108b56e62)
jl_fptr_trampoline at /Users/osx/buildbot/slave/package_osx64/build/src/gf.c:1864
eval_user_input at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/REPL /src/REPL.jl:89
macro expansion at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/REPL    /src/REPL.jl:117 [inlined]
#26 at ./task.jl:259
jl_apply at /Users/osx/buildbot/slave/package_osx64/build/src/./julia.h:1571 [inlined]
start_task at /Users/osx/buildbot/slave/package_osx64/build/src/task.c:572

Allocations: 1091465 (Pool: 1091121; Big: 344); GC: 7

@Keno
Copy link
Member

Keno commented Jan 30, 2019

We should be able to do better, here, but worth pointing out that this is just because this is trying to create a very large tuple, which is not generally something that tuples are designed for, i.e.

R=Array{Int64}(undef,32745673)
tuple(R...)

Segmentation fault: 11

In particular, it tries to allocate a tuple of that size and then runs into a stack overflow that we don't detect because it skips more than one page. We'll need to add stack probing here.

@Keno
Copy link
Member

Keno commented Jan 30, 2019

I.e. the action item here is #25523

vtjnash added a commit that referenced this issue Mar 16, 2021
Supported platforms are currently X86, PowerPC, and SystemZ.

Fixes #25523
Fixes #36170
Closes #28577
Closes #30892
vtjnash added a commit that referenced this issue Mar 18, 2021
Supported platforms are currently X86, PowerPC, and SystemZ.

Fixes #25523
Fixes #36170
Closes #28577
Closes #30892
ElOceanografo pushed a commit to ElOceanografo/julia that referenced this issue May 4, 2021
antoine-levitt pushed a commit to antoine-levitt/julia that referenced this issue May 9, 2021
johanmon pushed a commit to johanmon/julia that referenced this issue Jul 5, 2021
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

2 participants