apple / apple/foundationdb

Improved trace thread error management

Open
#2,506 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
16.7k
Forks
1.6k
Avg merge
1d 20h
Merged PRs (30d)
126

Description

There are currently a few problems with handling trace logging thread errors that need to be addressed, as discussed in this [forum post](https://forums.foundationdb.org/t/processes-oom-fdbmonitor-doesnt-restart/1855/4):

1. The failure to flush a trace file shouldn't block the shutdown of a process.
2. We should decide what the intended behavior of a process with a failed trace thread is. Currently, it continues running but eventually runs out of memory, which doesn't seem like the correct choice. I think we should either kill it quickly or let it run indefinitely.
3. Record somewhere whatever details we can about the error that caused the trace thread to die.
4. https://github.com/apple/foundationdb/issues/1977

Contributor guide

Open the contributing guide

Research direction

Start by reading the linked forum post and issue #1977, then locate the existing trace-thread shutdown, flush, and error-handling paths in the repository. Done means the failure behavior is explicitly settled and implemented for shutdown, process lifetime, and recording available error details.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
observability
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.