mirror of
https://github.com/chromium/crashpad.git
synced 2024-12-29 00:32:35 +08:00
Mark Mentovai
90054edf62
win: De-flake hanging_program.exe
hanging_program.exe is used by crash_other_program.exe, which is in turn used by end_to_end_test.py. It hangs by loading loader_lock_dll.dll, which squats in its entry point function while the loader lock is held. hanging_program.exe needs to do some work in its Thread1() before the loader lock is taken (a SetThreadPriority() call), and needs to do some work in its main thread once the loader lock is held (it needs to signal crash_other_program.exe that it’s successfully wedged itself). Previously, proper synchronization was not provided. A 1-second Sleep() was used to wait for the loader lock to be taken. Thread1() pre-work was only achieved before the loader lock was taken by sheer luck. Things didn’t always work out so nicely. This uses an event handle to provide synchronization. An environment variable is used to pass the handle to loader_lock_dll.dll, because there aren’t many better options available. This eliminates both flake and the unnecessary 1-second delay in hanging_program.exe, and since this program runs twice during end_to_end_test.py, it improves that test’s runtime by 2 seconds. Bug: crashpad:197 Test: end_to_end_test.py Change-Id: Ib9883215ef96bed7571464cc68e09b6ab6310ae6 Reviewed-on: https://chromium-review.googlesource.com/700076 Commit-Queue: Mark Mentovai <mark@chromium.org> Reviewed-by: Leonard Mosescu <mosescu@chromium.org> Reviewed-by: Scott Graham <scottmg@chromium.org>
Crashpad
Crashpad is a crash-reporting system.
Documentation
- Project status
- Developing Crashpad: instructions for getting the source code, building, testing, and contributing to the project.
- Crashpad interface documentation
- Crashpad tool man pages
- Crashpad overview design
Source Code
Crashpad’s source code is hosted in a Git repository at https://chromium.googlesource.com/crashpad/crashpad.
Other Links
- Bugs can be reported at the Crashpad issue tracker.
- The Crashpad Buildbots perform automated builds and tests.
- crashpad-dev is the Crashpad developers’ mailing list.
Description
Languages
C++
92.6%
Objective-C++
2.5%
C
2%
Python
1.7%
Assembly
0.9%
Other
0.3%