Skip to content
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

Handle Continuation scan during Concurrent Scavenger and Metronome #16157

Merged
merged 1 commit into from
Oct 24, 2022

Conversation

LinHu2016
Copy link
Contributor

For CS and Metronome, due to synchronous nature of their barriers (they read the value of the slot and act on it immediately, for example they may evacuate object for CS and mark object for Metronome), We fully scan java stacks of related continuation during the virtual thread mount.

depends: eclipse/omr#6781

Signed-off-by: Lin Hu linhu@ca.ibm.com

@pshipton
Copy link
Member

Note we can run system testing in a PR build, i.e. ... test sanity.system <plats> <vers>

@LinHu2016 LinHu2016 force-pushed the supportConcurrentScavenger2 branch 3 times, most recently from 87d1aa8 to a8e639b Compare October 21, 2022 12:52
@@ -267,6 +269,9 @@ class MM_ObjectAccessBarrier : public MM_BaseVirtual
virtual bool postObjectRead(J9VMThread *vmThread, J9Object *srcObject, fj9object_t *srcAddress);
virtual bool postObjectRead(J9VMThread *vmThread, J9Class *srcClass, J9Object **srcAddress);

virtual void preMountContinuation(J9VMThread *vmThread, j9object_t contObject) {}
virtual void postUnmountContinuation(J9VMThread *vmThread, j9object_t contObject) {}
virtual void registerScavenger(MM_Scavenger *scavenger) {}
Copy link
Contributor

Choose a reason for hiding this comment

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

I would not introduce subclass specific method in a base class. This method should be only in StandardAccessBarrier and not even virtual.

Then, of course, pointer to accessBarrier must be upcasted when invoking registerScavenger.

Prior to that we can assert 2 things are valid, to make sure that upcast is reasonable (none tried to register to wrong type of accessBarrier) :

  • isStandardGC() - this is exact guard that is used when we instantiate StandardAccessBarrier
  • scavengerEnabled

@@ -265,10 +265,12 @@ MM_StandardAccessBarrier::postObjectStoreImpl(J9VMThread *vmThread, J9Object *ds
{
/* If the source object is NULL, there is no need for a write barrier. */
if(NULL != srcObject) {
#if defined(OMR_GC_CONCURRENT_SCAVENGER)
if (_extensions->isConcurrentScavengerEnabled() && !_extensions->isScavengerBackOutFlagRaised()) {
Assert_MM_false(_extensions->scavenger->isObjectInEvacuateMemory(dstObject));
Copy link
Contributor

Choose a reason for hiding this comment

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

missed to use cached value

@LinHu2016 LinHu2016 force-pushed the supportConcurrentScavenger2 branch 2 times, most recently from be9e78b to 0c18a0d Compare October 21, 2022 15:50
@amicic
Copy link
Contributor

amicic commented Oct 24, 2022

jenkins test sanity.system aix jdk8

@amicic
Copy link
Contributor

amicic commented Oct 24, 2022

jenkins test sanity win jdk19

@amicic
Copy link
Contributor

amicic commented Oct 24, 2022

Hm, sanity.system failure does not seem to be related:

TST stderr j> 2022/10/24 14:37:55.467 Mon Oct 24 14:37:55 UTC 2022 - main : Threads started, waiting for deadlock to establish
TST stderr j> 2022/10/24 14:37:55.467 Mon Oct 24 14:37:55 UTC 2022 - Deadlock Thread 1 : Acquired second lock
TST stderr j> 2022/10/24 14:37:55.518 Mon Oct 24 14:37:55 UTC 2022 - main : Deadlock established
TST stderr j> 2022/10/24 14:38:00.545 Mon Oct 24 14:38:00 UTC 2022 - Deadlock Thread 1 : Interrupted trying to get second lock
TST stderr j> 2022/10/24 14:38:00.546 Mon Oct 24 14:38:00 UTC 2022 - Deadlock Thread 2 : Interrupted trying to get second lock
TST stderr Exception in thread "main" java.lang.AssertionError: Reported Deadlocked Threads are Incorrect

@pshipton
Copy link
Member

There was a bad change merged #15956

test/testng.xml Outdated
<class name=".TestGCPolicyNogc"/>
</classes>
</test> <!-- Test -->
</suite> <!-- Suite -->
Copy link
Contributor

Choose a reason for hiding this comment

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

wrong change.
expected to touch one of module.xml to allow include from gc_base to gc_modron_standard

MM_GCExtensions::registerScavenger(MM_Scavenger *scavenger)
{
MM_GCExtensionsBase::registerScavenger(scavenger);
if (isStandardGC()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

let's actually make this an assert

@LinHu2016 LinHu2016 force-pushed the supportConcurrentScavenger2 branch 2 times, most recently from 3ce7ca7 to bcdcf87 Compare October 24, 2022 18:41
@amicic
Copy link
Contributor

amicic commented Oct 24, 2022

jenkins test sanity.system xLinux jdk8

@amicic
Copy link
Contributor

amicic commented Oct 24, 2022

jenkins test sanity aix jdk19

@@ -53,6 +53,7 @@ SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-excepti
<include path="j9gcstats"/>
<include path="$(OMR_DIR)/gc/stats" type="relativepath"/>
<include path="j9gcgluejava"/>
<include path="j9modronstandard"/>
Copy link
Contributor

Choose a reason for hiding this comment

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

need copyright update

Copy link
Contributor

Choose a reason for hiding this comment

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

from internal builds I see, we need -I../omr/gc/base/standard too

In file included from �[01m�[K../omr/gc/base/Configuration.hpp:33:0�[m�[K,
                 from �[01m�[K../gc_modron_standard/StandardAccessBarrier.hpp:37�[m�[K,
                 from �[01m�[KGCExtensions.cpp:40�[m�[K:
�[01m�[K../gc_glue_java/ConfigurationDelegate.hpp:34:10:�[m�[K �[01;31m�[Kfatal error: �[m�[KConcurrentGC.hpp: No such file or directory

For CS and Metronome, due to synchronous nature of their barriers (they
read the value of the slot and act on it immediately, for example they
may evacuate object for CS and mark object for Metronome), We fully scan
java stacks of related continuation during the virtual thread mount.

Signed-off-by: Lin Hu <linhu@ca.ibm.com>
@amicic
Copy link
Contributor

amicic commented Oct 24, 2022

The only commit since jenkins tests were launched was touching only a module.xml file that is relevant only for IBM internal builds, so I did not relaunch them, however results got hidden:

aix sanity.functional jdk19 all green:
https://openj9-jenkins.osuosl.org/job/PullRequest-OpenJ9/2907/

xLinux sanity.system jdk8, all green except known, but unrelated failures in JLM:
https://openj9-jenkins.osuosl.org/job/PullRequest-OpenJ9/2906/

@amicic amicic merged commit 1a8e36d into eclipse-openj9:master Oct 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants