cameron314 / cameron314/concurrentqueue

How to resolve this problem?

Open
#278 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
12.5k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

When my server run a couple of days, the cpu load will rise a lot, the thread stack is blow:

Thread 1 (process 31689):
#0 0x00007fabc470ad2f in do_futex_wait () from /usr/lib64/libpthread.so.0
#1 0x00007fabc470ae07 in __new_sem_wait_slow () from /usr/lib64/libpthread.so.0
#2 0x00007fabc470aea5 in sem_post@@GLIBC_2.2.5 () from /usr/lib64/libpthread.so.0
#3 0x00000000007edded in timed_wait (usecs=5000, this=) at /xxx/xxx/concurrentqueue/blockingconcurrentqueue.h:226
#4 waitWithPartialSpinning (timeout_usecs=, this=) at /XXX/XXX/concurrentqueue/blockingconcurrentqueue.h:282
#5 wait (timeout_usecs=5000, this=) at
/XXX/XXX/concurrentqueue/blockingconcurrentqueue.h:362

Whether the timed_wait method will cause deadlock?

Contributor guide

No contributing guide indexed for this repository

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 with blockingconcurrentqueue.h, especially timed_wait, waitWithPartialSpinning, and wait at the stack-trace lines. Review the reported futex and semaphore frames alongside the sustained CPU increase after several days. Done requires a reproducible diagnosis of whether this path can deadlock and a clearly documented resolution.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.