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

cmdLineTester_GCRegressionTests_0 j9mm.107 ASSERTION FAILED at gc_base/ClassLoaderManager.cpp:394: ((false && (!markMap->isBitSet(classObject)))) #21028

Closed
JasonFengJ9 opened this issue Jan 27, 2025 · 5 comments

Comments

@JasonFengJ9
Copy link
Member

JasonFengJ9 commented Jan 27, 2025

Failure link

From internal Test_openjdk8_j9_sanity.functional_x86-64_linux_testList_0 (rtj-ubu24x86-svl-test-2shma-1)

openjdk version "1.8.0_442"
IBM Semeru Runtime Open Edition (build 1.8.0_442-b06)
Eclipse OpenJ9 VM (build v0.49.0-release-3c3d179854, JRE 1.8.0 Linux amd64-64-Bit Compressed References 20250123_1143 (JIT enabled, AOT enabled)
OpenJ9   - 3c3d179854
OMR      - e49875871
JCL      - 61f83383b8 based on jdk8u442-b06)

Rerun in Grinder - Change TARGET to run only the failed test targets

Optional info

Failure output (captured from console output)

[2025-01-24T19:55:07.457Z] variation: Mode110
[2025-01-24T19:55:07.457Z] JVM_OPTIONS:  -Xjit -Xgcpolicy:gencon -Xnocompressedrefs 

[2025-01-24T19:57:19.489Z] Testing: Unload lots of classes using normal behaviour (with JIT if JIT is Enabled)
[2025-01-24T19:57:19.489Z] Test start time: 2025/01/24 11:57:13 Pacific Standard Time
[2025-01-24T19:57:19.489Z] Running command: "/home/jenkins/workspace/Test_openjdk8_j9_sanity.functional_x86-64_linux_testList_0/jdkbinary/j2sdk-image/bin/java"  -Xjit -Xgcpolicy:gencon -Xnocompressedrefs   -Dcom.ibm.tools.attach.enable=no -Xdump:system:events=systhrow,filter=java/lang/OutOfMemoryError -Xmx8m -Xms8m -Xalwaysclassgc -Xdisableexcessivegc   -cp /home/jenkins/workspace/Test_openjdk8_j9_sanity.functional_x86-64_linux_testList_0/aqa-tests/TKG/../../jvmtest/functional/cmdLineTests/gcRegressionTests/gcRegressionTests.jar com.ibm.tests.garbagecollector.TestClassLoaderMain - - -
[2025-01-24T19:57:19.489Z] Time spent starting: 1 milliseconds
[2025-01-24T19:58:11.131Z] Time spent executing: 52623 milliseconds
[2025-01-24T19:58:11.131Z] Test result: FAILED

[2025-01-24T19:58:11.172Z]  [OUT] Allocating array (iteration 443)
[2025-01-24T19:58:11.172Z]  [OUT] i=0
[2025-01-24T19:58:11.172Z]  [OUT] i=1000
[2025-01-24T19:58:11.172Z]  [OUT] i=2000
[2025-01-24T19:58:11.172Z]  [ERR] 19:58:04.509 0x70b1300d2300    j9mm.107    *   ** ASSERTION FAILED ** at /home/jenkins/workspace/build-scripts/jobs/jdk8u/jdk8u-linux-x64-openj9/workspace/build/src/openj9/runtime/gc_base/ClassLoaderManager.cpp:394: ((false && (!markMap->isBitSet(classObject))))
[2025-01-24T19:58:11.172Z]  [ERR] JVMDUMP039I Processing dump event "traceassert", detail "" at 2025/01/24 11:58:04 - please wait.

[2025-01-24T19:59:08.136Z] ---TEST RESULTS---
[2025-01-24T19:59:08.136Z] Number of PASSED tests: 40 out of 42
[2025-01-24T19:59:08.136Z] Number of FAILED tests: 2 out of 42
[2025-01-24T19:59:08.136Z] 
[2025-01-24T19:59:08.136Z] ---SUMMARY OF FAILED TESTS---
[2025-01-24T19:59:08.136Z] Unload lots of classes using normal behaviour (with JIT if JIT is Enabled)
[2025-01-24T19:59:08.136Z] Ensure no core files have been produced by the preceding tests
[2025-01-24T19:59:08.136Z] -----------------------------
[2025-01-24T19:59:08.136Z] 
[2025-01-24T19:59:08.136Z] -----------------------------------
[2025-01-24T19:59:08.136Z] cmdLineTester_GCRegressionTests_0_FAILED

50x internal Grinder - passed

@dmitripivkine
Copy link
Contributor

Interesting, I will triage this issue tomorrow. We observed (and fixed) the same assertion issue for Balanced. But Gencon has very different and very straight forward class unloading logic.

@pshipton
Copy link
Member

Since the grinder didn't repeat it, moving forward.

@dmitripivkine
Copy link
Contributor

dmitripivkine commented Feb 3, 2025

The reason for assertion: during class unloading GC reached !j9classloader 0x70B130F028A8, correspondent class loader object !j9object 0x70b12e026780 is not marked. This is one of the com/ibm/tests/garbagecollector/ class loaders. This test creates many of them. Please note this object is located in the Nursery.
However for the only RAM class in this class loader !j9class 0x70B130F08500, class object !j9object 0x70B12DF17DC0 is located in Tenure and marked.
This is not valid. GC expected to mark class loader object during class object scan. Class object referenced to the parent class loader directly classObject->classLoader->classLoaderObject
So, there are two possibilities:

  • GC missed to mark class loader object during class object scan and never rescan it later.
  • Mark Map data was corrupted itself and correspondent bit was lost.

@dmitripivkine
Copy link
Contributor

Class object has direct link to the Classloader object. If Class object is located in the Tenure and alive and Classloader object is located in the Nursery Class object should be member of Remembered Set. And it actually is. There is no legitimate way to not have Classloader Object marked too. But it is not.

@dmitripivkine dmitripivkine self-assigned this Feb 4, 2025
@dmitripivkine
Copy link
Contributor

There is not so much we can do about this case - everything looks normal except bit in the mark map is not set. Similar class objects before and after have pointers to Classloader objects in the Nursery marked properly. And such objects have the same GC properties (the same Card, same puddle in the Remembered Set). There is no reason to suspect this major GC functionality to fail. Closing this issue for now. We will reopen it if we see this problem again.

@dmitripivkine dmitripivkine closed this as not planned Won't fix, can't repro, duplicate, stale Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants