Hello, I was curious about profiling (and learning how to do it) a code I wrote. Reading the official guide (here), I came across the ProfileView.jl package.
I simply used the @profview
macro provided by the package and I can indeed obtain the flame graph and learn about my code execution. However, I also get a number of warnings
WARNING: profiler attempt to access an invalid memory location
is this indicating some sort of memory leak in my code? Couldn’t find any reference to this in any documentation
1 Like
I’ve just run into this, and I’m wondering what this means, too.
It’s emitted from here: https://github.com/JuliaLang/julia/blob/38f2c594c49cec46d38be6dd614a5592582a3016/src/signals-unix.c#L692
And from https://linux.die.net/man/3/sigsetjmp
setjmp () and sigsetjmp () return 0 if returning directly, and nonzero when returning from longjmp (3) or siglongjmp (3) using the saved context.
And from wikipedia
The (apparent) return value from setjmp
indicates whether control reached that point normally (zero) or from a call to longjmp
(nonzero). This leads to a common idiom: if( setjmp(x) ){/* handle longjmp(x) */}
.
That’s all I got. Not sure where the longjmp in question is.
1 Like
I’m getting the same warning with my code and regular Profile
(without any visualization). I’m using Julia 1.5.1 on MacOS.
I have also seen this; could it have to do with multithreading?
The code I’m using doesn’t make explicit use of Threads, though maybe there’s something going on under the hood with one of the subordinate packages.
I’m getting the same warning when trying to profile a call to save
for a figure.