samply icon indicating copy to clipboard operation
samply copied to clipboard

MacOS: "couldn't create root TaskProfiler"

Open horta opened this issue 1 year ago • 1 comments

Commit hash: 75a8971b4291db8091a346431a1727ffcec4f038

Error

❱ ./target/release/samply record /Applications/StarCraft/x86_64/StarCraft.app/Contents/MacOS/StarCraft -launch -uid s1
thread '<unnamed>' panicked at samply/src/mac/sampler.rs:105:10:
couldn't create root TaskProfiler: Ignorable("Could not check process libraries", NotSupported)
stack backtrace:
   0:        0x102870498 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h4699abefd07a84a3
   1:        0x102888140 - core::fmt::write::he20999f7a51cdf3e
   2:        0x102869810 - std::io::Write::write_fmt::hf214e623647db141
   3:        0x1028702ec - std::sys_common::backtrace::print::h99c92515f9244444
   4:        0x102864da8 - std::panicking::default_hook::{{closure}}::h9ee44d77b22015e9
   5:        0x102864ab0 - std::panicking::default_hook::h1574e360da6cf342
   6:        0x102865154 - std::panicking::rust_panic_with_hook::h8c63523cb5f49fbc
   7:        0x102870864 - std::panicking::begin_panic_handler::{{closure}}::h22187a0d322c75e4
   8:        0x1028706c0 - std::sys_common::backtrace::__rust_end_short_backtrace::ha6c62cb1233a6655
   9:        0x102864e9c - _rust_begin_unwind
  10:        0x1028cbb38 - core::panicking::panic_fmt::h48dfedcd5cf205f7
  11:        0x1028cc084 - core::result::unwrap_failed::h5e4590a7ae843be2
  12:        0x102334aa0 - samply::mac::sampler::Sampler::run::hd61cf201cd7116b9
  13:        0x1023811c4 - std::sys_common::backtrace::__rust_begin_short_backtrace::he053a9e851d89858
  14:        0x1023c0ce8 - core::ops::function::FnOnce::call_once{{vtable.shim}}::h48bc62a2aeaab2a3
  15:        0x10285e754 - std::sys::pal::unix::thread::Thread::new::thread_start::h58eb2147d371298d
  16:        0x184e25f94 - __pthread_joiner_wake
thread 'main' panicked at samply/src/mac/profiler.rs:169:48:
couldn't join sampler thread: Any { .. }
stack backtrace:
   0:        0x102870498 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h4699abefd07a84a3
   1:        0x102888140 - core::fmt::write::he20999f7a51cdf3e
   2:        0x102869810 - std::io::Write::write_fmt::hf214e623647db141
   3:        0x1028702ec - std::sys_common::backtrace::print::h99c92515f9244444
   4:        0x102864da8 - std::panicking::default_hook::{{closure}}::h9ee44d77b22015e9
   5:        0x102864ab0 - std::panicking::default_hook::h1574e360da6cf342
   6:        0x102865154 - std::panicking::rust_panic_with_hook::h8c63523cb5f49fbc
   7:        0x102870864 - std::panicking::begin_panic_handler::{{closure}}::h22187a0d322c75e4
   8:        0x1028706c0 - std::sys_common::backtrace::__rust_end_short_backtrace::ha6c62cb1233a6655
   9:        0x102864e9c - _rust_begin_unwind
  10:        0x1028cbb38 - core::panicking::panic_fmt::h48dfedcd5cf205f7
  11:        0x1028cc084 - core::result::unwrap_failed::h5e4590a7ae843be2
  12:        0x102281fac - samply::mac::profiler::start_recording::hc9c2575006f42499
  13:        0x102422a00 - samply::main::hdc464e774d369b6e
  14:        0x10238082c - std::sys_common::backtrace::__rust_begin_short_backtrace::h902006d7f85d94b7
  15:        0x102396b20 - std::rt::lang_start::{{closure}}::hef7f71d59c8033fb
  16:        0x102864de8 - std::panicking::try::h9eb4926af0fb4f23
  17:        0x1028515d4 - std::rt::lang_start_internal::h47d7f1f6477d860b
  18:        0x10242ff04 - _main
❱ file /Applications/StarCraft/x86_64/StarCraft.app/Contents/MacOS/StarCraft
/Applications/StarCraft/x86_64/StarCraft.app/Contents/MacOS/StarCraft: Mach-O 64-bit executable x86_64

MacOS

System Version: macOS 14.6.1
Kernel Version: Darwin 23.6.0
Secure Virtual Memory: Enabled
System Integrity Protection: Enabled

horta avatar Aug 24 '24 11:08 horta

It might be that the target is running via Rosetta.

SichangHe avatar Dec 27 '24 00:12 SichangHe

I have this same issue. I've already run samply setup.

RUST_BACKTRACE=full samply record ./target/release/my_project
thread '<unnamed>' panicked at samply/src/mac/sampler.rs:107:10:
couldn't create root TaskProfiler: Ignorable("Could not check process libraries", NotSupported)
stack backtrace:
   0:        0x10531e86c - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::hadba1856081fe8dc
   1:        0x104d59624 - core::fmt::write::h5358bd20891469bc
   2:        0x10531a900 - std::io::Write::write_fmt::hbf0611cc5d72cc91
   3:        0x10531e72c - std::sys::backtrace::BacktraceLock::print::he2302a8c253c9a13
   4:        0x10531f680 - std::panicking::default_hook::{{closure}}::hec1f77a77d7e7ffc
   5:        0x10531f4c8 - std::panicking::default_hook::hdd59ab537dd27efb
   6:        0x10531fe74 - std::panicking::rust_panic_with_hook::h533a16f5f89e4278
   7:        0x10531faf0 - std::panicking::begin_panic_handler::{{closure}}::h168c3a4362c8e4df
   8:        0x10531ed14 - std::sys::backtrace::__rust_end_short_backtrace::h601e3529ca2053df
   9:        0x10531f7b4 - _rust_begin_unwind
  10:        0x10557d5a4 - core::panicking::panic_fmt::ha0f8363f677e0181
  11:        0x10557d8e0 - core::result::unwrap_failed::h47e2afd53f1d6de6
  12:        0x1050b3764 - samply::mac::sampler::Sampler::run::h0c6b3f91eafede52
  13:        0x105114a8c - std::sys::backtrace::__rust_begin_short_backtrace::h0ca8390a9fec4586
  14:        0x105116344 - core::ops::function::FnOnce::call_once{{vtable.shim}}::h0185a6db6c0e403f
  15:        0x10532366c - std::sys::pal::unix::thread::Thread::new::thread_start::ha1530855ce6ee203
  16:        0x18b762c0c - __pthread_cond_wait

// --snip--

thread 'main' panicked at samply/src/mac/profiler.rs:195:48:
couldn't join sampler thread: Any { .. }
stack backtrace:
   0:        0x10531e86c - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::hadba1856081fe8dc
   1:        0x104d59624 - core::fmt::write::h5358bd20891469bc
   2:        0x10531a900 - std::io::Write::write_fmt::hbf0611cc5d72cc91
   3:        0x10531e72c - std::sys::backtrace::BacktraceLock::print::he2302a8c253c9a13
   4:        0x10531f680 - std::panicking::default_hook::{{closure}}::hec1f77a77d7e7ffc
   5:        0x10531f4c8 - std::panicking::default_hook::hdd59ab537dd27efb
   6:        0x10531fe74 - std::panicking::rust_panic_with_hook::h533a16f5f89e4278
   7:        0x10531faf0 - std::panicking::begin_panic_handler::{{closure}}::h168c3a4362c8e4df
   8:        0x10531ed14 - std::sys::backtrace::__rust_end_short_backtrace::h601e3529ca2053df
   9:        0x10531f7b4 - _rust_begin_unwind
  10:        0x10557d5a4 - core::panicking::panic_fmt::ha0f8363f677e0181
  11:        0x10557d8e0 - core::result::unwrap_failed::h47e2afd53f1d6de6
  12:        0x105134a9c - samply::mac::profiler::start_recording::h50de1b61df2258a6
  13:        0x1050fbb80 - samply::main::h482d5ccb5f0a83ac
  14:        0x105114aa8 - std::sys::backtrace::__rust_begin_short_backtrace::h12dfaec942d67ed9
  15:        0x1051ae6f4 - std::rt::lang_start::{{closure}}::hb6dc9d27d8d91ae0
  16:        0x105314214 - std::rt::lang_start_internal::hacda2dedffd2edb4
  17:        0x105110138 - _main

MacOS:

System Version: macOS 15.5
Kernel Version: Darwin 24.5.0
Secure Virtual Memory: Enabled
System Integrity Protection: Disabled

Tyrcnex avatar Jul 04 '25 08:07 Tyrcnex