Skip to content

Conversation

@akanimesh7
Copy link

@akanimesh7 akanimesh7 commented Oct 10, 2025

Deadlock is as follows

blc-keepalive-HOST thread's trace

(https://jstack.review/#tda_5_threaddetails_0x0000fffed53960e0)awaiting notification on [ [0x00000007406afbb0](https://jstack.review/#tda_5_sync_0x00000007406afbb0) ] , holding [ [0x00000007a0605a38](https://jstack.review/#tda_5_sync_0x00000007a0605a38) ]
at jdk.internal.misc.Unsafe.park(java.base@21.0.6/Native Method)
at java.util.concurrent.locks.LockSupport.parkNanos(java.base@21.0.6/LockSupport.java:269)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(java.base@21.0.6/AbstractQueuedSynchronizer.java:756)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireNanos(java.base@21.0.6/AbstractQueuedSynchronizer.java:1038)
at java.util.concurrent.locks.ReentrantLock$Sync.tryLockNanos(java.base@21.0.6/ReentrantLock.java:168)
at java.util.concurrent.locks.ReentrantLock.tryLock(java.base@21.0.6/ReentrantLock.java:479)
at com.github.shyiko.mysql.binlog.BinaryLogClient.tryLockInterruptibly(BinaryLogClient.java:1374)
at com.github.shyiko.mysql.binlog.BinaryLogClient.terminateConnect(BinaryLogClient.java:1368)
at com.github.shyiko.mysql.binlog.BinaryLogClient.access$900(BinaryLogClient.java:96)
at com.github.shyiko.mysql.binlog.BinaryLogClient$5.run(BinaryLogClient.java:904)
at java.util.concurrent.Executors$RunnableAdapter.call(java.base@21.0.6/Executors.java:572)
at java.util.concurrent.FutureTask.run(java.base@21.0.6/FutureTask.java:317)
at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@21.0.6/ThreadPoolExecutor.java:1144)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@21.0.6/ThreadPoolExecutor.java:642)
at java.lang.Thread.runWith(java.base@21.0.6/Thread.java:1596)
at java.lang.Thread.run(java.base@21.0.6/Thread.java:1583)

blc-HOST thread's trace

(https://jstack.review/#tda_5_threaddetails_0x0000ffff14513750)awaiting notification on [ [0x00000007543d9cd8](https://jstack.review/#tda_5_sync_0x00000007543d9cd8) ] , holding [ [0x00000007406afbb0](https://jstack.review/#tda_5_sync_0x00000007406afbb0) ]
at jdk.internal.misc.Unsafe.park(java.base@21.0.6/Native Method)
at java.util.concurrent.locks.LockSupport.parkNanos(java.base@21.0.6/LockSupport.java:269)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(java.base@21.0.6/AbstractQueuedSynchronizer.java:1763)
at java.util.concurrent.ThreadPoolExecutor.awaitTermination(java.base@21.0.6/ThreadPoolExecutor.java:1475)
at java.util.concurrent.Executors$DelegatedExecutorService.awaitTermination(java.base@21.0.6/Executors.java:780)
at com.github.shyiko.mysql.binlog.BinaryLogClient.awaitTerminationInterruptibly(BinaryLogClient.java:1356)
at com.github.shyiko.mysql.binlog.BinaryLogClient.terminateKeepAliveThread(BinaryLogClient.java:1348)
at com.github.shyiko.mysql.binlog.BinaryLogClient.disconnect(BinaryLogClient.java:1333)
at io.debezium.connector.v2.binlog.BinlogStreamingChangeEventSource$ReaderThreadLifecycleListener.onCommunicationFailure(BinlogStreamingChangeEventSource.java:1258)
at com.github.shyiko.mysql.binlog.BinaryLogClient.listenForEventPackets(BinaryLogClient.java:1110)
at com.github.shyiko.mysql.binlog.BinaryLogClient.connect(BinaryLogClient.java:657)
at com.github.shyiko.mysql.binlog.BinaryLogClient$7.run(BinaryLogClient.java:959)
at java.lang.Thread.runWith(java.base@21.0.6/Thread.java:1596)
at java.lang.Thread.run(java.base@21.0.6/Thread.java:1583)

Fix deadlock due to lost interrupt on keeplive thread
@akanimesh7
Copy link
Author

@jpechane @Naros
Can someone help with this PR ?

Copy link
Member

@Naros Naros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM, I built this as 0.41.0 and ran a local build of all MySQL, and all tests pass.

@jpechane
Copy link

@akanimesh7 LGTM, thanks. Could you please create a new Jira for it?
I am going to release this as 0.40.3 and we need then to update dependency of Debezium.

@akanimesh7 akanimesh7 changed the title Fix deadlock due to lost interrupt on keeplive thread DBZ-9548 Fix deadlock due to lost interrupt on keeplive thread Oct 13, 2025
@akanimesh7
Copy link
Author

akanimesh7 commented Oct 13, 2025

@jpechane Have created ticket and put it's name in the PR heading

@jpechane
Copy link

jpechane commented Oct 15, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants