[jdk17u-dev] RFR: 8316580: HttpClient with StructuredTaskScope does not close when a task fails [v2]

Goetz Lindenmaier goetz at openjdk.org
Sat Jul 19 11:23:47 UTC 2025


On Mon, 14 Jul 2025 10:07:14 GMT, Daniel Jeliński <djelinski at openjdk.org> wrote:

>> Hi @dfuch, @wxiao @djelinski 
>> Could you please have a look at this backport? It seems I have missed something.  The problem I describe on the comment above sounds a lot as if the original problem, not decrementing the refcount, still exists.
>> Obviously this backport is tricky as 17 lacks the virtual threads...
>> I would appreciate your help.
>> (I guessed the github name of you, Weibing Xiao. Maybe it works.)
>
> Hi @GoeLin, that's a different problem here; looking at the thread dump in the jtr file, you can see that the ForkJoinPool tasks are still running. Apparently `cancel(true)` does not interrupt the threads in JDK 17. I suppose the threads need to be interrupted explicitly.

Hi @djelinski, thanks for the help. We are now calling shutdownNow() in TestTaskScope.close().  The test results now look similar to 21.

-------------

PR Comment: https://git.openjdk.org/jdk17u-dev/pull/3706#issuecomment-3092294967


More information about the jdk-updates-dev mailing list