Skip to content

Commit

Permalink
Merge "base: bump watchdog timeout to 180s" into main
Browse files Browse the repository at this point in the history
  • Loading branch information
LalitMaganti authored and Gerrit Code Review committed Sep 11, 2024
2 parents 28f679d + d2eee5d commit 76c9a33
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ Unreleased:
* Improved accuracy of ftrace event cropping when there are multiple
concurrent tracing sessions. See `previous_bundle_end_timestamp` in
ftrace_event_bundle.proto.
* Increased watchdog timeout to 180s from 30s to make watchdog crashes
much less likely when system is under heavy load.
SQL Standard library:
*
Trace Processor:
Expand Down
6 changes: 3 additions & 3 deletions include/perfetto/ext/base/watchdog.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ constexpr uint64_t kWatchdogDefaultMemorySlack = 32 * 1024 * 1024; // 32 MiB.
constexpr uint32_t kWatchdogDefaultMemoryWindow = 30 * 1000; // 30 seconds.

inline void RunTaskWithWatchdogGuard(const std::function<void()>& task) {
// Maximum time a single task can take in a TaskRunner before the
// program suicides.
constexpr int64_t kWatchdogMillis = 30000; // 30s
// The longest duration allowed for a single task within the TaskRunner.
// Exceeding this limit will trigger program termination.
constexpr int64_t kWatchdogMillis = 180000; // 180s

Watchdog::Timer handle = base::Watchdog::GetInstance()->CreateFatalTimer(
kWatchdogMillis, WatchdogCrashReason::kTaskRunnerHung);
Expand Down

0 comments on commit 76c9a33

Please sign in to comment.