Closed tawheeler closed 9 years ago
Thanks for reporting this. However, I cannot reproduce this on neither Mac or Linux, 0.4 or 0.3.6.
The issue is recent; the problem did not occur about two weeks ago. Maybe BLAS or LAPACK changed? I tried reinstalling 0.3.6 but it did not fix the issue
What distribution, and how do you have Julia installed? From source? Package manager?
Ubuntu 14.04, Julia installed via the stable PPA & Julia platform-specific instructions with apt-get
Thanks. I've just been able to reproduce this with the release version. I'm looking into it.
Thank you!
The minimal example to reproduce the segfault is
julia> Base.LinAlg.CHOLMOD.cmn(Int64);
julia>gc()
and it has probably to do with the comment in line 38 of cholmod.jl where it is stated that chm_com
and chm_l_com
have to be initialized at runtime. The problem is that they are not. If I reload linalg.jl
and write
julia> LinAlg.CHOLMOD.cmn(Int64);
julia>gc()
there is no segfault. This is solved on 0.4 because these arrays are allocated on each call to CHOLMOD and I think we should just do the same on 0.3.7. A good question is why we haven't seen segfault long time ago.
A fix would be a little tricky to test because this is only happening on the repo versions of 0.3.x. @staticfloat would it be possible to build a test package of 0.3.7 after a fix has been pushed? (I'm going to bed now so it will only be fixed tomorrow.)
Sure, what platforms do you want the test package built for? OSX, Linux .tar.gz and Windows are easy. Ubuntu PPA is a little harder because it's published to everyone, so test builds are hard.
@staticfloat It would probably be easiest with gene Linux builds. However, I cannot reproduce the segfault with the latest 0.3.6 tar.gz. It appears that it is build with the old SuiteSparse with version 2.1.2 of CHOLMOD whereas the Ubuntu Package is build with the new SuiteSparse 4.4.3 that has version 3.0.4 of CHOLMOD.
Could you make generic Linuz tar.gx. build with the new SuiteSparse. Then I can try to see if I can reproduce the segfault with that. Either as it is or by removing the libcholmod.so such that it fetches the old library in the system.
@staticfloat The values returned from the functions in suitesparse_wrapper are wrong on Ubuntu 14.04 and 14.10 because an older libcholmod than was used when compiling suitesparse_wrapper is loaded. I think this is the reason for the segfault.
I plan to add a runtime check for the versions suitesparse_wrapper and libcholmod, but this will probably only change a segfault to an error for people who use your ppa. This is an improvement, but to really fix this we'd need that the suitesparse_wrapper version always match the loaded cholmod version. Is there a way to do this when packaging?
@andreasnoack Are you talking about the generic linux binaries or the PPA binaries here? I don't think the PPA binaries are built on a computer that has two versions of SuiteSparse on them, so I'm not sure what would cause what you're describing. In any case, I'll see if I can make the generic linux binaries build against a newer SuiteSparse.
The problem is we're using different versions of suitesparse on release-0.3 vs master. I think the PPA upgraded its version of suitesparse even for release Julia.
At this stage I'd rather avoid working too hard to tweak suitesparse-related things on release-0.3...
Ah, I see. Is there a reason we should update release-0.3
to use SuiteSparse-4.4.3, or should I modify the ubuntu package to specifically request an older suitesparse version?
You know debian packaging better than I do, but I suspect the latter might be easier? And if it fixes the bug then I'd vote for that option.
Generally we should probably be more careful about versions of dependencies for distribution packaging, since a lot of things can change underneath us that break assumptions that get compiled into the Julia system image. This would either be done by moving more checks to runtime, which will exhibit as errors until the system image can be rebuilt, or registering hooks to re-build the system image any time a package we depend on changes version. There's also the related issue that for Linux distro packaging we should be using the soname'd versions of various libraries.
I'm going to attempt the latter. If all goes well, we should have a new Julia build by tonight.
The problem is that the versions of libsuitesparse_wrapper.so and libcholmod.so don't match. Right now it appears that libsuitesparse_wrapper.so (which is provided by the julia package) is build against CHOLMOD 3.0.4 (in SuiteSparse 4.4.3), but the dependency requirement for Julia is only CHOLMOD 2.1.2. I think this is causing the segfault in this issue.
Hi there... for those running into this problem on Ubuntu 14.04, what would you suggest?
Can you try the generic linux tarball from julialang.org/downloads? That should work.
No problem with the generic tarball. New to Julia and loving it, thank you.
This should be fixed in the distribution packages now, please sudo apt-get update && sudo apt-get upgrade
to get the newest julia
. Your test script now works for me.
@tanmaykm We may need to do this for the next JuliaBox refresh to get newer libraries.
With @staticfloat's change and #10362 I consider this fixed.
I am running into a
signal (11): Segmentation fault
error when runningM\Y
for sparse matrixM
and full vectorY
.M
is ann+1
byn+1
sparse matrix whose diagonal and off-diagonals are filled.Y
is an arbitrary vector of lengthn+1
n
for
loop and use a smallern
it still failsError Trace:
Version:
Thanks!