-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
ASAN reports out-of-bounds read error in anderson2021_test_apps_autoscheduler
#7606
Comments
Ideally @aekul could take a look. |
Any updates on this? :) |
Will take a look at this in the next few days. |
I'm not able to reproduce this. I added an assert and built Halide with CMake but things work fine. Is that all I should have to do to reproduce it? @steven-johnson or @Yongqi-Zhuo are using the default settings for the autoscheduler? |
You need to run with ASAN (Address Sanitizer) to repro. Specify |
I'm having trouble getting ASAN to build. I've tried LLVM 15 and 16, but can't build either of them. Error is:
Tried Googling but can't find any way to resolve it. "compiler-rt" seems to be the issue. Is |
Yikes, yes, sorry (I thought this was in the readme)... for ASAN you must build LLVM with
(I have only tested recently with top-of-tree LLVM but 16 should work) |
Building LLVM works with those changes, thanks. But now when I compile Halide, I get |
As you may surmise from the name, the (Frankly, though, I'm surprised that the Float16 stuff isn't failing for you on PowerPC in general, since that support is fairly specific to x86 / ARM IIUC, and we do basically zero testing of our PowerPC backend at this point.) |
@steven-johnson @aekul Here you are, the minimal repro that triggers the ASAN error with Anderson2021 autoscheduler. #7699 The same code did not trigger ASAN error with the I am also open to a code rewrite/refactoring to bypass the ASAN error. |
See also #7699, which may or may not be the same bug. (The case for 7699 is that we have site(s) that incorrectly assume |
See #7703 |
And also #7706 |
I'm still having issues getting ASAN to run. Is this error still occurring with the recent changes? |
I have not re-tested with current top-of-tree, I can do so today. Can you be more specific about ASAN problems? (It is rather painful to make work unfortunately, but with the right recipe it actually is reliable on Linux x64 machines... and now that you mention it, the right recipe should be documented. I'll do that too.) |
Unfortunately, at today's top-of-tree, we still fail; building and testing with
|
#7748 should make this easier to track down |
The new failure is occurring in this sub-test:
...with a similar issue as the previous one, IIRC: in |
Hi @aekul -- I took a look at this one remaining (known) failure but (again) the nature of what's going on isn't entirely clear to me. If you have any bandwidth to at least point me in a useful direction for debugging, I will try to fix it. (I really want to get this autoscheduler properly enabled for automated testing and use, but I am understandably reluctant to do so while we still have known crashy/asan bugs in it.) Thanks for any advice you can give on this. |
I was getting If there isn't, then maybe you could provide me with some more debugging output e.g. which Func + stage is it failing on? I'm guessing it's something to do with the RDom or maybe the |
Per previous discussions, our ASAN support is current supported only on x86-64-linux. It could probably be made to work on x64-64-osx, but you are literally the only person I know who is building/testing on PowerPC, so I can't help much there. It sounds like you don't have an x86-64-linux machine available? I'll try to get a repro case to you soon. |
FYI: At current top-of-tree, we now fail via To avoid noise, I commented out all the other subtests (aside from the one I quoted in the earlier comment) and ran with HL_DEBUG_CODEGEN=4 and captured the output here: https://gist.github.com/steven-johnson/ff76ad4e986f48b5e4570743760651e0 (a bit too long to paste into a comment here) |
Ah, I can repro with the |
ASAN is reporting an out-of-bounds read error in SearchSpace.cpp:125; examination reveals that we are reading past the end of a
std::vector
(in this case,c->size.size()
is 1, butl.pure_dim
is 1)... so this is a real bug.Unfortunately I have no idea where to even begin debugging this... assigning to @abadams for now to see if he can route it to the right person.
(ASAN isn't necessary to repro this bug, just add something like
internal_assert(l.pure_dim < c->size.size());
in the code)(But if you want to run with asan, just add
--preset linux-x64-asan
to the cmake and ctest commands)The text was updated successfully, but these errors were encountered: