Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(203)

Issue 1392093003: win: Capture some CRITICAL_SECTION debugging data (Closed)

Created:
5 years, 2 months ago by scottmg
Modified:
5 years, 2 months ago
Reviewers:
Mark Mentovai
CC:
crashpad-dev_chromium.org
Base URL:
https://chromium.googlesource.com/crashpad/crashpad@master
Target Ref:
refs/heads/master
Project:
crashpad
Visibility:
Public.

Description

win: Capture some CRITICAL_SECTION debugging data Capture the memory for the loader lock (can be inspected by !cs), as well as all locks that were created with .DebugInfo which can be viewed with !locks. e.g. 0:000> !cs ntdll!LdrpLoaderLock ----------------------------------------- Critical section = 0x778d6410 (ntdll!LdrpLoaderLock+0x0) DebugInfo = 0x778d6b6c NOT LOCKED LockSemaphore = 0x0 SpinCount = 0x04000000 0:000> !locks -v CritSec ntdll!RtlpProcessHeapsListLock+0 at 778d7620 LockCount NOT LOCKED RecursionCount 0 OwningThread 0 EntryCount 0 ContentionCount 0 CritSec +7a0248 at 007a0248 LockCount NOT LOCKED RecursionCount 0 OwningThread 0 EntryCount 0 ContentionCount 0 CritSec crashy_program!g_critical_section_with_debug_info+0 at 01342c48 LockCount NOT LOCKED RecursionCount 0 OwningThread 0 EntryCount 0 ContentionCount 0 CritSec crashy_program!crashpad::`anonymous namespace'::g_test_critical_section+0 at 01342be0 WaiterWoken No LockCount 0 RecursionCount 1 OwningThread 34b8 EntryCount 0 ContentionCount 0 *** Locked Scanned 4 critical sections R=mark@chromium.org BUG=crashpad:52 Committed: https://chromium.googlesource.com/crashpad/crashpad/+/4893a9b76d68176ba08857003ea4281d918768cf

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : . #

Patch Set 4 : . #

Total comments: 2

Patch Set 5 : comment #

Patch Set 6 : rebase #

Patch Set 7 : reenable !locks test #

Total comments: 14

Patch Set 8 : . #

Total comments: 11

Patch Set 9 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+297 lines, -55 lines) Patch
M client/crashpad_client_win.cc View 1 2 3 4 5 6 7 8 4 chunks +37 lines, -0 lines 0 comments Download
M handler/win/crash_report_exception_handler.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M handler/win/crash_report_exception_handler.cc View 1 1 chunk +4 lines, -2 lines 0 comments Download
M handler/win/crashy_test_program.cc View 1 2 3 4 5 3 chunks +18 lines, -0 lines 0 comments Download
M snapshot/crashpad_info_client_options_test.cc View 1 2 chunks +4 lines, -4 lines 0 comments Download
M snapshot/win/end_to_end_test.py View 1 2 3 4 5 6 7 1 chunk +4 lines, -6 lines 0 comments Download
M snapshot/win/exception_snapshot_win_test.cc View 1 2 chunks +10 lines, -4 lines 0 comments Download
M snapshot/win/process_snapshot_win.h View 1 2 3 4 5 6 7 8 3 chunks +19 lines, -4 lines 0 comments Download
M snapshot/win/process_snapshot_win.cc View 1 2 3 4 5 6 7 8 8 chunks +134 lines, -24 lines 0 comments Download
M snapshot/win/process_snapshot_win_test.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M tools/generate_dump.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M util/win/exception_handler_server.h View 1 2 3 4 5 6 7 8 1 chunk +5 lines, -1 line 0 comments Download
M util/win/exception_handler_server.cc View 1 7 chunks +14 lines, -3 lines 0 comments Download
M util/win/exception_handler_server_test.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M util/win/process_structs.h View 2 chunks +30 lines, -0 lines 0 comments Download
M util/win/registration_protocol_win.h View 1 2 3 4 5 6 7 1 chunk +10 lines, -2 lines 0 comments Download

Messages

Total messages: 14 (2 generated)
scottmg
5 years, 2 months ago (2015-10-08 21:04:56 UTC) #2
Mark Mentovai
https://codereview.chromium.org/1392093003/diff/60001/client/crashpad_client_win.cc File client/crashpad_client_win.cc (right): https://codereview.chromium.org/1392093003/diff/60001/client/crashpad_client_win.cc#newcode155 client/crashpad_client_win.cc:155: message.registration.critical_section_address = I’m not sure this is necessary. Sure, ...
5 years, 2 months ago (2015-10-12 14:08:59 UTC) #3
Mark Mentovai
Asanka tells me via his blog that we want ntdll.dll!RtlCriticalSectionList. http://soulsampler.blogspot.com/2010/01/critical-section-contention. Unfortunately, I wasn't able ...
5 years, 2 months ago (2015-10-12 15:55:41 UTC) #4
Mark Mentovai
The original article was Break Free of Code Deadlocks in Critical Sections Under Windows Matt ...
5 years, 2 months ago (2015-10-12 16:20:41 UTC) #5
Mark Mentovai
Oh, I guess the problem is that RtlCriticalSectionList isn’t exported from ntdll.dll and can’t be ...
5 years, 2 months ago (2015-10-12 19:24:20 UTC) #6
scottmg
On 2015/10/12 19:24:20, Mark Mentovai wrote: > Oh, I guess the problem is that RtlCriticalSectionList ...
5 years, 2 months ago (2015-10-13 21:07:33 UTC) #7
Mark Mentovai
This is a clever solution! https://codereview.chromium.org/1392093003/diff/120001/client/crashpad_client_win.cc File client/crashpad_client_win.cc (right): https://codereview.chromium.org/1392093003/diff/120001/client/crashpad_client_win.cc#newcode51 client/crashpad_client_win.cc:51: // A `CRITICAL_SECTION` initialized ...
5 years, 2 months ago (2015-10-15 00:14:57 UTC) #8
scottmg
https://codereview.chromium.org/1392093003/diff/120001/client/crashpad_client_win.cc File client/crashpad_client_win.cc (right): https://codereview.chromium.org/1392093003/diff/120001/client/crashpad_client_win.cc#newcode51 client/crashpad_client_win.cc:51: // A `CRITICAL_SECTION` initialized with On 2015/10/15 00:14:56, Mark ...
5 years, 2 months ago (2015-10-15 18:22:23 UTC) #10
Mark Mentovai
It’s too bad that there’s so much plumbing required to make this work, but it’s ...
5 years, 2 months ago (2015-10-15 19:37:59 UTC) #11
scottmg
Yeah, I was disappointed at how much passing around there was, but I guess it's ...
5 years, 2 months ago (2015-10-15 20:06:41 UTC) #12
Mark Mentovai
LGTM https://codereview.chromium.org/1392093003/diff/160001/snapshot/win/process_snapshot_win.cc File snapshot/win/process_snapshot_win.cc (right): https://codereview.chromium.org/1392093003/diff/160001/snapshot/win/process_snapshot_win.cc#newcode311 snapshot/win/process_snapshot_win.cc:311: // not have a .DebugInfo list, but typically ...
5 years, 2 months ago (2015-10-15 20:14:41 UTC) #13
scottmg
5 years, 2 months ago (2015-10-15 20:18:14 UTC) #14
Message was sent while issue was closed.
Committed patchset #9 (id:180001) manually as
4893a9b76d68176ba08857003ea4281d918768cf (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698