Support Article
DataFlowStaleThreadException: Stale thread detected
SA-79801
Summary
When executeing a Data Flow program, a DataFlowStaleThreadException occurs.
Error Messages
com.pega.dsm.dnode.impl.dataflow.DataFlowStaleThreadException: Stale thread detected: Thread[DataFlow-Service-PickingupRun-PR-XXXXX:YYYYY, Access group: [ABCDEFG:Developer],5,DataFlow-Service-PickingupRun-PR-XXXXX]
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
at java.net.SocketInputStream.read(SocketInputStream.java:171)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at oracle.net.ns.Packet.receive(Packet.java:300)
at oracle.net.ns.DataPacket.receive(DataPacket.java:106)
at oracle.net.ns.NetInputStream.getNextPacket(NetInputStream.java:315)
at oracle.net.ns.NetInputStream.read(NetInputStream.java:260)
at oracle.net.ns.NetInputStream.read(NetInputStream.java:185)
at oracle.net.ns.NetInputStream.read(NetInputStream.java:102)
at oracle.jdbc.driver.T4CSocketInputStreamWrapper.readNextPacket(T4CSocketInputStreamWrapper.java:124)
at oracle.jdbc.driver.T4CSocketInputStreamWrapper.read(T4CSocketInputStreamWrapper.java:80)
at oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1137)
............
at com.pega.dsm.dnode.impl.dataflow.strategy.StrategyStageProcessor.executeStrategy(StrategyStageProcessor.java:406)
at com.pega.dsm.dnode.impl.dataflow.strategy.StrategyStageProcessor.onNext(StrategyStageProcessor.java:267)
at com.pega.dsm.dnode.api.dataflow.DataFlowStageBatchProcessor.commitBatchInternal(DataFlowStageBatchProcessor.java:134)
at com.pega.dsm.dnode.api.dataflow.DataFlowStageBatchProcessor.onNext(DataFlowStageBatchProcessor.java:76)
at com.pega.dsm.dnode.api.dataflow.DataFlowStageBatchProcessor.onNext(DataFlowStageBatchProcessor.java:18)
at com.pega.dsm.dnode.api.dataflow.DataFlowStage$StageInputSubscriber.onNext(DataFlowStage.java:359)
at com.pega.dsm.dnode.api.dataflow.DataFlowStage$StageInputSubscriber.onNext(DataFlowStage.java:292)
Steps to Reproduce
Execute a data flow.
Root Cause
Issue with the third-party tool: Oracle
Since the data flows did not obtain a response from Oracle, the data flow threads became stale.
Resolution
Here's the explanation for the reported behavior:
The data flow has a mechanism that is executed frequently for maintenance which is called Pulse. During the Pulse, one of the operations executed is a Stale Thread detection in which the system identifies threads that are potentially stuck, either in as an infinite loop or waiting for a response from an external service such as a database call. By default, if the thread has not updated its metrics (performed multiple times during Partition execution) for over 30 minutes, it is considered stale and a warning with the stack trace of this thread is added to the data flow run.
For this particular instance, the data flow output is configured to store the Interaction History on an external Oracle database table. Since Oracle did not respond in the expected manner, the DataFlowStaleThreadException occurred.
Published December 2, 2021
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.