This PR uses a shared per session family depth limit + per session depth value 
to enforce invalidation. This will remove the container's strong references to 
the child sessions, which allows child sessions to be garbage collected when 
they are no longer reachable. The drawback is that the invalidation depth limit 
will be per family, so once a session is invalidated at the specified depth, 
all deeper sessions will be invalidated, not just its descendants.

Ran related tests on linux-x64, linux-aarch64, macos-aarch64 and windows-x64:

make test TEST=test/jdk/sun/security/ssl
make test TEST=test/jdk/javax/net/ssl

Results:

[windows-x64-specific-test.log](https://github.com/user-attachments/files/33689537/windows-x64-specific-test.log)
[windows-x64-specific-2-test.log](https://github.com/user-attachments/files/33689538/windows-x64-specific-2-test.log)
[macos-aarch64-specific-test.log](https://github.com/user-attachments/files/33689539/macos-aarch64-specific-test.log)
[macos-aarch64-specific-2-test.log](https://github.com/user-attachments/files/33689540/macos-aarch64-specific-2-test.log)
[linux-x64-specific-test.log](https://github.com/user-attachments/files/33689541/linux-x64-specific-test.log)
[linux-x64-specific-2-test.log](https://github.com/user-attachments/files/33689542/linux-x64-specific-2-test.log)
[linux-aarch64-specific-test.log](https://github.com/user-attachments/files/33689543/linux-aarch64-specific-test.log)
[linux-aarch64-specific-2-test.log](https://github.com/user-attachments/files/33689544/linux-aarch64-specific-2-test.log)

Low risk - the change is limited to SSLSessionImpl, its cache lookup and the 
ticket code. The worst case is an occasional extra full handshake.

---------
- [x] I confirm that I make this contribution in accordance with the [OpenJDK 
Interim AI Policy](https://openjdk.org/legal/ai).

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

Commit messages:
 - Add /test/lib and ForceGC build to ResumeChecksClientStateless
 - 8394261: TLS 1.3: SSLSessionImpl.childSessions holds long object chains

Changes: https://git.openjdk.org/jdk/pull/33447/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=33447&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8394261
  Stats: 79 lines in 5 files changed: 58 ins; 9 del; 12 mod
  Patch: https://git.openjdk.org/jdk/pull/33447.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/33447/head:pull/33447

PR: https://git.openjdk.org/jdk/pull/33447

Reply via email to