Skip to content
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 fixes. #51755

Merged
merged 2 commits into from
Nov 20, 2023
Merged

ASAN fixes. #51755

merged 2 commits into from
Nov 20, 2023

Conversation

maleadt
Copy link
Member

@maleadt maleadt commented Oct 18, 2023

Taking @topolarity's fixes from #50170. Resolves #47698

For the sigsetjmp bypass; looks like glibc removed the __libc_siglongjmp symbol in glibc 2.34, so I guess that's the cutoff:

❯ objdump --disassemble --show-all-symbols 2.33/lib/x86_64-linux-gnu/libc.so.6 | grep siglongjmp
000000000003c510 <__libc_siglongjmp@@GLIBC_PRIVATE>:
000000000003c510 <siglongjmp@@GLIBC_2.2.5>:
   3c528:	75 14                	jne    3c53e <__libc_siglongjmp@@GLIBC_PRIVATE+0x2e>
   3c54f:	eb d9                	jmp    3c52a <__libc_siglongjmp@@GLIBC_PRIVATE+0x1a>

❯ objdump --disassemble --show-all-symbols 2.34/lib/x86_64-linux-gnu/libc.so.6 | grep siglongjmp
000000000003d820 <siglongjmp@@GLIBC_2.2.5>:

@Keno What kind of code required bypassing the ASAN siglongjmp interceptor? Stuff seems to work fine without it.

@maleadt maleadt force-pushed the tb/asan branch 2 times, most recently from c03702a to 2e17bb5 Compare October 18, 2023 08:38
@Keno
Copy link
Member

Keno commented Oct 19, 2023

What does make testall look like with this branch for you? If you're not getting any false positives around the task stuff then there is probably no issue.

@maleadt
Copy link
Member Author

maleadt commented Oct 19, 2023

Hard to tell. make testall fails in so many ways (fails to connect to worker, and running tests in isolation shows failures all over the place), and I have no build to compare against. Maybe CI should upload the ASAN binaries it generates?

@Keno
Copy link
Member

Keno commented Oct 19, 2023

IIRC, I had make testall passing under asan after #46336, so if it looks bad, that's probably a regression (though not particularly surprising).

@brenhinkeller brenhinkeller added the bugfix This change fixes an existing bug label Oct 20, 2023
maleadt and others added 2 commits November 16, 2023 19:31
Use same trick as dlopen to support siglongjmp bypass.
@vtjnash
Copy link
Member

vtjnash commented Nov 16, 2023

@Keno seemed like the main problem with that approach is that the stack will almost always be entirely unpoisoned, IIUC, which should miss issues not cause them. But I suppose it also would only unpoison the main stack, which might confuse it when running on alternate stacks. But anyways, I have now implemented the strategy used by dlopen for this, which seems to be working locally for me. I didn't run all of the tests, but the ones I ran (such as channels) were generally seeming to be working.

@vtjnash vtjnash added the merge me PR is reviewed. Merge when all tests are passing label Nov 17, 2023
@giordano
Copy link
Contributor

ASAN is failing, timing out after two hours more specifically: https://buildkite.com/julialang/julia-master/builds/30174#018bd9c4-922a-4e1d-9321-1290ad23019f/705-1659

@vtjnash vtjnash merged commit 5cb0e51 into master Nov 20, 2023
4 of 8 checks passed
@vtjnash vtjnash deleted the tb/asan branch November 20, 2023 15:45
@vtjnash
Copy link
Member

vtjnash commented Nov 20, 2023

@giordano this is not expected to change the time taken by the test or to fix that incorrect timeout threshold set in the buildkite CI configuration

@giordano giordano removed the merge me PR is reviewed. Merge when all tests are passing label Nov 20, 2023
mkitti pushed a commit to mkitti/julia that referenced this pull request Dec 9, 2023
For the `sigsetjmp` bypass; looks like glibc removed the
`__libc_siglongjmp` symbol in glibc 2.34, so change to using the
approach taking by our `dlopen` wrapper instead.

Adopts topolarity's fixes from JuliaLang#50170
Resolves JuliaLang#47698

Co-authored-by: Jameson Nash <vtjnash@gmail.com>
@vchuravy vchuravy added the backport 1.10 Change should be backported to the 1.10 release label Sep 27, 2024
KristofferC pushed a commit that referenced this pull request Oct 7, 2024
For the `sigsetjmp` bypass; looks like glibc removed the
`__libc_siglongjmp` symbol in glibc 2.34, so change to using the
approach taking by our `dlopen` wrapper instead.

Adopts topolarity's fixes from #50170
Resolves #47698

Co-authored-by: Jameson Nash <vtjnash@gmail.com>
(cherry picked from commit 5cb0e51)
@KristofferC KristofferC mentioned this pull request Oct 7, 2024
63 tasks
KristofferC added a commit that referenced this pull request Oct 22, 2024
Backported PRs:
- [x] #51755 <!-- ASAN fixes. -->
- [x] #55329 <!-- mapreduce: don't inbounds unknown functions -->
- [x] #55365 <!-- ml-matches: ensure all methods are included -->
- [x] #55483 <!-- fix hierarchy level of "API reference" in `Dates`
documentation -->
- [x] #55268 <!-- simplify complex atanh and remove singularity
perturbation -->
- [x] #55504 <!-- Update symmetric docstring to reflect the type of uplo
-->
- [x] #55524 <!-- Set `.jl` sources as read-only during installation -->
- [x] #41244 <!-- Fix shell `cd` error when working dir has been deleted
-->
- [x] #55829 <!-- [Dates] Make test more robust against non-UTC
timezones -->
- [x] #55641 <!-- fall back to slower stat filesize if optimized
filesize fails -->
- [x] #55849 <!-- Mmap: fix grow! for non file IOs -->
- [x] #55945 <!-- Fix logic in `?` docstring example -->
- [x] #55743 <!-- doc: heap snapshot viewing -->
- [x] #56023 <!-- Sockets: Warn when local network access not granted.
-->
- [x] #54276 <!-- Fix solve for complex `Hermitian` with non-vanishing
imaginary part on diagonal -->
- [x] #54669 <!-- Improve error message in inplace transpose -->
- [x] #55295 <!-- LAPACK: Aggressive constprop to concretely infer
syev!/syevd! -->
- [x] #55303 <!-- avoid overflowing show for OffsetArrays around typemax
-->
- [x] #55342 <!-- Ensure bidiagonal setindex! does not read indices in
error message -->
- [x] #55507 <!-- Fix fast getptls ccall lowering. -->
- [x] #55522 <!-- Fix tr for Symmetric/Hermitian block matrices -->
- [x] #55854 <!-- 🤖 [master] Bump the Downloads stdlib from 1061ecc to
89d3c7d -->
- [x] #55863 <!-- Update TaskLocalRNG docstring according to #49110 -->
- [x] #55567 <!-- Initialize threadpools correctly during sysimg build
-->
- [x] #55506 <!-- Fix indexing in _mapreducedim for OffsetArrays -->
- [x] #54737 <!-- LazyString in interpolated error messages involving
types -->
@KristofferC KristofferC removed the backport 1.10 Change should be backported to the 1.10 release label Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix This change fixes an existing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ASAN: debug build fails
7 participants