Potential Deadlock: Any suggestions

Caused By: io.temporal.internal.sync.PotentialDeadlockException: Potential deadlock detected: workflow thread "workflow-method" didn't yield control for over a second. Other workflow threads:

java.lang.RuntimeException: LocalActivity: failure executing MARKER_COMMAND_CREATED->RECORD_MARKER, transition history is [CREATED->CHECK_EXECUTION_STATE, EXECUTING->SCHEDULE, REQUEST_PREPARED->MARK_AS_SENT, REQUEST_SENT->HANDLE_RESULT]
io.temporal.internal.statemachines.StateMachine.executeTransition(StateMachine.java:140)
io.temporal.internal.statemachines.StateMachine.handleCommand(StateMachine.java:101)
io.temporal.internal.statemachines.EntityStateMachineBase.handleCommand(EntityStateMachineBase.java:51)
io.temporal.internal.statemachines.CancellableCommand.handleCommand(CancellableCommand.java:63)
io.temporal.internal.statemachines.WorkflowStateMachines.prepareImpl(WorkflowStateMachines.java:339)
io.temporal.internal.statemachines.WorkflowStateMachines.prepareCommands(WorkflowStateMachines.java:322)
io.temporal.internal.statemachines.WorkflowStateMachines.handleLocalActivityCompletion(WorkflowStateMachines.java:691)
io.temporal.internal.replay.ReplayWorkflowRunTaskHandler.waitAndProcessLocalActivityCompletion(ReplayWorkflowRunTaskHandler.java:316)
io.temporal.internal.replay.ReplayWorkflowRunTaskHandler.processLocalActivityRequests(ReplayWorkflowRunTaskHandler.java:292)
io.temporal.internal.replay.ReplayWorkflowRunTaskHandler.handleWorkflowTask(ReplayWorkflowRunTaskHandler.java:151)
io.temporal.internal.replay.ReplayWorkflowTaskHandler.handleWorkflowTaskWithEmbeddedQuery(ReplayWorkflowTaskHandler.java:201)
io.temporal.internal.replay.ReplayWorkflowTaskHandler.handleWorkflowTask(ReplayWorkflowTaskHandler.java:114)
io.temporal.internal.worker.WorkflowWorker$TaskHandlerImpl.handle(WorkflowWorker.java:319)
io.temporal.internal.worker.WorkflowWorker$TaskHandlerImpl.handle(WorkflowWorker.java:279)
io.temporal.internal.worker.PollTaskExecutor.lambda$process$0(PollTaskExecutor.java:73)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
java.lang.Thread.run(Thread.java:748)

Caused By: io.temporal.internal.sync.PotentialDeadlockException: Potential deadlock detected: workflow thread “workflow-method” didn’t yield control for over a second. Other workflow threads:

org.codehaus.jackson.impl.WriterBasedGenerator._writeSegment(WriterBasedGenerator.java:1112)
org.codehaus.jackson.impl.WriterBasedGenerator._writeLongString(WriterBasedGenerator.java:1061)
org.codehaus.jackson.impl.WriterBasedGenerator._writeString(WriterBasedGenerator.java:980)
org.codehaus.jackson.impl.WriterBasedGenerator.writeString(WriterBasedGenerator.java:448)
org.codehaus.jackson.map.ser.std.StringSerializer.serialize(StringSerializer.java:28)
org.codehaus.jackson.map.ser.std.StringSerializer.serialize(StringSerializer.java:18)
org.codehaus.jackson.map.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:446)
org.codehaus.jackson.map.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:150)
org.codehaus.jackson.map.ser.BeanSerializer.serialize(BeanSerializer.java:112)
org.codehaus.jackson.map.ser.StdSerializerProvider._serializeValue(StdSerializerProvider.java:610)
org.codehaus.jackson.map.ser.StdSerializerProvider.serializeValue(StdSerializerProvider.java:256)
org.codehaus.jackson.map.ObjectMapper._configAndWriteValue(ObjectMapper.java:2575)
org.codehaus.jackson.map.ObjectMapper.writeValueAsString(ObjectMapper.java:2097)
com.test.services.common.util.JsonUtil.convertToString(JsonUtil.java:80)
com.test.itemingestion.util.CommonUtils.getJsonString(CommonUtils.java:144)
com.test.itemingestion.workflow.FeedProcessorCommon.lambda$process$0(FeedProcessorCommon.java:132)
com.test.itemingestion.workflow.FeedProcessorCommon$$Lambda$1036/1511833369.accept(Unknown Source)
java.util.ArrayList.forEach(ArrayList.java:1259)
com.test.itemingestion.workflow.FeedProcessorCommon.process(FeedProcessorCommon.java:106)
com.test.itemingestion.workflow.FeedIngestionWorkflowImpl.execute(FeedIngestionWorkflowImpl.java:71)
sun.reflect.GeneratedMethodAccessor975.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:498)
io.temporal.internal.sync.POJOWorkflowImplementationFactory$POJOWorkflowImplementation$RootWorkflowInboundCallsInterceptor.execute(POJOWorkflowImplementationFactory.java:329)
io.temporal.internal.sync.POJOWorkflowImplementationFactory$POJOWorkflowImplementation.execute(POJOWorkflowImplementationFactory.java:287)
io.temporal.internal.sync.WorkflowExecuteRunnable.run(WorkflowExecuteRunnable.java:53)
io.temporal.internal.sync.SyncWorkflow.lambda$start$0(SyncWorkflow.java:132)
io.temporal.internal.sync.SyncWorkflow$$Lambda$725/683808876.run(Unknown Source)
io.temporal.internal.sync.CancellationScopeImpl.run(CancellationScopeImpl.java:101)
io.temporal.internal.sync.WorkflowThreadImpl$RunnableWrapper.run(WorkflowThreadImpl.java:107)
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
java.util.concurrent.FutureTask.run(FutureTask.java:266)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
java.lang.Thread.run(Thread.java:748)

Hi @sam_saha are you getting this during debugging? If so see (Java SDK) Testing and Debugging | Temporal documentation, (Go SDK) Testing and debugging | Temporal documentation