-
Task
-
Resolution: Fixed
-
P4
-
None
-
b20
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8206731 | 12 | Peter Levart | P4 | Resolved | Fixed | team |
JDK-8206506 | 11.0.1 | Peter Levart | P4 | Resolved | Fixed | b01 |
JDK-8273772 | openjdk8u322 | Peter Levart | P4 | Resolved | Fixed | b01 |
JDK-8271854 | 8u321 | Evan Whelan | P4 | Resolved | Fixed | b01 |
JDK-8274921 | 8u311 | Evan Whelan | P4 | Resolved | Fixed | b31 |
JDK-8271944 | 8u301 | Evan Whelan | P4 | Closed | Fixed | b33 |
The above is not a huge issue in most cases. However, we've had an issue with one of our services that does churn through Threads (which live long enough for their Thread objects + cached buffers to be moved to the old generation) and also does CMS cycles very, very infrequently (like once every few days). As a result, the old gen grows (slowly) with unreachable direct buffers that are holding on to unused direct memory which cause a nasty native memory leak.
It would be helpful to explicitly reclaim any direct buffers in a thread's cache when a thread exists. This introduces an interesting challenge in that the thread has to notify NIO that it's exiting so that NIO can reclaim any cached buffers. I propose to do that by introducing exit hooks to ThreadLocals. This will of course open a huge can of worms. :-) But, we can structure the initial version so that the exit hooks can only be registered within java.base to avoid having to update the ThreadLocal public API.
I'll post a patch with this change to get feedback on it.
(More on this topic in
- backported by
-
JDK-8206506 Explicitly reclaim cached thread-local direct buffers at thread exit
- Resolved
-
JDK-8206731 Explicitly reclaim cached thread-local direct buffers at thread exit
- Resolved
-
JDK-8271854 Explicitly reclaim cached thread-local direct buffers at thread exit
- Resolved
-
JDK-8273772 Explicitly reclaim cached thread-local direct buffers at thread exit
- Resolved
-
JDK-8274921 Explicitly reclaim cached thread-local direct buffers at thread exit
- Resolved
-
JDK-8271944 Explicitly reclaim cached thread-local direct buffers at thread exit
- Closed
- relates to
-
JDK-8205540 test/hotspot/jtreg/vmTestbase/nsk/jdb/trace/trace001/trace001.java fails with Debuggee did not exit after 15 <cont> commands
- Resolved
-
JDK-8205540 test/hotspot/jtreg/vmTestbase/nsk/jdb/trace/trace001/trace001.java fails with Debuggee did not exit after 15 <cont> commands
- Resolved
-
JDK-4469299 (bf) Excessive native memory growth with NIO due to finalization delay
- Closed
-
JDK-8205562 vmTestbase/nsk/stress/strace tests failing with unexpected method name
- Closed