Linked analyzers cannot be stopped: a stuck stack or concurrency analyzer stalls ctrace and its server
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 58/100
Research direction
Start with the external-tool timeout path referenced in the issue and the linked analyzer integration, then read docs/configuration.md and the timeout test coverage. Implement timeout handling for both linked analyzers so they are reported as failed with exit code 3, update the configuration documentation, and add a test that exercises the timeout path.
Written by the indexing model from the issue text.
Description
External tools stop after tools.<name>.timeout_s (#137, #156). The stack analyzer and the concurrency analyzer are linked into ctrace and run on its thread pool, so nothing can stop them: docs/configuration.md says so under tools.<name>.timeout_s.
Observed
On CoreTrace's own code, the pinned stack analyzer (v0.22.0) ran for 42 minutes without finishing (#169). The CLI only ends when something outside kills it, such as the CI job's time limit, and then gives no report. In server mode, the run_analysis request never returns and keeps a worker of the shared pool (#140).
Options
- Run each linked analyzer in a child process.
ctracere-executes itself with an internal subcommand and stops the child on timeout, as it does for external tools. The analyzers' API stays as it is; the cost is a process start and serializing the report, which is already structured (#66). - A cancellation point in the analyzers, for example a stop token checked between functions or modules. There is no extra process, but both analyzers' APIs change, and a function stuck inside one fixed point still cannot be stopped.
Option 1 reuses the timeout path that external tools already have.
Acceptance
tools.ctrace_stack_analyzer.timeout_sandtools.coretrace-concurrency-analyzer.timeout_sstop the analyzer, which is reported as failed (exit code 3), as for external tools.docs/configuration.mdno longer says these two analyzers cannot be stopped.- A test covers the timeout path.
From the technical debt register (docs/quality/technical-debt.md, D2).
- Dominant language
- C++
- Stars
- 5
- Forks
- 4
- Avg merge
- 1h 4m
- Merged PRs (30d)
- 71
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing 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.
More from CoreTrace/coretrace
-
documentation severity/minor
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
chore good first issue severity/minor
Difficulty 1/5 Under an hour Newbie friendliness 90/100
Maintainers usually reply within 1 day
-
build severity/minor
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
build good first issue severity/minor
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
good first issue test
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
All issues in CoreTrace/coretrace
Similar issues
-
1 type: problem 2 scope: firmware 3 good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
SpaceTeam/STS1_COBC_SW#511 ·
-
documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
imaaiagent/fumi#3 ·
-
A bare port in --modelserver does not reach the model serverPossibly taken A pull request linked to this issue is open or already merged. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
rocketride-org/rocketride-server#2618 · 1 comment ·
Maintainers usually reply within 1 day
-
bug format I/O medium priority rt_lib
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
refactor
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day