Abnormally exit after executed a very simple expression

Update: After ugrade to 1.4.2 this error disappears.

Following is the original post, which happens under 1.4.1

I’m using Julia 1.4.1 inside a singularity+ubuntu20.04 container

Most of the behaviours are normal, but If I execute following expression

Array(reshape(zeros(Float64, 4,4)', 16))

It will abort imediately.

The error message is as follows

   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.4.1
 _/ |\__'_|_|_|\__'_|  |  Ubuntu ⛬  julia/1.4.1+dfsg-1
|__/                   |
julia> Array(reshape(zeros(Float64, 4,4)', 16))
Illegal inttoptr
	  %96 = ptrtoint double addrspace(13)* %94 to i64
Illegal inttoptr
	  %109 = inttoptr i64 %108 to i8 addrspace(13)*

signal (6): Aborted
in expression starting at REPL[1]:1
gsignal at /usr/bin/../lib/x86_64-linux-gnu/libc.so.6 (unknown line)
abort at /usr/bin/../lib/x86_64-linux-gnu/libc.so.6 (unknown line)
unknown function (ip: 0x7f9b79dacd04)
_ZN4llvm13FPPassManager13runOnFunctionERNS_8FunctionE at /usr/bin/../lib/x86_64-linux-gnu/libLLVM-8.so.1 (unknown line)
_ZN4llvm13FPPassManager11runOnModuleERNS_6ModuleE at /usr/bin/../lib/x86_64-linux-gnu/libLLVM-8.so.1 (unknown line)
_ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE at /usr/bin/../lib/x86_64-linux-gnu/libLLVM-8.so.1 (unknown line)
unknown function (ip: 0x7f9b79e96ac1)
unknown function (ip: 0x7f9b79e992d8)
unknown function (ip: 0x7f9b79e998cd)
unknown function (ip: 0x7f9b79dd4b4a)
unknown function (ip: 0x7f9b79e05ed3)
unknown function (ip: 0x7f9b79e2b84b)
jl_apply_generic at /usr/bin/../lib/x86_64-linux-gnu/libjulia.so.1 (unknown line)
unknown function (ip: 0x7f9b79e3e75b)
unknown function (ip: 0x7f9b79e3e389)
unknown function (ip: 0x7f9b79e3e8f0)
unknown function (ip: 0x7f9b79e3f9c8)
unknown function (ip: 0x7f9b79e40616)
unknown function (ip: 0x7f9b79e58e08)
unknown function (ip: 0x7f9b79e593c8)
jl_toplevel_eval_in at /usr/bin/../lib/x86_64-linux-gnu/libjulia.so.1 (unknown line)
eval at ./boot.jl:331
eval_user_input at /build/julia-98cBbp/julia-1.4.1+dfsg/usr/share/julia/stdlib/v1.4/REPL/src/REPL.jl:86
macro expansion at /build/julia-98cBbp/julia-1.4.1+dfsg/usr/share/julia/stdlib/v1.4/REPL/src/REPL.jl:118 [inlined]
#26 at ./task.jl:358
unknown function (ip: 0x7f9b79e43cbb)
unknown function (ip: (nil))
Allocations: 962355 (Pool: 962060; Big: 295); GC: 1
Aborted (core dumped)

This julia program was installed through the apt package manager.
Does any know what is happening?

Works for me on a 1.5 branch, so this will be fixed in the upcoming 1.5 release.

julia> Array(reshape(zeros(Float64, 4,4)', 16))
16-element Array{Float64,1}:
 0.0
 0.0
 0.0
 0.0
 0.0
 0.0
 0.0
 0.0
 0.0
 0.0
 0.0
 0.0
 0.0
 0.0
 0.0
 0.0

julia> versioninfo()
Julia Version 1.5.0-DEV.876
Commit 0c388fc340* (2020-05-07 20:12 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: Intel(R) Core(TM) i7-6600U CPU @ 2.60GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-9.0.1 (ORCJIT, skylake)
Environment:
  JULIA_NUM_THREADS = 4
1 Like

It works on Julia 1.4.2 version:

julia> versioninfo()
Julia Version 1.4.2
Commit 44fa15b150* (2020-05-23 18:35 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin18.7.0)
  CPU: Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-8.0.1 (ORCJIT, broadwell)
Environment:
  JULIA_NUM_THREADS = 2

julia> Array(reshape(zeros(Float64, 4,4)', 16))
16-element Array{Float64,1}:
 0.0
 0.0
 0.0
 0.0
 0.0
 0.0
 ⋮
 0.0
 0.0
 0.0
 0.0
 0.0
1 Like

If you want to have the best experience, install Julia the official way using the official downloads. It’s of course possible this is just a general julia bug though.

2 Likes

Cross-referencing Julia optimizations causing crash on ubuntu while sorting multidim arrays which looks like a similar issue with the apt-provided Julia binaries. That issue was also solved by switching to the generic linux binaries from Download Julia

2 Likes