Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DNM: Try out jemalloc leak profiling #31049

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ci/plugins/mzcompose/hooks/command
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions ci/plugins/mzcompose/hooks/pre-exit
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions misc/python/materialize/cli/ci_annotate_errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
)
.* $
""",
Expand Down
3 changes: 2 additions & 1 deletion src/prof/src/jemalloc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ use tikv_jemalloc_ctl::{epoch, stats};

#[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_leak:true,prof_final:true,prof:true,prof_active:true,lg_prof_sample:19\0";

#[derive(Copy, Clone, Debug)]
pub struct JemallocProfMetadata {
Expand Down
Loading