-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8337994: [REDO] Native memory leak when not recording any events #1095
base: master
Are you sure you want to change the base?
Conversation
👋 Welcome back bulasevich! A progress list of the required criteria for merging this PR into |
❗ This change is not yet ready to be integrated. |
This backport pull request has now been updated with issue from the original commit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a context difference in jfrTypeSet.cpp. Lgtm.
|
Reproducer: import jdk.jfr.consumer.RecordingStream;
/**
* Stress test to provoke the memory leak:
* starts 1M empty threads in VM with jfr recording
*/
public class PinnedThreadTracker implements AutoCloseable
{
private final RecordingStream recordingStream;
public PinnedThreadTracker() {
recordingStream = new RecordingStream();
recordingStream.startAsync();
System.out.println("start recording..");
}
@Override
public void close() {
recordingStream.close();
}
class MyThread extends Thread {
public void run() {
}
}
public void runThreads() {
for (int i = 0; i < 100; i++) {
for (int j = 0; j < 100; j++) {
for (int k = 0; k < 100; k++) {
new MyThread().start();
}
MyThread thr = new MyThread(); thr.start();
try {
thr.join();
} catch (Exception ex) {}
}
System.out.print(".");
}
}
public static void main(String a[]) {
PinnedThreadTracker ptt = new PinnedThreadTracker();
ptt.runThreads();
ptt.close();
}
} Manual testing results on jdk21u:
|
/approval request |
@bulasevich |
Hi @bulasevich, can this wait for the April update? It would get some more test coverage. |
Hi @GoeLin |
(not a clean backport)
Reworked to avoid https://github.com/openjdk/jdk/pull/17328/files backport
Functional jtreg1-3 tests are Ok.
Manual testing: the reproducer shows the problem is fixed with the change (see comments below)
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk21u-dev.git pull/1095/head:pull/1095
$ git checkout pull/1095
Update a local copy of the PR:
$ git checkout pull/1095
$ git pull https://git.openjdk.org/jdk21u-dev.git pull/1095/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 1095
View PR using the GUI difftool:
$ git pr show -t 1095
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk21u-dev/pull/1095.diff
Using Webrev
Link to Webrev Comment