Segfaults in SharedArrays

152 views
Skip to first unread message

Nils Gudat

unread,
Jun 15, 2016, 12:04:06 PM6/15/16
to julia-users
I've had a longstanding problem with random segfaults in a program I've written which recently re-appeared (see original discussion here: https://groups.google.com/forum/#!topic/julia-users/FV9AmKsZNuk)

It appears that currently these segfaults are caused by the usage of SharedArrays (or at least running the code in parallel); if I run the code on a single core it runs for days without segfaulting, while in parallel a segfault usually occurs within an hour or so of the program running. Someone in the other thread mentioned experiencing the same issue.

Has anyone else noticed this/is this a known issue? How would one go about de-bugging this sort of thing?

Tim Holy

unread,
Jun 15, 2016, 2:42:20 PM6/15/16
to julia...@googlegroups.com

Nils Gudat

unread,
Jun 15, 2016, 2:50:47 PM6/15/16
to julia-users
That looks familiar, yes. Would this be available in 0.4.6 then? And if so, when is 0.4.6 expected to be released?

Tim Holy

unread,
Jun 15, 2016, 5:49:48 PM6/15/16
to julia...@googlegroups.com
Dunno, but if you can build julia from source, you can easily make the same
change yourself and see if it fixes the problem. If not, then you know you
should keep searching for the real answer.

Best,
--Tim

Matthew Pearce

unread,
Jun 16, 2016, 3:44:53 PM6/16/16
to julia-users
I had a similar issue. In the end I started using yield(); in code blocks run on remote machines before the actual command.

On phone now so hard to look up but amit murphy posted a patch to do with finalisation on remotes that also helped (think issue number might have been 14445).

Nils Gudat

unread,
Jun 25, 2016, 2:01:31 PM6/25/16
to julia-users
No luck unfortunately on 0.4.6 either, so it seems the SharedArray fix (assuming it made it into 0.4.6) didn't help.
Any other ideas? How does one figure out the source of a segfault?

Andrew

unread,
Jun 25, 2016, 5:59:02 PM6/25/16
to julia-users
I didn't see the SharedArray fix on the 0.4.6 commit log.

Nils Gudat

unread,
Jun 26, 2016, 6:27:57 AM6/26/16
to julia-users
Oh well that would explain why it had no effect then - is there some version that contains this fix then? Would building the current 0.4.7+ master from source do? (Sorry, I've stuck strictly to stable versions so far so am not well versed in how the master branches work)

Tim Holy

unread,
Jun 26, 2016, 1:19:42 PM6/26/16
to julia...@googlegroups.com
If you've succeeded in building from source, you're almost there: https://
github.com/JuliaLang/julia/pull/16899/files is literally a 1-line change, so
you could just fire up an editor, make the same change in your own source,
rebuild, and test.

Best,
--Tim
Reply all
Reply to author
Forward
0 new messages