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

macOS: Segfault just after connecting from Tracy profiler #6

Closed
superdump opened this issue Oct 20, 2020 · 3 comments
Closed

macOS: Segfault just after connecting from Tracy profiler #6

superdump opened this issue Oct 20, 2020 · 3 comments

Comments

@superdump
Copy link
Contributor

tracing-tracy 0.3.0, macOS, Tracy 0.7.3.

Just after connecting to my tracing-tracy instrumented application from the Tracy profiler UI tool, my application segfaults. Here is the backtrace:

tracy::_memory_allocate(tracy::heap_t*, unsigned long) (/Users/robswain/.cargo/registry/src/github.com-1ecc6299db9ec823/tracy-client-sys-0.10.0/tracy/client/tracy_rpmalloc.cpp:0)
tracy::rpmalloc(unsigned long) (/Users/robswain/.cargo/registry/src/github.com-1ecc6299db9ec823/tracy-client-sys-0.10.0/tracy/client/tracy_rpmalloc.cpp:2135)
tracy::backtrace_alloc(tracy::backtrace_state*, unsigned long, void (*)(void*, char const*, int), void*) (/Users/robswain/.cargo/registry/src/github.com-1ecc6299db9ec823/tracy-client-sys-0.10.0/tracy/libbacktrace/alloc.cpp:62)
tracy::macho_add_dsym(tracy::backtrace_state*, char const*, unsigned long, unsigned char const*, void (*)(void*, char const*, int), void*, int (**)(tracy::backtrace_state*, unsigned long, int (*)(void*, unsigned long, unsigned long, char const*, int, char const*), void (*)(void*, char const*, int), void*)) (/Users/robswain/.cargo/registry/src/github.com-1ecc6299db9ec823/tracy-client-sys-0.10.0/tracy/libbacktrace/macho.cpp:878)
tracy::macho_add(tracy::backtrace_state*, char const*, int, long long, unsigned char const*, unsigned long, int, void (*)(void*, char const*, int), void*, int (**)(tracy::backtrace_state*, unsigned long, int (*)(void*, unsigned long, unsigned long, char const*, int, char const*), void (*)(void*, char const*, int), void*), int*) (/Users/robswain/.cargo/registry/src/github.com-1ecc6299db9ec823/tracy-client-sys-0.10.0/tracy/libbacktrace/macho.cpp:1161)
tracy::backtrace_initialize(tracy::backtrace_state*, char const*, int, void (*)(void*, char const*, int), void*, int (**)(tracy::backtrace_state*, unsigned long, int (*)(void*, unsigned long, unsigned long, char const*, int, char const*), void (*)(void*, char const*, int), void*)) (/Users/robswain/.cargo/registry/src/github.com-1ecc6299db9ec823/tracy-client-sys-0.10.0/tracy/libbacktrace/macho.cpp:1226)
tracy::fileline_initialize(tracy::backtrace_state*, void (*)(void*, char const*, int), void*) (/Users/robswain/.cargo/registry/src/github.com-1ecc6299db9ec823/tracy-client-sys-0.10.0/tracy/libbacktrace/fileline.cpp:245)
tracy::backtrace_pcinfo(tracy::backtrace_state*, unsigned long, int (*)(void*, unsigned long, unsigned long, char const*, int, char const*), void (*)(void*, char const*, int), void*) (/Users/robswain/.cargo/registry/src/github.com-1ecc6299db9ec823/tracy-client-sys-0.10.0/tracy/libbacktrace/fileline.cpp:279)
tracy::DecodeCallstackPtr(unsigned long long) (/Users/robswain/.cargo/registry/src/github.com-1ecc6299db9ec823/tracy-client-sys-0.10.0/tracy/client/TracyCallstack.cpp:601)
tracy::Profiler::SendCallstackFrame(unsigned long long) (/Users/robswain/.cargo/registry/src/github.com-1ecc6299db9ec823/tracy-client-sys-0.10.0/tracy/client/TracyProfiler.cpp:2424)
tracy::Profiler::HandleServerQuery() (/Users/robswain/.cargo/registry/src/github.com-1ecc6299db9ec823/tracy-client-sys-0.10.0/tracy/client/TracyProfiler.cpp:2495)
tracy::Profiler::Worker() (/Users/robswain/.cargo/registry/src/github.com-1ecc6299db9ec823/tracy-client-sys-0.10.0/tracy/client/TracyProfiler.cpp:1537)
tracy::Thread::Launch(void*) (/Users/robswain/.cargo/registry/src/github.com-1ecc6299db9ec823/tracy-client-sys-0.10.0/tracy/client/TracyThread.hpp:75)
_pthread_start (@_pthread_start:42)
thread_start (@thread_start:8)
@nagisa
Copy link
Owner

nagisa commented Oct 20, 2020

Please report this against Tracy itself. This kind of issue been seen when the tracy profiler operates without TLS being initialized. We strive to force such initialization for function calls that are wrapped by tracy-client and tracy-client-sys, but in this particular case it seems like this is a thread that's entirely internal to tracy itself, so I cannot really do much about it.

@superdump
Copy link
Contributor Author

Ok, thanks.

@nagisa
Copy link
Owner

nagisa commented Feb 17, 2021

According to reports in #12 this appears to be fixed now!

@nagisa nagisa closed this as completed Feb 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants