RFR: 8365050: Too verbose warning in os::commit_memory_limit() on Windows
    Joel Sikström 
    jsikstro at openjdk.org
       
    Thu Aug  7 16:43:50 UTC 2025
    
    
  
Hello,
This is a follow-up to [JDK-8364518](https://bugs.openjdk.org/browse/JDK-8364518), which introduced support for Job Objects in os::commit_memory_limit() on Windows. The single `warning(...)` turned out to be too verbose, as getting an error from `QueryInformationJobObject` is common when the process is not in a job and does not have permission to query information about a job. The verbosity results both in a lot of warning prints when building, and some tests to fail, which expects the output to contain something specific or nothing at all. See more details in the JBS issue.
To address this, I suggest we revise os::commit_memory_limit() to first check if the process is in a job before calling `QueryInformationJobObject`. When testing this locally, I can see that the verbose warnings when building are gone and the tests pass.
I'll run this through internal Oracle testing as well.
-------------
Commit messages:
 - 8365050: Too verbose warning in os::commit_memory_limit() on Windows
Changes: https://git.openjdk.org/jdk/pull/26680/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26680&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8365050
  Stats: 18 lines in 1 file changed: 15 ins; 0 del; 3 mod
  Patch: https://git.openjdk.org/jdk/pull/26680.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/26680/head:pull/26680
PR: https://git.openjdk.org/jdk/pull/26680
    
    
More information about the hotspot-runtime-dev
mailing list