Open ymyfrank opened 6 years ago
Could you show what kind of spel expressions you're using. Obviously a bug somewhere but difficult to say if it's something causde by your spel or how we integrate to spel or something how spring core handles it.
Yeah, what you said is quite right. I attached the model.uml(1 main state machine and 4 sub state machine) here, in which there are lots of SPELs, and I dont know which one caused the exception (during stress/performance test). The interesting point is: when no stress test, only run one instance of state machine, no exception, and even break point can not stop running for debug [on org.springframework.asm.Frame.merge(Frame.java:1447)]
Please refer #477 #478 #490 , which might provide clue.
model.zip
I use Papyrus neo to design state machine definition. model.uml is attached here (same as my next comment) The language used: SPEL springStateMachineVersion = '1.2.7.RELEASE' The following exception was found during performance test:
2018_Feb_28_00:24:14 || Action execution resulted error java.lang.NegativeArraySizeException: null at org.springframework.asm.Frame.merge(Frame.java:1447) ~[spring-core-4.3.9.RELEASE.jar:4.3.9.RELEASE] at org.springframework.asm.MethodWriter.visitMaxs(MethodWriter.java:1516) ~[spring-core-4.3.9.RELEASE.jar:4.3.9.RELEASE] at org.springframework.expression.spel.standard.SpelCompiler.createExpressionClass(SpelCompiler.java:176) ~[spring-expression-4.3.9.RELEASE.jar:4.3.9.RELEASE] at org.springframework.expression.spel.standard.SpelCompiler.compile(SpelCompiler.java:105) ~[spring-expression-4.3.9.RELEASE.jar:4.3.9.RELEASE] at org.springframework.expression.spel.standard.SpelExpression.compileExpression(SpelExpression.java:467) ~[spring-expression-4.3.9.RELEASE.jar:4.3.9.RELEASE] at org.springframework.expression.spel.standard.SpelExpression.checkCompile(SpelExpression.java:443) ~[spring-expression-4.3.9.RELEASE.jar:4.3.9.RELEASE] at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:331) ~[spring-expression-4.3.9.RELEASE.jar:4.3.9.RELEASE] at org.springframework.statemachine.support.StateContextExpressionMethods.getValue(StateContextExpressionMethods.java:57) ~[spring-statemachine-core-1.2.7.RELEASE.jar:1.2.7.RELEASE] at org.springframework.statemachine.action.SpelExpressionAction.execute(SpelExpressionAction.java:49) ~[spring-statemachine-core-1.2.7.RELEASE.jar:1.2.7.RELEASE] at org.springframework.statemachine.state.AbstractState.executeAction(AbstractState.java:392) ~[spring-statemachine-core-1.2.7.RELEASE.jar:1.2.7.RELEASE] at org.springframework.statemachine.state.ObjectState.entry(ObjectState.java:159) ~[spring-statemachine-core-1.2.7.RELEASE.jar:1.2.7.RELEASE] at org.springframework.statemachine.support.AbstractStateMachine.entryToState(AbstractStateMachine.java:1216) ~[spring-statemachine-core-1.2.7.RELEASE.jar:1.2.7.RELEASE] at org.springframework.statemachine.support.AbstractStateMachine.entryToState(AbstractStateMachine.java:1161) ~[spring-statemachine-core-1.2.7.RELEASE.jar:1.2.7.RELEASE] at org.springframework.statemachine.support.AbstractStateMachine.setCurrentStateInternal(AbstractStateMachine.java:971) ~[spring-statemachine-core-1.2.7.RELEASE.jar:1.2.7.RELEASE] at org.springframework.statemachine.support.AbstractStateMachine.setCurrentState(AbstractStateMachine.java:949) ~[spring-statemachine-core-1.2.7.RELEASE.jar:1.2.7.RELEASE] at org.springframework.statemachine.support.AbstractStateMachine.setCurrentState(AbstractStateMachine.java:944) ~[spring-statemachine-core-1.2.7.RELEASE.jar:1.2.7.RELEASE] at org.springframework.statemachine.support.AbstractStateMachine.setCurrentStateInternal(AbstractStateMachine.java:1038) ~[spring-statemachine-core-1.2.7.RELEASE.jar:1.2.7.RELEASE] at org.springframework.statemachine.support.AbstractStateMachine.setCurrentState(AbstractStateMachine.java:949) ~[spring-statemachine-core-1.2.7.RELEASE.jar:1.2.7.RELEASE] at org.springframework.statemachine.support.AbstractStateMachine.switchToState(AbstractStateMachine.java:841) ~[spring-statemachine-core-1.2.7.RELEASE.jar:1.2.7.RELEASE] at org.springframework.statemachine.support.AbstractStateMachine.access$400(AbstractStateMachine.java:77) ~[spring-statemachine-core-1.2.7.RELEASE.jar:1.2.7.RELEASE] at org.springframework.statemachine.support.AbstractStateMachine$2.transit(AbstractStateMachine.java:301) ~[spring-statemachine-core-1.2.7.RELEASE.jar:1.2.7.RELEASE] at org.springframework.statemachine.support.DefaultStateMachineExecutor.handleTriggerTrans(DefaultStateMachineExecutor.java:251) ~[spring-statemachine-core-1.2.7.RELEASE.jar:1.2.7.RELEASE] at org.springframework.statemachine.support.DefaultStateMachineExecutor.processTriggerQueue(DefaultStateMachineExecutor.java:404) ~[spring-statemachine-core-1.2.7.RELEASE.jar:1.2.7.RELEASE] at org.springframework.statemachine.support.DefaultStateMachineExecutor.access$100(DefaultStateMachineExecutor.java:61) ~[spring-statemachine-core-1.2.7.RELEASE.jar:1.2.7.RELEASE] at org.springframework.statemachine.support.DefaultStateMachineExecutor$1.run(DefaultStateMachineExecutor.java:284) ~[spring-statemachine-core-1.2.7.RELEASE.jar:1.2.7.RELEASE] at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:50) ~[spring-core-4.3.9.RELEASE.jar:4.3.9.RELEASE] at org.springframework.statemachine.support.DefaultStateMachineExecutor.scheduleEventQueueProcessing(DefaultStateMachineExecutor.java:309) ~[spring-statemachine-core-1.2.7.RELEASE.jar:1.2.7.RELEASE] at org.springframework.statemachine.support.DefaultStateMachineExecutor.execute(DefaultStateMachineExecutor.java:147) ~[spring-statemachine-core-1.2.7.RELEASE.jar:1.2.7.RELEASE] at org.springframework.statemachine.support.AbstractStateMachine.sendEventInternal(AbstractStateMachine.java:559) ~[spring-statemachine-core-1.2.7.RELEASE.jar:1.2.7.RELEASE] at org.springframework.statemachine.support.AbstractStateMachine.sendEvent(AbstractStateMachine.java:211) ~[spring-statemachine-core-1.2.7.RELEASE.jar:1.2.7.RELEASE] at org.springframework.statemachine.support.AbstractStateMachine.sendEvent(AbstractStateMachine.java:223) ~[spring-statemachine-core-1.2.7.RELEASE.jar:1.2.7.RELEASE] at com.qualcomm.qti.qdma.controller.services.ControllerService.processRequest(ControllerService.java:193) ~[controller.jar:?] at sun.reflect.GeneratedMethodAccessor23.invoke(Unknown Source) ~[?:?] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_131] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_131] at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHandlerFactory.java:76) ~[jersey-server-2.26.jar:?] at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:148) [jersey-server-2.26.jar:?] at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:191) [jersey-server-2.26.jar:?] at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$TypeOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:243) [jersey-server-2.26.jar:?] at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:103) [jersey-server-2.26.jar:?] at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:493) [jersey-server-2.26.jar:?] at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:415) [jersey-server-2.26.jar:?] at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:104) [jersey-server-2.26.jar:?] at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:277) [jersey-server-2.26.jar:?] at org.glassfish.jersey.internal.Errors$1.call(Errors.java:272) [jersey-common-2.26.jar:?] at org.glassfish.jersey.internal.Errors$1.call(Errors.java:268) [jersey-common-2.26.jar:?] at org.glassfish.jersey.internal.Errors.process(Errors.java:316) [jersey-common-2.26.jar:?] at org.glassfish.jersey.internal.Errors.process(Errors.java:298) [jersey-common-2.26.jar:?] at org.glassfish.jersey.internal.Errors.process(Errors.java:268) [jersey-common-2.26.jar:?] at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:289) [jersey-common-2.26.jar:?] at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:256) [jersey-server-2.26.jar:?] at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:703) [jersey-server-2.26.jar:?] at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:416) [jersey-container-servlet-core-2.26.jar:?] at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:370) [jersey-container-servlet-core-2.26.jar:?] at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:389) [jersey-container-servlet-core-2.26.jar:?] at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:342) [jersey-container-servlet-core-2.26.jar:?] at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:229) [jersey-container-servlet-core-2.26.jar:?] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) [catalina.jar:8.5.23] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:8.5.23] at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat-websocket.jar:8.5.23] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:8.5.23]