Skip to content

ConcurrentModificationException in DefaultStateMachineExecutor #736

Closed
@YusufKizilay

Description

@YusufKizilay

Hi,

I am observing following exception from state machine on our production environment.
After that exception, state machine is stuck and never process subsequent request.

java.util.ConcurrentModificationException
at java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:966)
at java.util.LinkedList$ListItr.next(LinkedList.java:888)
at org.springframework.statemachine.support.DefaultStateMachineExecutor.processDeferList(DefaultStateMachineExecutor.java:406)
at org.springframework.statemachine.support.DefaultStateMachineExecutor.access$200(DefaultStateMachineExecutor.java:61)
at org.springframework.statemachine.support.DefaultStateMachineExecutor$1.run(DefaultStateMachineExecutor.java:274)
at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:50)
at org.springframework.statemachine.support.DefaultStateMachineExecutor.scheduleEventQueueProcessing(DefaultStateMachineExecutor.java:292)
at org.springframework.statemachine.support.DefaultStateMachineExecutor.execute(DefaultStateMachineExecutor.java:142)
at org.springframework.statemachine.support.AbstractStateMachine.sendEvent(AbstractStateMachine.java:232)

To reproduce same exception on my local environment , i am sending 1000 concurrent event to same state machine instance and same exception occurs and state machine is stuck. Right now, our production environment does not have a heavy load so i don't think 1000 or much more concurrent access cause our problem.

We are triggerring every event as a defer event which triggers actual event. Can someone help to investigate it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions