Check activateFiber failed
- Dominant language
- C++
- Stars
- 30.5k
- Forks
- 5.9k
- PR merge metrics
- No merged PRs in 30d
Description
I try to use ExecutorLoopController in FiberManager and use CPUThreadPoolExecutor, as shown in the following example:
```cpp
#include
#include
#include
int main() {
auto executor = std::make_shared(3);
auto fm = std::make_shared(
std::make_unique(executor.get()));
for(int i=0;i<10000;i++){
fm->add([](){
int a=1;
int b=1;
for(int j=0;j<100;j++){
a = a+b;
b = a+b;
}
});
}
executor->join();
return 0;
}
```
But after running, the following error is output:
```
F20230222 17:43:26.939141 548510 FiberManagerInternal-inl.h:67] Check failed: activeFiber_ == (Fiber*)nullptr (0 vs. 0)
*** Check failure stack trace: ***
F20230222 17:43:26.939352 548511 FiberManagerInternal-inl.h:67] Check failed: activeFiber_ == (Fiber*)nullptr (0x7f0c13027000 vs. 0)
```
Did I write something wrong? How should I use them correctly?
Contributor guide
Research direction
Start with the supplied reproducer and inspect FiberManagerInternal-inl.h:67, then trace how ExecutorLoopController interacts with CPUThreadPoolExecutor and FiberManager. Determine whether the example violates the expected usage or exposes a library defect; done means establishing the correct behavior and either documenting the usage or providing a focused fix and regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100