-
Notifications
You must be signed in to change notification settings - Fork 65
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 using PythonCall on Apple M1 with Julia 1.11.0-rc4 #563
Comments
I have a very similar issue with the final julia 1.11.0. The segfault is very non-deterministic. It doesn't always happen and when it happens it doesn't always happen at the same point. Some backtraces look like this:
Others like this:
Running the same code with julia 1.10.4 doesn't have this issue. |
I also get seg faults, on linux, only on multithread, in applications which worked with julia 1.10 |
Fwiw, here's a somewhat self-contained example that reliably crashes for me within a handful of runs (but it's non-deterministic), see this repository. Its only dependencies are import QuadGK
using PythonCall
const camb = pyimport("camb")
const Pm = let
params = camb.set_params(H0=70)
params.set_matter_power(redshifts=0:.1:1.5, kmax=9.5)
res = camb.get_results(params)
power = res.get_matter_power_interpolator(nonlinear=false, k_hunit=false, hubble_units=false, extrap_kmax=1e6).P
(z, k) -> let
pyval = power(z, k)
pyconvert(Float64, pyval)
end
end
calculate_stuff = (R, z) -> let
θ = R/900.
integrand = lθ -> let
kl = lθ/((1+z) * R)
sqrt(lθ)*cos(lθ)*Pm(z, kl) / (θ*θ)
end
QuadGK.quadgk(integrand, 0, 50)[1]
end
zvalues = [0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7]
Rvalues = collect(.1:.2:7.0)
@info @. calculate_stuff(Rvalues, zvalues') |
Affects: PythonCall
Describe the bug
I got a segfault using PythonCall on GitHub CI for Apple M1.
https://github.com/JuliaIO/ZipArchives.jl/actions/runs/11219970406/job/31187122812?pr=82
This seems to be an intermittent issue.
Your system
Additional context
Stack trace:
The text was updated successfully, but these errors were encountered: