ballerina-platform / ballerina-lang

The Ballerina Programming Language
https://ballerina.io/
Apache License 2.0
3.68k stars 752 forks source link

[Bug]: Some tests in current lang build seem to not work correctly #40288

Open lochana-chathura opened 1 year ago

lochana-chathura commented 1 year ago

Description

$subject. The tests that are giving a crash log are as follows.

  1. ballerina-compiler-plugin-test-suite > ballerina-lang-test-suite > io.ballerina.test.compiler.plugins.CompilerPluginTest
    stacktrace (click to expand)
    [2023-04-18 09:24:37,800] SEVERE {b7a.log.crash} - null 
    java.lang.IndexOutOfBoundsException
        at io.ballerina.test.compiler.plugins.CrashTestCompilerPlugin.process(CrashTestCompilerPlugin.java:50)
        at org.wso2.ballerinalang.compiler.semantics.analyzer.CompilerPluginRunner.lambda$visit$3(CompilerPluginRunner.java:203)
        at org.wso2.ballerinalang.compiler.semantics.analyzer.CompilerPluginRunner.notifyProcessors(CompilerPluginRunner.java:349)
        at org.wso2.ballerinalang.compiler.semantics.analyzer.CompilerPluginRunner.visit(CompilerPluginRunner.java:203)
        at org.wso2.ballerinalang.compiler.tree.BLangFunction.accept(BLangFunction.java:76)
        at org.wso2.ballerinalang.compiler.semantics.analyzer.CompilerPluginRunner.visit(CompilerPluginRunner.java:154)
        at org.wso2.ballerinalang.compiler.tree.BLangPackage.accept(BLangPackage.java:167)
        at org.wso2.ballerinalang.compiler.semantics.analyzer.CompilerPluginRunner.runPlugins(CompilerPluginRunner.java:137)
        at io.ballerina.projects.internal.CompilerPhaseRunner.annotationProcess(CompilerPhaseRunner.java:212)
        at io.ballerina.projects.internal.CompilerPhaseRunner.performTypeCheckPhases(CompilerPhaseRunner.java:144)
        at io.ballerina.projects.ModuleContext.compileInternal(ModuleContext.java:432)
        at io.ballerina.projects.ModuleCompilationState$1.compile(ModuleCompilationState.java:45)
        at io.ballerina.projects.ModuleContext.compile(ModuleContext.java:381)
        at io.ballerina.projects.PackageCompilation.compileModulesInternal(PackageCompilation.java:203)
        at io.ballerina.projects.PackageCompilation.compileModules(PackageCompilation.java:187)
        at io.ballerina.projects.PackageCompilation.compile(PackageCompilation.java:99)
        at io.ballerina.projects.PackageCompilation.from(PackageCompilation.java:94)
        at io.ballerina.projects.PackageContext.getPackageCompilation(PackageContext.java:214)
        at io.ballerina.projects.Package.getCompilation(Package.java:144)
        at org.ballerinalang.test.BCompileUtil.jBallerinaBackend(BCompileUtil.java:208)
        at org.ballerinalang.test.BCompileUtil.compile(BCompileUtil.java:92)
        at io.ballerina.test.compiler.plugins.CompilerPluginTest.setup(CompilerPluginTest.java:44)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124)
        at org.testng.internal.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:59)
        at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:458)
        at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:222)
        at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:142)
        at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:168)
        at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:105)
        at org.testng.TestRunner.privateRun(TestRunner.java:648)
        at org.testng.TestRunner.run(TestRunner.java:505)
        at org.testng.SuiteRunner.runTest(SuiteRunner.java:455)
        at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:450)
        at org.testng.SuiteRunner.privateRun(SuiteRunner.java:415)
        at org.testng.SuiteRunner.run(SuiteRunner.java:364)
        at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
        at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:84)
        at org.testng.TestNG.runSuitesSequentially(TestNG.java:1208)
        at org.testng.TestNG.runSuitesLocally(TestNG.java:1137)
        at org.testng.TestNG.runSuites(TestNG.java:1049)
        at org.testng.TestNG.run(TestNG.java:1017)
        at org.gradle.api.internal.tasks.testing.testng.TestNGTestClassProcessor.runTests(TestNGTestClassProcessor.java:141)
        at org.gradle.api.internal.tasks.testing.testng.TestNGTestClassProcessor.stop(TestNGTestClassProcessor.java:90)
        at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.stop(SuiteTestClassProcessor.java:61)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
        at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
        at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32)
        at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
        at com.sun.proxy.$Proxy5.stop(Unknown Source)
        at org.gradle.api.internal.tasks.testing.worker.TestWorker.stop(TestWorker.java:132)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
        at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
        at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:175)
        at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:157)
        at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:404)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
        at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
        at java.base/java.lang.Thread.run(Thread.java:829)

  1. ballerina-new-parser-test-suite > jballerina-test > org.ballerinalang.test.expressions.binaryoperations.BinaryBitwiseOperationTest > testBinaryBitWiseOrOperationForUserDefinedTypes
stacktrace (click to expand) ``` testBinaryBitWiseOrOperationForUserDefinedTypes STANDARD_ERROR java.lang.instrument.IllegalClassFormatException: Error while instrumenting binary_bitwise_operation. at org.jacoco.agent.rt.internal_1f1cc91.CoverageTransformer.transform(CoverageTransformer.java:93) at java.instrument/java.lang.instrument.ClassFileTransformer.transform(ClassFileTransformer.java:246) at java.instrument/sun.instrument.TransformerManager.transform(TransformerManager.java:188) at java.instrument/sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:563) at java.base/java.lang.ClassLoader.defineClass1(Native Method) at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017) at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174) at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:555) at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:458) at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:452) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:451) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) at org.ballerinalang.test.BRunUtil.invoke(BRunUtil.java:175) at org.ballerinalang.test.BRunUtil.invokeOnJBallerina(BRunUtil.java:148) at org.ballerinalang.test.BRunUtil.invoke(BRunUtil.java:87) at org.ballerinalang.test.BRunUtil.invoke(BRunUtil.java:269) at org.ballerinalang.test.expressions.binaryoperations.BinaryBitwiseOperationTest.testBinaryBitWiseOrOperationForUserDefinedTypes(BinaryBitwiseOperationTest.java:64) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124) at org.testng.internal.Invoker.invokeMethod(Invoker.java:583) at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:719) at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:989) at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125) at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109) at org.testng.TestRunner.privateRun(TestRunner.java:648) at org.testng.TestRunner.run(TestRunner.java:505) at org.testng.SuiteRunner.runTest(SuiteRunner.java:455) at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:450) at org.testng.SuiteRunner.privateRun(SuiteRunner.java:415) at org.testng.SuiteRunner.run(SuiteRunner.java:364) at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:84) at org.testng.TestNG.runSuitesSequentially(TestNG.java:1208) at org.testng.TestNG.runSuitesLocally(TestNG.java:1137) at org.testng.TestNG.runSuites(TestNG.java:1049) at org.testng.TestNG.run(TestNG.java:1017) at org.gradle.api.internal.tasks.testing.testng.TestNGTestClassProcessor.runTests(TestNGTestClassProcessor.java:141) at org.gradle.api.internal.tasks.testing.testng.TestNGTestClassProcessor.stop(TestNGTestClassProcessor.java:90) at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.stop(SuiteTestClassProcessor.java:61) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35) at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24) at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32) at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93) at com.sun.proxy.$Proxy5.stop(Unknown Source) at org.gradle.api.internal.tasks.testing.worker.TestWorker.stop(TestWorker.java:132) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35) at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24) at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:175) at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:157) at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:404) at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63) at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55) at java.base/java.lang.Thread.run(Thread.java:829) Caused by: java.io.IOException: Error while instrumenting binary_bitwise_operation. at org.jacoco.agent.rt.internal_1f1cc91.core.instr.Instrumenter.instrumentError(Instrumenter.java:170) at org.jacoco.agent.rt.internal_1f1cc91.core.instr.Instrumenter.instrument(Instrumenter.java:120) at org.jacoco.agent.rt.internal_1f1cc91.CoverageTransformer.transform(CoverageTransformer.java:91) ... 68 more Caused by: org.jacoco.agent.rt.internal_1f1cc91.asm.MethodTooLargeException: Method too large: binary_bitwise_operation.testBinaryBitwiseOperationsForNullable (Lio/ballerina/runtime/internal/scheduling/Strand;)Ljava/lang/Object; at org.jacoco.agent.rt.internal_1f1cc91.asm.MethodWriter.computeMethodInfoSize(MethodWriter.java:2089) at org.jacoco.agent.rt.internal_1f1cc91.asm.ClassWriter.toByteArray(ClassWriter.java:458) at org.jacoco.agent.rt.internal_1f1cc91.asm.ClassWriter.replaceAsmInstructions(ClassWriter.java:696) at org.jacoco.agent.rt.internal_1f1cc91.asm.ClassWriter.toByteArray(ClassWriter.java:659) at org.jacoco.agent.rt.internal_1f1cc91.core.instr.Instrumenter.instrument(Instrumenter.java:101) at org.jacoco.agent.rt.internal_1f1cc91.core.instr.Instrumenter.instrument(Instrumenter.java:118) ... 69 more ```
  1. ballerina-new-parser-test-suite > jballerina-test > org.ballerinalang.test.jvm.CodegenErrorsTest > testTooLargeMethodWithMultipleCheckedExpression
stacktrace (click to expand) ``` java.lang.instrument.IllegalClassFormatException: Error while instrumenting $value$$anonType$_1. at org.jacoco.agent.rt.internal_1f1cc91.CoverageTransformer.transform(CoverageTransformer.java:93) at java.instrument/java.lang.instrument.ClassFileTransformer.transform(ClassFileTransformer.java:246) at java.instrument/sun.instrument.TransformerManager.transform(TransformerManager.java:188) at java.instrument/sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:563) at java.base/java.lang.ClassLoader.defineClass1(Native Method) at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017) at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174) at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:555) at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:458) at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:452) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:451) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) at $$$.$gen$$0046$0046$0060init$00620(.:17) at $_init.$gen$$0046$0060init$0062(.:1) at $_init.$moduleInit(.) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.ballerinalang.test.BRunUtil.lambda$runOnSchedule$4(BRunUtil.java:381) at io.ballerina.runtime.internal.scheduling.SchedulerItem.execute(SchedulerItem.java:54) at io.ballerina.runtime.internal.scheduling.Scheduler.run(Scheduler.java:306) at io.ballerina.runtime.internal.scheduling.Scheduler.runSafely(Scheduler.java:273) at java.base/java.lang.Thread.run(Thread.java:829) Caused by: java.io.IOException: Error while instrumenting $value$$anonType$_1. at org.jacoco.agent.rt.internal_1f1cc91.core.instr.Instrumenter.instrumentError(Instrumenter.java:170) at org.jacoco.agent.rt.internal_1f1cc91.core.instr.Instrumenter.instrument(Instrumenter.java:120) at org.jacoco.agent.rt.internal_1f1cc91.CoverageTransformer.transform(CoverageTransformer.java:91) ... 25 more Caused by: org.jacoco.agent.rt.internal_1f1cc91.asm.MethodTooLargeException: Method too large: $value$$anonType$_1.$get$TestRequest (Lio/ballerina/runtime/internal/scheduling/Strand;Lio/ballerina/runtime/api/values/BObject;)Ljava/lang/Object; at org.jacoco.agent.rt.internal_1f1cc91.asm.MethodWriter.computeMethodInfoSize(MethodWriter.java:2089) at org.jacoco.agent.rt.internal_1f1cc91.asm.ClassWriter.toByteArray(ClassWriter.java:458) at org.jacoco.agent.rt.internal_1f1cc91.core.instr.Instrumenter.instrument(Instrumenter.java:101) at org.jacoco.agent.rt.internal_1f1cc91.core.instr.Instrumenter.instrument(Instrumenter.java:118) ... 26 more ```
  1. ballerina-new-parser-test-suite > jballerina-test > org.ballerinalang.test.jvm.CodegenErrorsTest > testTooLargeProject
stacktrace (click to expand) ``` java.lang.instrument.IllegalClassFormatException: Error while instrumenting wso2/largePackage$0046records/0/$value$BigRecord3. at org.jacoco.agent.rt.internal_1f1cc91.CoverageTransformer.transform(CoverageTransformer.java:93) at java.instrument/java.lang.instrument.ClassFileTransformer.transform(ClassFileTransformer.java:246) at java.instrument/sun.instrument.TransformerManager.transform(TransformerManager.java:188) at java.instrument/sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:563) at java.base/java.lang.ClassLoader.defineClass1(Native Method) at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017) at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174) at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:555) at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:458) at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:452) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:451) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) at wso2.largePackage$0046records.0.$typedesc$BigRecord3.instantiate(bigRecord3.bal) at wso2.largePackage.0.main.main(main.bal:41) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.ballerinalang.test.BRunUtil.lambda$invoke$0(BRunUtil.java:179) at io.ballerina.runtime.internal.scheduling.SchedulerItem.execute(SchedulerItem.java:54) at io.ballerina.runtime.internal.scheduling.Scheduler.run(Scheduler.java:306) at io.ballerina.runtime.internal.scheduling.Scheduler.runSafely(Scheduler.java:273) at java.base/java.lang.Thread.run(Thread.java:829) Caused by: java.io.IOException: Error while instrumenting wso2/largePackage$0046records/0/$value$BigRecord3. at org.jacoco.agent.rt.internal_1f1cc91.core.instr.Instrumenter.instrumentError(Instrumenter.java:170) at org.jacoco.agent.rt.internal_1f1cc91.core.instr.Instrumenter.instrument(Instrumenter.java:120) at org.jacoco.agent.rt.internal_1f1cc91.CoverageTransformer.transform(CoverageTransformer.java:91) ... 24 more Caused by: org.jacoco.agent.rt.internal_1f1cc91.asm.MethodTooLargeException: Method too large: wso2/largePackage$0046records/0/$value$BigRecord3.BigRecord3$gen$$0046$0060init$0062 (Lio/ballerina/runtime/internal/scheduling/Strand;Lio/ballerina/runtime/internal/values/MapValue;)Ljava/lang/Object; at org.jacoco.agent.rt.internal_1f1cc91.asm.MethodWriter.computeMethodInfoSize(MethodWriter.java:2089) at org.jacoco.agent.rt.internal_1f1cc91.asm.ClassWriter.toByteArray(ClassWriter.java:458) at org.jacoco.agent.rt.internal_1f1cc91.core.instr.Instrumenter.instrument(Instrumenter.java:101) at org.jacoco.agent.rt.internal_1f1cc91.core.instr.Instrumenter.instrument(Instrumenter.java:118) ... 25 more java.lang.instrument.IllegalClassFormatException: Error while instrumenting wso2/largePackage$0046arrays/0/arrays. at org.jacoco.agent.rt.internal_1f1cc91.CoverageTransformer.transform(CoverageTransformer.java:93) at java.instrument/java.lang.instrument.ClassFileTransformer.transform(ClassFileTransformer.java:246) at java.instrument/sun.instrument.TransformerManager.transform(TransformerManager.java:188) at java.instrument/sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:563) at java.base/java.lang.ClassLoader.defineClass1(Native Method) at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017) at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174) at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:555) at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:458) at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:452) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:451) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) at wso2.largePackage.0.main.main(main.bal:54) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.ballerinalang.test.BRunUtil.lambda$invoke$0(BRunUtil.java:179) at io.ballerina.runtime.internal.scheduling.SchedulerItem.execute(SchedulerItem.java:54) at io.ballerina.runtime.internal.scheduling.Scheduler.run(Scheduler.java:306) at io.ballerina.runtime.internal.scheduling.Scheduler.runSafely(Scheduler.java:273) at java.base/java.lang.Thread.run(Thread.java:829) Caused by: java.io.IOException: Error while instrumenting wso2/largePackage$0046arrays/0/arrays. at org.jacoco.agent.rt.internal_1f1cc91.core.instr.Instrumenter.instrumentError(Instrumenter.java:170) at org.jacoco.agent.rt.internal_1f1cc91.core.instr.Instrumenter.instrument(Instrumenter.java:120) at org.jacoco.agent.rt.internal_1f1cc91.CoverageTransformer.transform(CoverageTransformer.java:91) ... 23 more Caused by: org.jacoco.agent.rt.internal_1f1cc91.asm.MethodTooLargeException: Method too large: wso2/largePackage$0046arrays/0/arrays.testArrays (Lio/ballerina/runtime/internal/scheduling/Strand;)Z at org.jacoco.agent.rt.internal_1f1cc91.asm.MethodWriter.computeMethodInfoSize(MethodWriter.java:2089) at org.jacoco.agent.rt.internal_1f1cc91.asm.ClassWriter.toByteArray(ClassWriter.java:458) at org.jacoco.agent.rt.internal_1f1cc91.core.instr.Instrumenter.instrument(Instrumenter.java:101) at org.jacoco.agent.rt.internal_1f1cc91.core.instr.Instrumenter.instrument(Instrumenter.java:118) ... 24 more ```
  1. ballerina-new-parser-test-suite > jballerina-test > org.ballerinalang.test.javainterop.basic.StaticMethodTest > testInvokeFunctions[14] (testJavaNullPointerException)
stacktrace (click to expand) ``` [2023-04-21 23:43:32,019] SEVERE {b7a.log.crash} - null java.lang.NullPointerException at org.ballerinalang.nativeimpl.jvm.tests.StaticMethods.throwNPE(StaticMethods.java:94) at static_method_tests.throwNPE(static_method_tests.bal:190) at static_method_tests.$lambda$_0(static_method_tests.bal:53) at static_method_tests.$lambda$_0$lambda3$(static_method_tests.bal:52) at io.ballerina.runtime.internal.scheduling.SchedulerItem.execute(SchedulerItem.java:54) at io.ballerina.runtime.internal.scheduling.Scheduler.run(Scheduler.java:306) at io.ballerina.runtime.internal.scheduling.Scheduler.runSafely(Scheduler.java:273) at java.base/java.lang.Thread.run(Thread.java:829) ```

Steps to Reproduce

Can reproduce running each test locally.

Affected Version(s)

Current master

lochana-chathura commented 1 year ago

I guess 5 log is expected as per the test case name testJavaNullPointerException. I'm not sure whether 3 and 4 logs are intended. However, I feel log 1 and 2 are definitely not supposed to give a crash log.