-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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 in profiler #3971
Comments
I assume we are just moving this issue here? |
Copying this from the old thread also: using Profile
@profile let
tic()
n = 10000;
m = 100;
l = 10;
A = zeros(n,m);
for i=1:n
for j=1:m
c = rand(10,10);
A[i,j] = c[2,5];
end
h = find(A[i,:].>0.5);
for k=1:l
c = fft(A[:,l]);
d = min(abs(c));
end
end
toc()
end; GDB analysis appears to indicate the crash happens when a timer fires during the prolog of a function call which has dwarf info. Perhaps all C code would need to be compiled with |
Is it fair to guess that gdb is not using libunwind? |
I've ruled out a bug in the libunwind sigreturn implementation by writing a version that suspends/samples the main thread instead. Same problem still occurs unfortunately. |
@vtjnash This may explain the off by one mystery (from Apple's libunwind):
|
Looking at their unwinder, I found this:
which to me appears invalid if the base pointer has not been adjusted yet. |
Alright, I compiled the latest version of Apple's libunwind, which doesn't segfault, but it also doesn't give any output, so I'm not sure that's better. |
@loladiro by latest version of Apple's libunwind, are you referring to this, or to something later? |
Yeah, that's what I'm referring to. I actually managed to figure it out. I'll have a patch shortly. |
Stdlib: Pkg URL: https://github.com/JuliaLang/Pkg.jl.git Stdlib branch: master Julia branch: master Old commit: 6b4394914 New commit: e4a6723bf Julia version: 1.12.0-DEV Pkg version: 1.12.0 Bump invoked by: @IanButterworth Powered by: [BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl) Diff: JuliaLang/Pkg.jl@6b43949...e4a6723 ``` $ git log --oneline 6b4394914..e4a6723bf e4a6723bf Use `Base.TOML.Parser{Dates}` for TOML parsing w/ Dates support (#3938) 8c1f45d98 Append bundled depots to places where we empty it during tests (#3807) 2fdfabaf5 Test fixes (#3972) 34bb51ece fix bad depot path setting (#3971) 3715685b9 fix suggestions threshold for printing (#3968) 3f81d6c4d feat: add JULIA_PKG_GC_AUTO env var (#3642) fad26d7f2 check `project_file` isa String (#3967) 8875120ad fix not hardcoding "Project.toml" when fixing up extensions in manifest (#3851) 90d42a1b0 Make manifest usage log errors non-fatal (#3962) ``` Co-authored-by: Dilum Aluthge <dilum@aluthge.com>
…#55258) Stdlib: Pkg URL: https://github.com/JuliaLang/Pkg.jl.git Stdlib branch: master Julia branch: master Old commit: 6b4394914 New commit: e4a6723bf Julia version: 1.12.0-DEV Pkg version: 1.12.0 Bump invoked by: @IanButterworth Powered by: [BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl) Diff: JuliaLang/Pkg.jl@6b43949...e4a6723 ``` $ git log --oneline 6b4394914..e4a6723bf e4a6723bf Use `Base.TOML.Parser{Dates}` for TOML parsing w/ Dates support (JuliaLang#3938) 8c1f45d98 Append bundled depots to places where we empty it during tests (JuliaLang#3807) 2fdfabaf5 Test fixes (JuliaLang#3972) 34bb51ece fix bad depot path setting (JuliaLang#3971) 3715685b9 fix suggestions threshold for printing (JuliaLang#3968) 3f81d6c4d feat: add JULIA_PKG_GC_AUTO env var (JuliaLang#3642) fad26d7f2 check `project_file` isa String (JuliaLang#3967) 8875120ad fix not hardcoding "Project.toml" when fixing up extensions in manifest (JuliaLang#3851) 90d42a1b0 Make manifest usage log errors non-fatal (JuliaLang#3962) ``` Co-authored-by: Dilum Aluthge <dilum@aluthge.com>
This code crashes in julia, when running in the profiler, inside openblas. This is only on mac and not on linux.
https://gist.github.com/blakejohnson/5600044
A detailed discussion of this issue began when the profiler was in Profile.jl: timholy/IProfile.jl#14
The text was updated successfully, but these errors were encountered: