-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Valgrind failure due to multidimensional.jl
stagedfunction change
#10171
Comments
You're doing some pretty heroic detective work. Unfortunately, I fear it's a bug exposed by that commit, rather than introduced by that commit. Other than I have to say, in the past valgrind seemed almost like a magic bullet for zeroing in on memory bugs, but I've been dismayed that in julia these errors are not easier to track down. Does anyone have any insights about why? |
I get the same exact behavior when I run with I'm hoping that once the entire testsuite runs (and passes) under Valgrind, we will be able to detect, identify and fix memory errors much more quickly than now. Hopefully this ends up working out :). For now I will probably proceed by trying to find another test file (other than |
That's certainly my thinking as well, given that #9098 could be subtitled "invasion of the stagedfunctions." |
To answer my own question above, I bet we need to teach valgrind about julia's mempools. |
@timholy that is a great idea, one that should probably take higher priority than a bunch of us running around trying to find memory bugs here and there ;). Python takes an alternative approach, which is to suggest that people disable memory pools when running under valgrind. There is an obvious disadvantange that running under valgrind then requires a separate build (and would then probably be done less frequently), but depending on the current structure of the code, this may get us more information sooner than teaching valgrind about julia's mempools. |
Actually, it seems that defining |
Nice, thanks @garrison. |
I'm going to close this since I believe I figured it out. The key is that we need to pass |
I'm surprised LLVM doesn't use the client request to invalidate the code cache. |
@Keno I'm surprised too, but passing this flag makes the full test suite work under Nulgrind ( It is mentioned in the Valgrind docs that only some architectures require programs to flush the instruction cache, so perhaps that is what is going on. |
Posted this in the wrong thread earlier: |
@Keno Or perhaps |
On second thought, |
@Keno Actually, LLVM might not be the problem (or might not be the only problem). In fact, the I looked at the
So I think this is one of the issues. |
While working on trying to get all tests to pass under valgrind (PR #10015), I noticed that running
test/strings.jl
under valgrind fails. While the precise error is not constant across revisions,git-bisect
tells me that 373e61b (part of PR #9098) introduced the change that leads to failure. With this commit, the error is as follows:At first I thought this might be a valgrind bug, but the
Warning: client switching stacks?
does not appear on the commit before this one, c8c5b6f. (In both cases I applied the change in 1296c04 so that there would be no known memory errors in the program, in case that was a confounding factor.) I am using the latest valgrind, version 3.10.1.CC: @timholy
The text was updated successfully, but these errors were encountered: