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

Segfault with small matrix on release builds #123

Closed
miakramer opened this issue Feb 26, 2021 · 4 comments
Closed

Segfault with small matrix on release builds #123

miakramer opened this issue Feb 26, 2021 · 4 comments

Comments

@miakramer
Copy link

Steps to reproduce:

z = randn(5, 4)
svds(z, nsv=1)

On the debug build, this works as normal (unfortunately for debugging...). On the release build, most of the time for me this will segfault. Once it failed with a ReadOnlyMemoryError. The stacktrace isn't particularly informative, but here's the top frames in the backtrace that have names:

(gdb) info frame
Stack level 0, frame at 0x7fffffffa9b0:
 rip = 0x7fff8d0dbeb8 in dlarnv_64_; saved rip = 0x7fff7a114b44
 called by frame at 0x7fffffffaa10
 Arglist at 0x7fffffffa518, args: 
 Locals at 0x7fffffffa518, Previous frame's sp is 0x7fffffffa9b0
 Saved registers:
  rbx at 0x7fffffffa978, rbp at 0x7fffffffa980, r12 at 0x7fffffffa988, r13 at 0x7fffffffa990, r14 at 0x7fffffffa998, r15 at 0x7fffffffa9a0, rip at 0x7fffffffa9a8
(gdb) bt
#0  0x00007fff8d0dbeb8 in dlarnv_64_ () from /home/mia/.julia/artifacts/9de7cd7b565653107a5f4628320381237cb55cb8/lib/libopenblas64_.so
#1  0x00007fff7a114b44 in dgetv0_ () from /home/mia/.julia/artifacts/a07ca23fc45868aa2f1c602061add992ff482462/lib/libarpack.so
#2  0x00007fff7a11ca10 in dsaitr_ () from /home/mia/.julia/artifacts/a07ca23fc45868aa2f1c602061add992ff482462/lib/libarpack.so
#3  0x00007fff7a11e4f9 in dsaup2_ () from /home/mia/.julia/artifacts/a07ca23fc45868aa2f1c602061add992ff482462/lib/libarpack.so
#4  0x00007fff7a11f307 in dsaupd_ () from /home/mia/.julia/artifacts/a07ca23fc45868aa2f1c602061add992ff482462/lib/libarpack.so

I'm not sure if it's a problem in Arpack.jl, arpack or openblas. Let me know if I can provide any more information or if I should move the bug report there. Also happy to try to track down the problem more, but it's quite tricky since it doesn't seem to happen on debug builds.

@andreasnoack
Copy link
Member

andreasnoack commented Feb 27, 2021

Is this your own source build of Julia? Could you please share the output from versioninfo() and the ] st?

@miakramer
Copy link
Author

The segfault is on the Manjaro packaged version of Julia, versioninfo():

Julia Version 1.5.3
Commit 788b2c77c1* (2020-11-09 13:37 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-10.0.1 (ORCJIT, ivybridge)

]st:

  [7d9fca2a] Arpack v0.5.1
  [6e4b80f9] BenchmarkTools v0.5.0
  [336ed68f] CSV v0.8.3
  [42fd0dbc] IterativeSolvers v0.9.0
  [7a12625a] LinearMaps v3.2.1
  [8314cec4] PGFPlotsX v1.2.10
  [91a5bcdd] Plots v1.10.6
  [d330b81b] PyPlot v2.9.0
  [90137ffa] StaticArrays v1.0.1
  [24249f21] SymPy v1.0.40
  [3d5dd08c] VectorizationBase v0.19.0

Happy to do a release build from source and test again if that would be informative. The debug build was the same v1.5.3 tag from the source.

@andreasnoack
Copy link
Member

The segfault is on the Manjaro packaged version of Julia

There have been many issues with julia versions distributed by the various Linux package systems. See e.g. #5 and the linked issues. I'll recommend that you try out the official binaries from https://julialang.org/.

@miakramer
Copy link
Author

Interesting. You're right, it runs fine on a release build from source. Seems to be the same issue as #5, I will close this one.

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