phrb / NODAL.jl

NODAL is an Open Distributed Autotuning Library in Julia
Other
36 stars 5 forks source link

Fix segfault in 'src/core/search/optimize.jl' #3

Closed phrb closed 9 years ago

phrb commented 9 years ago

In Julia v0.3.11, when 'simulated_annealing' is called from within 'initialize_search_tasks!' and not in 'optimize', there is a segfault that is not fixed by importing 'simulated_annealing'. Closing this issue will require understanding why this happen and finding a definitive solution.

Workaround: The problem seems to be related to namespaces, but importing 'simulated_annealing.jl' does not solve it. Using a dummy line that calls 'simulated_annealing' solves the problem, even if the line is never called.

The segfault:

% julia examples/rosenbrock.jl

signal (11): Segmentation fault
unknown function (ip: 1802521875)
unknown function (ip: 1802527421)
unknown function (ip: 1805747695)
unknown function (ip: 1805747934)
unknown function (ip: 1805748227)
unknown function (ip: 1796914869)
unknown function (ip: 1796915214)
jl_trampoline at /home/phrb/.bin/julia-483dbf5279/bin/../lib/julia/libjulia.so (unknown line)
jl_apply_generic at /home/phrb/.bin/julia-483dbf5279/bin/../lib/julia/libjulia.so (unknown line)
julia_optimize_20275 at  (unknown line)
jlcall_optimize_20275 at  (unknown line)
anonymous at task.jl:6
jl_handle_stack_switch at /home/phrb/.bin/julia-483dbf5279/bin/../lib/julia/libjulia.so (unknown line)
julia_trampoline at /home/phrb/.bin/julia-483dbf5279/bin/../lib/julia/libjulia.so (unknown line)
unknown function (ip: 4199805)
__libc_start_main at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
unknown function (ip: 4199861)
zsh: segmentation fault  julia examples/rosenbrock.jl
phrb commented 9 years ago

This does not happen in Julia v0.4, even without the dummy line. I wonder what was the problem.

phrb commented 9 years ago

Closing this issue, since it was fixed in Julia v0.4.