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

Turn off sLogInSignal to avoid crashing #2607

Merged
merged 1 commit into from
Sep 19, 2024
Merged
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
8 changes: 4 additions & 4 deletions indra/llcommon/llapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,6 @@ LLApp* LLApp::sApplication = NULL;
// and disables crashlogger
bool LLApp::sDisableCrashlogger = false;

// Local flag for whether or not to do logging in signal handlers.
//static
bool LLApp::sLogInSignal = true;

// static
// Keeps track of application status
LLScalarCond<LLApp::EAppStatus> LLApp::sStatus{LLApp::APP_STATUS_STOPPED};
Expand Down Expand Up @@ -596,6 +592,10 @@ void default_unix_signal_handler(int signum, siginfo_t *info, void *)
// We do the somewhat sketchy operation of blocking in here until the error handler
// has gracefully stopped the app.

// FIXME(brad) - we are using this handler for asynchronous signals as well, so sLogInSignal is currently
// disabled for safety. we need to find a way to selectively reenable it when it is safe.
// see issue secondlife/viewer#2566

if (LLApp::sLogInSignal)
{
LL_INFOS() << "Signal handler - Got signal " << signum << " - " << apr_signal_description_get(signum) << LL_ENDL;
Expand Down
8 changes: 6 additions & 2 deletions indra/llcommon/llapp.h
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,12 @@ class LL_COMMON_API LLApp
friend void default_unix_signal_handler(int signum, siginfo_t *info, void *);
#endif

public:
static bool sLogInSignal;
private:
#ifdef LL_RELEASE_FOR_DOWNLOAD
static constexpr bool sLogInSignal = false;
#else
static constexpr bool sLogInSignal = true;
#endif
};

#endif // LL_LLAPP_H
Loading