memory watchdog easily hit in traced_probes when systemd_journald source is enabled
tring to use linux.systemd_journald source, and after a few minutes traced_probes service crashed reporting memory watchdog hit.
traced_probes[33514]: -----BEGIN PERFETTO PRE-CRASH LOG----- traced_probes[33514]: wdog_reason: 2 traced_probes[33514]: wdog_timeout: 0 traced_probes[33514]: wdog_actual_boot: 0 traced_probes[33514]: wdog_actual_mono: 0 traced_probes[33514]: wdog_actual_cpu: 0 traced_probes[33514]: ds_instance_count: 4 traced_probes[33514]: tracing_session_count: 1 traced_probes[33514]: [608.093] watchdog_posix.cc:411 Memory watchdog trigger. Memory window of 103649280.000000 bytes is above the 69206016 bytes limit. Sep 04 13:40:42 ALANLAPTOP traced_probes[33514]: -----END PERFETTO PRE-CRASH LOG-----
This should be fixed by https://github.com/google/perfetto/pull/7313
As we discovered from elsewhere, the watchdog tracking RSS as a metric was a very poor choice because it includes shmem and file memory. The above PR switches to use anon + swap instead which is a much better choice.
solved with the fix from 7313