close
Skip to content

JAIPilot v8 evaluation mirror: Spring Framework #37159 - #3

Open
skrcode wants to merge 2 commits into
jaipilot-v8/spring-37159-basefrom
jaipilot-v8/spring-37159
Open

JAIPilot v8 evaluation mirror: Spring Framework #37159#3
skrcode wants to merge 2 commits into
jaipilot-v8/spring-37159-basefrom
jaipilot-v8/spring-37159

Conversation

@skrcode

@skrcode skrcode commented Aug 22, 2026

Copy link
Copy Markdown
Owner

Cloud-only evaluation mirror of spring-projects#37159

Upstream source head: 7e53799

The evaluation head is a tree-identical child of that source commit, created only to obtain a fresh immutable head after the managed-agent upgrade. JAIPilot must return one small, independently provable companion draft or leave this PR unchanged.

flex-donggyu and others added 2 commits August 21, 2026 11:03
LockSupport.park() can return without resume() having set the parked
thread reference to READY, either spuriously or when the thread is
interrupted. The reference then still points to the current thread,
so the compareAndSet in the await() loop can never succeed again and
the loop neither parks nor exits, spinning on CPU until the upstream
emits the next signal.

On virtual threads this is particularly harmful since a spinning
thread never yields its carrier. Once as many requests spin as there
are carrier threads, unrelated virtual thread tasks are no longer
scheduled. The interrupt case is reachable through Spring MVC async
request handling, where both a timeout and a client disconnect cancel
the task with interruption.

Park again when the reference is still owned by the current thread
after a spurious wakeup. On interruption, restore the interrupt
status, clear the reference, and propagate the cancellation as an
InterruptedIOException, unless data has arrived concurrently, in
which case the data is delivered first and the interrupt status is
preserved for the next call. The read() methods rethrow IOExceptions
as-is instead of wrapping them, so the interruption surfaces as a
regular IOException to callers.

Closes spring-projectsgh-37159

Signed-off-by: donggyu <donggyu@flex.team>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants