Deadlock occurs when attempting to stop a Streaming application using the Kafka adapters

Deadlock occurs when attempting to stop a Streaming application using the Kafka adapters

book

Article ID: KB0072781

calendar_today

Updated On:

Products Versions
TIBCO Streaming 10.6

Description

Sometimes when attempting to shut down a Streaming application using 'epadmin stop node', the command hangs and does not complete. This is a known issue relating to the Kafka adapters. Thread dumps taken from the application reveal there is a deadlock:
 
Found one Java-level deadlock:
=============================
"runtime [tid=6904540]":
waiting to lock monitor 0x000002127d626e00 (object 0x00000004141075d0, a com.streambase.sb.adapter.kafka.KafkaSubscription),
which is held by "OperatorThread(default.Read.KafkaConsumer)"
"OperatorThread(default.Read.KafkaConsumer)":
waiting for ownable synchronizer 0x00000004142b7228, (a java.util.concurrent.locks.ReentrantLock$NonfairSync),
which is held by "runtime [tid=6904540]"

Issue/Introduction

Describes a known issue where the Kafka adapters may cause a deadlock when attempting to stop the Streaming node.

Resolution

To work around this issue, first suspend the Kafka adapters before issuing the 'epadmin stop node' command.

To suspend the adapter, run 'epadmin [sn|ad] suspend adapter --path={adapter0name}'.

After issuing the suspend command, check the status using 'epadmin [sn|ad] display adapter --path={adapter0name}'.

Perform these steps for each Kafka adapter instance used in this Streaming node.