8360478: libjsig related tier3 jtreg tests fail when asan is configured#25978
8360478: libjsig related tier3 jtreg tests fail when asan is configured#25978MBaesken wants to merge 3 commits intoopenjdk:masterfrom
Conversation
|
👋 Welcome back mbaesken! A progress list of the required criteria for merging this PR into |
|
@MBaesken This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 34 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
|
With this change, all HS :tier3 jtreg tests pass on my Linux ppc64le test machine . |
Webrevs
|
dholmes-ora
left a comment
There was a problem hiding this comment.
If this fixes the problem then it seems fine. I don't know why ASAN cares about the library order or the implications thereof.
|
Could maybe someone with MSVC give it a try? My MSVC installation does not like ASAN (in theory it should work there). |
My understanding is that it wants to be injected first, and if you do LD_PRELOAD then another library might interfere with asan, and thus they want to warn for that. |
|
Thanks for the reviews ! /integrate |
|
Going to push as commit a23de2e.
Your commit was automatically rebased without conflicts. |
|
Saw this too late. I am unsure about this change, because it disables a rather necessary warning. ASAN interposes a number of APIs, e.g. malloc/free. Bad things can happen if that interposition does not cover the full JVM process. E.g. you preload library1, which comes before ASAN interposition is in place, so it uses libc malloc. You then load ASAN, then the rest of JVM. Anything loaded after ASAN will route through ASAN's version of malloc/free. So different parts of the process could use different versions of malloc/free. That could be trouble since we don't know whether pointers returned from raw libc malloc are compatible with ASAN's version of free, and vice versa. Even if nothing like that happens, it would quietly disable ASAN for a part of the libjvm, e.g. in case of libjsig for the libjsig. Unless we fully understand what would happen in these cases, I would not switch off these warning for the full process. Rather just switch off tests on ASAN builds that rely on LD_PRELOAD. We don't have that many (should only be libjsig, no?) This is just my 5 cents. I think ASAN is really useful, and the bugs @MBaesken already found proves that. |
|
We could also flag the tests with Probably in practise both approaches work, for production we do not use ASAN anyways. |
I'd be totally fine with that
Certainly. |
There are a number of :tier3 HS jtreg tests using libjsig. Unfortunately they clash with asan, so it should be avoided to run them if asan is configured.
Examples :
runtime/signal/TestSigalrm.java
runtime/signal/TestSigbus.java
They run into errors like this
One option would be to avoid running those tests when asan is enabled.
Another option is to avoid the so called 'link order check' .
https://github.com/google/sanitizers/wiki/addresssanitizerflags
verify_asan_link_order - Check position of ASan runtime in library list (needs to be disabled when other library has to be preloaded system-wide)
Progress
Warning
8360478: libjsig related tier3 jtreg tests fail when asan is configuredIssue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/25978/head:pull/25978$ git checkout pull/25978Update a local copy of the PR:
$ git checkout pull/25978$ git pull https://git.openjdk.org/jdk.git pull/25978/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 25978View PR using the GUI difftool:
$ git pr show -t 25978Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/25978.diff
Using Webrev
Link to Webrev Comment