Skip to content

Comments

Avoid SVM Deoptimizer.rewriteStackStub crash#14774

Open
JaroslavTulach wants to merge 6 commits intodevelopfrom
wip/jtulach/Bisect14719
Open

Avoid SVM Deoptimizer.rewriteStackStub crash#14774
JaroslavTulach wants to merge 6 commits intodevelopfrom
wip/jtulach/Bisect14719

Conversation

@JaroslavTulach
Copy link
Member

@JaroslavTulach JaroslavTulach commented Feb 17, 2026

Pull Request Description

  • ScheduledThreadPoolExecutor..allowCoreThreadTimeOut allows the guest code thread to terminate when idle
  • new one is then started when another request arrives
  • looks like GraalVM 25.0.1 for Windows has problems with such an approach
  • keep the thread(s) running once started

Hypothesis

Process of Bisecting

@JaroslavTulach JaroslavTulach linked an issue Feb 17, 2026 that may be closed by this pull request
@JaroslavTulach JaroslavTulach marked this pull request as draft February 18, 2026 04:28
@JaroslavTulach JaroslavTulach added the CI: No changelog needed Do not require a changelog entry for this PR. label Feb 19, 2026
@JaroslavTulach JaroslavTulach marked this pull request as ready for review February 19, 2026 16:13
@JaroslavTulach JaroslavTulach changed the title Bisecting SVM Deoptimizer.rewriteStackStub crash Avoid SVM Deoptimizer.rewriteStackStub crash Feb 19, 2026
ScheduledExecutorService newScheduledThreadPool(int cnt, String name, boolean systemThread) {
var s = new ScheduledThreadPoolExecutor(cnt, new Factory(name, systemThread));
s.allowCoreThreadTimeOut(true);
var s = Executors.newScheduledThreadPool(cnt, new Factory(name, systemThread));
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hubertp wrote:

I imagine we could be having deadlocks with this change? Safepoints don't like parked threads...

That's correct! I guess the most important goal right now is to eliminate the Windows crash, but ...

...if we increase guest parallelism...

then using Executors.newScheduledThreadPool is probably not an option as @hubertp points out!

@jdunkerley
Copy link
Member

Used the newest version all day without an issue on Windows.

@JaroslavTulach JaroslavTulach added the CI: Ready to merge This PR is eligible for automatic merge label Feb 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

-compiler CI: No changelog needed Do not require a changelog entry for this PR. CI: Ready to merge This PR is eligible for automatic merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crash in Deoptimizer.rewriteStackStub

3 participants