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

Ensure that the Centipede runner writes the failure atomically and only once. #1446

Merged
merged 1 commit into from
Nov 11, 2024

Conversation

copybara-service[bot]
Copy link
Contributor

Ensure that the Centipede runner writes the failure atomically and only once.

The atomicity is needed because the function WriteFailureDescription() may
be called from multiple threads: from the main thread, e.g. for a GoogleTest
assertion failure, and from the watchdog thread, e.g. for an OOM.

The function should write the failure only once because for failures like stack
overflow, it gets called twice: the first time for the stack overflow itself,
and the second time from the SIGABRT handler handling the abort that follows the
detected stack overflow.

@copybara-service copybara-service bot force-pushed the cl/694620550 branch 2 times, most recently from 1665d35 to fbdfae8 Compare November 11, 2024 19:35
…ly once.

The atomicity is needed because the function `WriteFailureDescription()` may
be called from multiple threads: from the main thread, e.g. for a GoogleTest
assertion failure, and from the watchdog thread, e.g. for an OOM.

The function should write the failure only once because for failures like stack
overflow, it gets called twice: the first time for the stack overflow itself,
and the second time from the SIGABRT handler handling the abort that follows the
detected stack overflow.

PiperOrigin-RevId: 695434225
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.

1 participant