[lworld+vector] RFR: 8311610: [lworld+vector] Clean-up of vector allocation in class VectorSupport [v2]
Xiaohong Gong
xgong at openjdk.org
Mon Jul 10 03:26:16 UTC 2023
On Mon, 10 Jul 2023 03:12:44 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:
> > > > Besides the vector api regressions, I met lots of crashes due to nullptr of the payload field. It looks like being caused by deoptmization as well, where the payload field is not allocated I guess. With the change in this PR, the crash cases increased. Do you have any idea about this?
> > >
> > >
> > > Can you try integrating #884 locally and check if it resolves the crashes.
> >
> >
> > Thanks for the patch! I tested with it, but unfortunatelly, the crash is still there. I will look at this issue today. Thanks!
>
> > > > Besides the vector api regressions, I met lots of crashes due to nullptr of the payload field. It looks like being caused by deoptmization as well, where the payload field is not allocated I guess. With the change in this PR, the crash cases increased. Do you have any idea about this?
> > >
> > >
> > > Can you try integrating #884 locally and check if it resolves the crashes.
> >
> >
> > Thanks for the patch! I tested with it, but unfortunatelly, the crash is still there. I will look at this issue today. Thanks!
>
> Are you referring to following assertion failures which are seen without -Xshare:off
>
> ```
> test Float256VectorTests.unsliceUnaryFloat256VectorTests(float[-i * 5]): failure
> java.lang.NoClassDefFoundError: Could not initialize class jdk.internal.vm.vector.VectorSupport$VectorPayloadMF256F
> at java.base/jdk.internal.vm.vector.VectorSupport$VectorPayloadMF.newInstanceFactory(VectorSupport.java:220)
> at jdk.incubator.vector/jdk.incubator.vector.AbstractSpecies.makeDummyVectorMF(AbstractSpecies.java:369)
> at jdk.incubator.vector/jdk.incubator.vector.AbstractSpecies.dummyVectorMF(AbstractSpecies.java:327)
> at jdk.incubator.vector/jdk.incubator.vector.FloatVector$FloatSpecies.dummyVectorMF(FloatVector.java:3859)
> at jdk.incubator.vector/jdk.incubator.vector.FloatVector.fromArray(FloatVector.java:2894)
> at Float256VectorTests.unsliceUnaryFloat256VectorTests(Float256VectorTests.java:3633)
> at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
> at java.base/java.lang.reflect.Method.invoke(Method.java:580)
> at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:132)
> at org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:599)
> at org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:174)
> at org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:46)
> ```
I didn't see this failure without `-Xshare:off` on NEON. You could also reproduce the crash with "-XX:-EnableVectorSupport" when run a jtreg that the hardware doesn't support the vectorization for it. For example, maybe running the 512 species tests with "-XX:UseAVX=2". The crash I met looks like the null point for payload instance. Here is the log:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x0000ffffa8c47860, pid=263319, tid=263339
#
# JRE version: OpenJDK Runtime Environment (21.0) (fastdebug build 21-internal-git-7aa742799)
# Java VM: OpenJDK 64-Bit Server VM (fastdebug 21-internal-git-7aa742799, mixed mode, sharing, compressed oops, compressed class ptrs, g1 gc, linux-aarch64)
# Problematic frame:
# j jdk.incubator.vector.FloatVector.uOpTemplateMF(Ljdk/incubator/vector/VectorMask;Ljdk/incubator/vector/FloatVector$FUnOp;)Ljdk/incubator/vector/FloatVector;+11 jdk.incubator.vector at 21-internal
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport -p%p -s%s -c%c -d%d -P%P -u%u -g%g -- %E" (or dumping to /mnt/local/code/jtreg/jtreg-git/build/images/jtreg/jtwork/scratch/0/core.263319)
#
# If you would like to submit a bug report, please visit:
# https://bugreport.java.com/bugreport/crash.jsp
#
-------------
PR Comment: https://git.openjdk.org/valhalla/pull/882#issuecomment-1628035476
More information about the valhalla-dev
mailing list