oceanbase / oceanbase/obkv-table-client-java
[Bug]: The Direct-Load API has some non-daemon threads that cannot end normally, causing the JVM to be unable to exit normally.
Open
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 32
- Forks
- 25
- Avg merge
- 10h 32m
- Merged PRs (30d)
- 2
Description
Describe the bug
The Direct-Load API has some non-daemon threads that cannot end normally, causing the JVM to be unable to exit normally.
Environment
master branch:088b828
version:1.3.1-SNAPSHOT
Fast reproduce steps
Using Direct-Load API for multi node write
- Jstack log
"pool-35-thread-1" #84 prio=5 os_prio=31 tid=0x000000013f8a3800 nid=0xc703 waiting on condition [0x0000000306652000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000006c22dcba0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2083)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)
Locked ownable synchronizers:
- None
"pool-34-thread-1" #83 prio=5 os_prio=31 tid=0x000000013f8a2800 nid=0xec03 waiting on condition [0x0000000306446000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000006c22a9a70> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2083)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)
Locked ownable synchronizers:
- None
- After troubleshooting, it was caused by the following thread pool.
- com.alipay.oceanbase.rpc.table.ObTable.ObTableConnectionPool#cleanerExecutor
Expected behavior
No response
Actual behavior
No response
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting com.alipay.oceanbase.rpc.table.ObTable.ObTableConnectionPool, especially cleanerExecutor, and reproduce a multi-node Direct-Load API write while collecting a jstack log. Done means the non-daemon threads can terminate normally and the JVM exits after the Direct-Load operation completes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100