Skip to content
This repository has been archived by the owner on Sep 19, 2023. It is now read-only.

Commit

Permalink
8278987: RunThese24H.java failed with EXCEPTION_ACCESS_VIOLATION in _…
Browse files Browse the repository at this point in the history
…_write_sample_info__

Reviewed-by: jbachorik
  • Loading branch information
Markus Grönlund committed Dec 22, 2021
1 parent 7341439 commit 713fbeb
Showing 1 changed file with 3 additions and 9 deletions.
Expand Up @@ -202,7 +202,7 @@ static void prepare_for_resolution() {

static bool stack_trace_precondition(const ObjectSample* sample) {
assert(sample != NULL, "invariant");
return sample->has_stack_trace_id() && !sample->is_dead() && !sample->stacktrace().valid();
return sample->has_stack_trace_id() && !sample->is_dead();
}

class StackTraceBlobInstaller {
Expand Down Expand Up @@ -249,7 +249,7 @@ void StackTraceBlobInstaller::install(ObjectSample* sample) {
writer.write_type(TYPE_STACKTRACE);
writer.write_count(1);
ObjectSampleCheckpoint::write_stacktrace(stack_trace, writer);
blob = writer.move();
blob = writer.copy();
_cache.put(sample, blob);
sample->set_stacktrace(blob);
}
Expand Down Expand Up @@ -278,7 +278,7 @@ void ObjectSampleCheckpoint::on_rotation(const ObjectSampler* sampler) {
}

static bool is_klass_unloaded(traceid klass_id) {
assert_locked_or_safepoint(ClassLoaderDataGraph_lock);
assert(ClassLoaderDataGraph_lock->owned_by_self(), "invariant");
return JfrKlassUnloading::is_unloaded(klass_id);
}

Expand Down Expand Up @@ -381,12 +381,6 @@ void ObjectSampleCheckpoint::write(const ObjectSampler* sampler, EdgeStore* edge
assert(sampler != NULL, "invariant");
assert(edge_store != NULL, "invariant");
assert(thread != NULL, "invariant");
{
// First install stacktrace blobs for the most recently added candidates.
MutexLocker lock(SafepointSynchronize::is_at_safepoint() ? nullptr : ClassLoaderDataGraph_lock);
// the lock is needed to ensure the unload lists do not grow in the middle of inspection.
install_stack_traces(sampler);
}
write_sample_blobs(sampler, emit_all, thread);
// write reference chains
if (!edge_store->is_empty()) {
Expand Down

3 comments on commit 713fbeb

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jbachorik
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/backport jdk17u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on 713fbeb Jan 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jbachorik the backport was successfully created on the branch jbachorik-backport-713fbeb0 in my personal fork of openjdk/jdk17u-dev. To create a pull request with this backport targeting openjdk/jdk17u-dev:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit 713fbeb0 from the openjdk/jdk18 repository.

The commit being backported was authored by Markus Grönlund on 22 Dec 2021 and was reviewed by Jaroslav Bachorik.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk17u-dev:

$ git fetch https://github.com/openjdk-bots/jdk17u-dev jbachorik-backport-713fbeb0:jbachorik-backport-713fbeb0
$ git checkout jbachorik-backport-713fbeb0
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk17u-dev jbachorik-backport-713fbeb0

Please sign in to comment.