From def8bab5a82dbdaa91a58c7661ab8c079b680fba Mon Sep 17 00:00:00 2001 From: Cole Miller Date: Wed, 2 Jul 2025 21:04:27 -0400 Subject: [PATCH] Fix script/symbolicate for Linux panic reports (#33822) Release Notes: - N/A --- crates/remote_server/src/unix.rs | 2 +- script/symbolicate | 17 +++++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/crates/remote_server/src/unix.rs b/crates/remote_server/src/unix.rs index 48b4e483b4..84ce08ff25 100644 --- a/crates/remote_server/src/unix.rs +++ b/crates/remote_server/src/unix.rs @@ -164,7 +164,7 @@ fn init_panic_hook() { }), app_version: format!("remote-server-{version}"), app_commit_sha: option_env!("ZED_COMMIT_SHA").map(|sha| sha.into()), - release_channel: release_channel.display_name().into(), + release_channel: release_channel.dev_name().into(), target: env!("TARGET").to_owned().into(), os_name: telemetry::os_name(), os_version: Some(telemetry::os_version()), diff --git a/script/symbolicate b/script/symbolicate index 743b5872ab..5e818626fa 100755 --- a/script/symbolicate +++ b/script/symbolicate @@ -11,24 +11,29 @@ fi input_file=$1; if [[ "$input_file" == *.json ]]; then - version=$(cat $input_file | jq -r .app_version) - channel=$(cat $input_file | jq -r .release_channel) - target_triple=$(cat $input_file | jq -r .target) + version=$(cat $input_file | jq -r .panic.app_version) + channel=$(cat $input_file | jq -r .panic.release_channel) + target_triple=$(cat $input_file | jq -r .panic.target) - which llvm-symbolizer rustfilt >dev/null || echo Need to install llvm-symbolizer and rustfilt + which llvm-symbolizer rustfilt >/dev/null || (echo Need to install llvm-symbolizer and rustfilt && exit 1) echo $channel; mkdir -p target/dsyms/$channel - dsym="$channel/zed-$version-$target_triple.dbg" + if [[ "$version" == "remote-server-"* ]]; then + version="${version#remote-server-}" + dsym="$channel/remote_server-$version-$target_triple.dbg" + else + dsym="$channel/zed-$version-$target_triple.dbg" + fi if [[ ! -f target/dsyms/$dsym ]]; then echo "Downloading $dsym..." curl -o target/dsyms/$dsym.gz "https://zed-debug-symbols.nyc3.digitaloceanspaces.com/$dsym.gz" gunzip target/dsyms/$dsym.gz fi - cat $input_file | jq -r .backtrace[] | sed s'/.*+//' | llvm-symbolizer --no-demangle --obj=target/dsyms/$dsym | rustfilt + cat $input_file | jq -r .panic.backtrace[] | sed s'/.*+//' | llvm-symbolizer --no-demangle --obj=target/dsyms/$dsym | rustfilt else # ips file