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

Possible hang when stopping profiler #4199

Open
armcknight opened this issue Jul 26, 2024 · 0 comments
Open

Possible hang when stopping profiler #4199

armcknight opened this issue Jul 26, 2024 · 0 comments

Comments

@armcknight
Copy link
Member

armcknight commented Jul 26, 2024

Description

A customer reported a hang that BugSnag reports when our profiler is stopped while our SDK is not running. I was unable to reproduce the issue. The stack trace shows the following frames:

Image

While investigating, I did notice that we potentially write a console log if stopping the thread fails, which contains a call to std::strerror:

SENTRY_ASYNC_SAFE_LOG_ERRNO_RETURN(pthread_cancel(thread_));
SENTRY_ASYNC_SAFE_LOG_ERRNO_RETURN(pthread_join(thread_, NULL));

and the docs state that strerror is not thread safe, recommending using strerror_r instead. I'm not sure that is what's happening here, however; I would expect to see something related in the stack trace. We will look into changing that over in any case: #4190

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

2 participants