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

mobile: Don't activate previous logging context on engine destruction #37833

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

abeyad
Copy link
Contributor

@abeyad abeyad commented Dec 27, 2024

When the StrippedMainBase destructor is invoked in Envoy Mobile engine destruction, occassionally the program crashes first due to trying to activate the previous saved logging Context. There's a race condition with accessing the static Context and its own destructor being invoked.

This change allows Envoy Mobile's use of StrippedMainBase to avoid those crash issues by not trying to reactivate the previous saved logging Context on engine destruction, since it wouldn't be useful to the library anyway.

When the StrippedMainBase destructor is invoked in Envoy Mobile engine
destruction, occassionally the program crashes first due to trying to
activate the previous saved logging Context. There's a race condition
with accessing the static Context and its own destructor being invoked.

This change allows Envoy Mobile's use of StrippedMainBase to avoid those
crash issues by not trying to reactivate the previous saved logging
Context on engine destruction, since it wouldn't be useful to the library
anyway.

Signed-off-by: Ali Beyad <[email protected]>
@abeyad
Copy link
Contributor Author

abeyad commented Dec 27, 2024

/assign @alyssawilk

@abeyad
Copy link
Contributor Author

abeyad commented Dec 27, 2024

cc @RenjieTang

Signed-off-by: Ali Beyad <[email protected]>
@abeyad abeyad changed the title mobile: Don't activate previous context on engine destruction mobile: Don't activate previous logging context on engine destruction Jan 2, 2025
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

Successfully merging this pull request may close these issues.

2 participants