oceanbase / oceanbase/seekdb

Govern ObUniqTaskQueue thread proliferation

Open
#429 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

dima type: task
Dominant language
C++
Stars
2.9k
Forks
342
Avg merge
2d 14h
Merged PRs (30d)
53

Description

Description

Multiple threads with the same name pattern (UniqTask0) are observed, indicating potential uncontrolled thread creation or lack of proper management for the ObUniqTaskQueue.

Details

The following thread instances were identified:

  • Thread 2179579 (UniqTask0)
  • Thread 2179586 (UniqTask0)
  • Thread 2179587 (UniqTask0)
  • Thread 2179588 (UniqTask0)
  • Thread 2179598 (UniqTask0)
  • Thread 2179599 (UniqTask0)
  • Thread 2179600 (UniqTask0)
  • Thread 2179601 (UniqTask0)
  • Thread 2179602 (UniqTask0)
  • Thread 2179603 (UniqTask0)
  • Thread 2179604 (UniqTask0)
  • Thread 2179606 (UniqTask0)
  • Thread 2179607 (UniqTask0)
  • Thread 2179608 (UniqTask0)
  • Thread 2179637 (T1_UniqTask0)
  • Thread 2179713 (UniqTask1)

Key Observation: There is a large number of thread instances (e.g., many UniqTask0 threads).

Impact

Uncontrolled thread proliferation can lead to:

  • Increased memory and CPU overhead.
  • Potential resource exhaustion.
  • Degraded system performance and stability.

Proposed Solution

Implement governance for the ObUniqTaskQueue to manage thread lifecycle, potentially including:

  1. Thread pool management with configurable limits.
  2. Proper cleanup of idle or completed tasks.
  3. Monitoring and alerting for abnormal thread counts.
  4. Investigation into why multiple threads with identical names are being created.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the ObUniqTaskQueue implementation and the code path that creates the UniqTask threads. Investigate why multiple threads with the same name are created, then define lifecycle limits and cleanup behavior. Done means thread counts are governed and abnormal proliferation is detectable without resource exhaustion.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.