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

Daniel Jeliński djelinski at openjdk.org
Mon Jul 14 10:09:42 UTC 2025


On Fri, 11 Jul 2025 12:45:05 GMT, Goetz Lindenmaier <goetz at openjdk.org> wrote:

>> Goetz Lindenmaier has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   more graceful close() implementation
>
> 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.

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

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


More information about the jdk-updates-dev mailing list