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

Fix failures in Condy Test #3089

Merged
merged 2 commits into from
Oct 1, 2018
Merged

Conversation

r30shah
Copy link
Contributor

@r30shah r30shah commented Oct 1, 2018

When GC kicks in when constant dynamic object is resolved, VM helper code expects all the registers are stored on Java Stack and while resolving frames it takes this adjustment into account while building frames. Condy Test was failing as it was not storing registers on Java Stack producing corrupted stack frame.

Fixes: #3082

Signed-off-by: Rahil Shah rahil@ca.ibm.com

@r30shah
Copy link
Contributor Author

r30shah commented Oct 1, 2018

Thanks a lot @fjeremic for helping in identifying the issue. I have added gcOnResolve variation to Condy Primitive tests and also updated asm-7.0 Snapshot URL with fixing the bug. Can you please review the fix?

@@ -1816,7 +1819,8 @@ ZZ is address of resolved constant dynamic
ZZ into the Literal Pool
L_GPR r1,eq_literalPoolAddr_inDataSnippet(r14)
ST_GPR r2,0(,r1)

ZZ Restore All the registers
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment is unnecessary as this can be implied by the macro name.

@gacholio
Copy link
Contributor

gacholio commented Oct 1, 2018

Not sure the asm update belongs here.

@fjeremic
Copy link
Contributor

fjeremic commented Oct 1, 2018

Not sure the asm update belong here.

I think it's required for the tests to run. If you download OpenJ9 in its current state and run make compile to compile the tests you get the following:

--> file downloaded to /sandbox1/fjeremic/defects/3082/sdk/openj9/test/TestConfig/../TestConfig/lib/asm-all.jar
downloading https://repository.ow2.org/nexus/content/repositories/snapshots/org/ow2/asm/asm/7.0-beta-SNAPSHOT/asm-7.0-beta-20180918.180157-14.jar
ERROR: downloading https://repository.ow2.org/nexus/content/repositories/snapshots/org/ow2/asm/asm/7.0-beta-SNAPSHOT/asm-7.0-beta-20180918.180157-14.jar failed, return code: 2048
makefile:76: recipe for target 'getdependency' failed
make: *** [getdependency] Error 8

Edit:

@gacholio see #2995 for more info. I don't think we currently have an alternative as we need an asm.jar library which can generate condy bytecodes and currently there is no stable build to pick from.

@gacholio
Copy link
Contributor

gacholio commented Oct 1, 2018

OK - I despise outside dependencies, and this one seems especially fragile.

@fjeremic
Copy link
Contributor

fjeremic commented Oct 1, 2018

Jenkins test sanity zlinux JDK11

@fjeremic
Copy link
Contributor

fjeremic commented Oct 1, 2018

We won't be able to get this fix through because of a blocker introduced in #3060. I'll submit a fix shortly but I don't see this merging until tomorrow I guess.

@r30shah
Copy link
Contributor Author

r30shah commented Oct 1, 2018

Failing with this error :

17:49:24 /usr/bin/gcc-7 -DOPENJ9_BUILD -O3 -mtune=z10 -march=z9-109 -mzarch -fgnu89-inline -g -DLINUX -D_REENTRANT -D_FILE_OFFSET_BITS=64 -fPIC -DIPv6_FUNCTION_SUPPORT  -DS390 -D_LONG_LONG -DJ9VM_TIERED_CODE_CACHE -fno-strict-aliasing -DS39064 -Wimplicit -Wreturn-type -Werror -Wall -I. -I../../include -I../../oti -I../../zlib -I../../util -I../../gc_include -I../../omr/gc/include -I../../gc_glue_java -I../../j9vm -I../../shared_common/include -I../unix -I../crypto -I../filerms -I../filesys -I../common -I../inl -I../. -I../../nls -I../../omr/include_core  -DJ9VM_JCL_SE10  -DUT_DIRECT_TRACE_REGISTRATION -DTR_HOST_S390 -c -o mgmthypervisor.o ../common/mgmthypervisor.c
17:49:24 ../common/mgmtgc.c: In function ‘Java_com_ibm_lang_management_internal_ExtendedGarbageCollectorMXBeanImpl_getLastGcInfoImpl’:
17:49:24 ../common/mgmtgc.c:110:9: error: variable ‘stringClass’ set but not used [-Werror=unused-but-set-variable]
17:49:24   jclass stringClass = NULL;
17:49:24          ^~~~~~~~~~~
17:49:24 /usr/bin/gcc-7 -DOPENJ9_BUILD -O3 -mtune=z10 -march=z9-109 -mzarch -fgnu89-inline -g -DLINUX -D_REENTRANT -D_FILE_OFFSET_BITS=64 -fPIC -DIPv6_FUNCTION_SUPPORT  -DS390 -D_LONG_LONG -DJ9VM_TIERED_CODE_CACHE -fno-strict-aliasing -DS39064 -Wimplicit -Wreturn-type -Werror -Wall -I. -I../../include -I../../oti -I../../zlib -I../../util -I../../gc_include -I../../omr/gc/include -I../../gc_glue_java -I../../j9vm -I../../shared_common/include -I../unix -I../crypto -I../filerms -I../filesys -I../common -I../inl -I../. -I../../nls -I../../omr/include_core  -DJ9VM_JCL_SE10  -DUT_DIRECT_TRACE_REGISTRATION -DTR_HOST_S390 -c -o mgmtinit.o ../common/mgmtinit.c
17:49:24 cc1: all warnings being treated as errors
17:49:24 /usr/bin/gcc-7 -DOPENJ9_BUILD -O3 -mtune=z10 -march=z9-109 -mzarch -fgnu89-inline -g -DLINUX -D_REENTRANT -D_FILE_OFFSET_BITS=64 -fPIC -DIPv6_FUNCTION_SUPPORT  -DS390 -D_LONG_LONG -DJ9VM_TIERED_CODE_CACHE -fno-strict-aliasing -DS39064 -Wimplicit -Wreturn-type -Werror -Wall -I. -I../../include -I../../oti -I../../zlib -I../../util -I../../gc_include -I../../omr/gc/include -I../../gc_glue_java -I../../j9vm -I../../shared_common/include -I../unix -I../crypto -I../filerms -I../filesys -I../common -I../inl -I../. -I../../nls -I../../omr/include_core  -DJ9VM_JCL_SE10  -DUT_DIRECT_TRACE_REGISTRATION -DTR_HOST_S390 -c -o mgmtmemmgr.o ../common/mgmtmemmgr.c
17:49:24 ../../makelib/targets.mk:286: recipe for target 'mgmtgc.o' failed

Looks like changes in f162480#diff-fb760b6229b99d4b3e151c756ce8f033 not behaving well with the build (Build runs with -Werror)

When GC kicks in when constant dynamic object is resolved, VM helper
code expects all the registers are stored on Java Stack and while
resolving frames it takes this adjustment into account while building
frames. Condy Test was failing as it was not storing registers on Java
Stack producing corrupted stack frame.

Fixes: eclipse-openj9#3082

Signed-off-by: Rahil Shah <rahil@ca.ibm.com>
Signed-off-by: Rahil Shah <rahil@ca.ibm.com>
@fjeremic
Copy link
Contributor

fjeremic commented Oct 1, 2018

Fix got merged in #3090. Kicking builds off again:

Jenkins test sanity zlinux JDK11

@fjeremic
Copy link
Contributor

fjeremic commented Oct 1, 2018

Jenkins test sanity zlinux JDK11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test-sanity.functional-JDK11-linux_390-64_cmprssptrs CondyPrimitive_2 Invalid JIT return address
3 participants