diff --git a/ci/plugins/mzcompose/hooks/command b/ci/plugins/mzcompose/hooks/command index 7086c52327b92..7fbf19210e060 100644 --- a/ci/plugins/mzcompose/hooks/command +++ b/ci/plugins/mzcompose/hooks/command @@ -45,6 +45,8 @@ if [ -n "${CI_COVERAGE_ENABLED:-}" ]; then find . -name '*.profraw' -delete # Remove remaining profraw files from coverage runs fi +find . -name 'jeprof*.heap' -delete + ci_collapsed_heading ":docker: Purging all existing docker containers and volumes, regardless of origin" docker ps --all --quiet | xargs --no-run-if-empty docker rm --force --volumes rm -f services.log diff --git a/ci/plugins/mzcompose/hooks/pre-exit b/ci/plugins/mzcompose/hooks/pre-exit index 5153e85197d18..90a2173821169 100755 --- a/ci/plugins/mzcompose/hooks/pre-exit +++ b/ci/plugins/mzcompose/hooks/pre-exit @@ -132,6 +132,10 @@ if [ -n "${CI_COVERAGE_ENABLED:-}" ] && [ -z "${BUILDKITE_MZCOMPOSE_PLUGIN_SKIP_ fi fi +find . -name 'jeprof*.heap' | while read -r i; do + buildkite-agent artifact upload "$i" +done + if [ "$CI_ANNOTATE_ERRORS_RESULT" -ne 0 ]; then echo "+++ ci-annotate-errors failed, which indicates that an unknown error was found" exit "$CI_ANNOTATE_ERRORS_RESULT" diff --git a/misc/python/materialize/cli/ci_annotate_errors.py b/misc/python/materialize/cli/ci_annotate_errors.py index 53b7fc82d272b..0c1c404e16401 100644 --- a/misc/python/materialize/cli/ci_annotate_errors.py +++ b/misc/python/materialize/cli/ci_annotate_errors.py @@ -101,6 +101,7 @@ | (FAIL|TIMEOUT)\s+\[\s*\d+\.\d+s\] # parallel-workload | worker_.*\ still\ running: [\s\S]* Threads\ have\ not\ stopped\ within\ 5\ minutes,\ exiting\ hard + | Leak\ approximation\ summary: ) .* $ """, diff --git a/src/prof/src/jemalloc.rs b/src/prof/src/jemalloc.rs index c02c035325113..b1e70e99dfbe2 100644 --- a/src/prof/src/jemalloc.rs +++ b/src/prof/src/jemalloc.rs @@ -24,9 +24,12 @@ use mz_ore::metrics::{MetricsRegistry, UIntGauge}; use pprof_util::ProfStartTime; use tikv_jemalloc_ctl::{epoch, stats}; +// TODO: Only set leak profiliing in CI, not in production, need to have a flag, or can we +// overwrite the malloc_conf from the outside? #[allow(non_upper_case_globals)] #[export_name = "malloc_conf"] -pub static malloc_conf: &[u8] = b"prof:true,prof_active:true,lg_prof_sample:19\0"; +pub static malloc_conf: &[u8] = + b"prof_prefix:/mzdata/jeprof,prof_leak:true,prof_final:true,prof:true,prof_active:true,lg_prof_sample:19\0"; #[derive(Copy, Clone, Debug)] pub struct JemallocProfMetadata {