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

Issue 1326443007: win: Fix incorrect thread suspend count due to ScopedProcessSuspend (Closed)

Created:
5 years, 3 months ago by scottmg
Modified:
5 years, 3 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: Fix incorrect thread suspend count due to ScopedProcessSuspend After https://codereview.chromium.org/1303173011/, the thread suspend count would be one too large because the count is adjusted when the process is suspended. Counteract this by passing in whether the process is suspended or not so that the thread's suspension count can be adjusted. Add a test to sanity-check thread suspend count. R=mark@chromium.org Committed: https://chromium.googlesource.com/crashpad/crashpad/+/d7f90b45b6318eb3e54002aa52bfd579e5346852

Patch Set 1 #

Patch Set 2 : pass in state #

Total comments: 10

Patch Set 3 : fixes #

Total comments: 4

Patch Set 4 : assert some threads captured #

Unified diffs Side-by-side diffs Delta from patch set Stats (+114 lines, -20 lines) Patch
M handler/win/crash_report_exception_handler.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M snapshot/crashpad_info_client_options_test.cc View 1 2 chunks +4 lines, -2 lines 0 comments Download
M snapshot/win/exception_snapshot_win_test.cc View 1 2 2 chunks +3 lines, -1 line 0 comments Download
M snapshot/win/pe_image_annotations_reader_test.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M snapshot/win/pe_image_reader_test.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M snapshot/win/process_reader_win.h View 1 2 3 chunks +17 lines, -1 line 0 comments Download
M snapshot/win/process_reader_win.cc View 1 2 6 chunks +13 lines, -5 lines 0 comments Download
M snapshot/win/process_reader_win_test.cc View 1 2 3 5 chunks +57 lines, -3 lines 0 comments Download
M snapshot/win/process_snapshot_win.h View 1 2 1 chunk +5 lines, -1 line 0 comments Download
M snapshot/win/process_snapshot_win.cc View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M snapshot/win/system_snapshot_win_test.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M tools/generate_dump.cc View 1 1 chunk +4 lines, -1 line 0 comments Download

Messages

Total messages: 11 (0 generated)
scottmg
5 years, 3 months ago (2015-09-09 00:13:16 UTC) #1
Mark Mentovai
A static map, a mutex to protect it…hmm. I think that seems a little intense ...
5 years, 3 months ago (2015-09-09 17:45:36 UTC) #2
scottmg
On 2015/09/09 17:45:36, Mark Mentovai - August is over wrote: > A static map, a ...
5 years, 3 months ago (2015-09-09 18:06:31 UTC) #3
Mark Mentovai
The assertion would be OK, except it breaks the generate_dump --no-suspend thing, which is mostly ...
5 years, 3 months ago (2015-09-09 18:09:11 UTC) #4
scottmg
On 2015/09/09 18:09:11, Mark Mentovai - August is over wrote: > The assertion would be ...
5 years, 3 months ago (2015-09-09 18:43:36 UTC) #5
Mark Mentovai
https://codereview.chromium.org/1326443007/diff/20001/snapshot/win/process_reader_win.cc File snapshot/win/process_reader_win.cc (right): https://codereview.chromium.org/1326443007/diff/20001/snapshot/win/process_reader_win.cc#newcode133 snapshot/win/process_reader_win.cc:133: thread->suspend_count = 0; LOG(ERROR) or DCHECK() if the suspension ...
5 years, 3 months ago (2015-09-09 18:57:27 UTC) #6
scottmg
https://codereview.chromium.org/1326443007/diff/20001/snapshot/win/process_reader_win.cc File snapshot/win/process_reader_win.cc (right): https://codereview.chromium.org/1326443007/diff/20001/snapshot/win/process_reader_win.cc#newcode133 snapshot/win/process_reader_win.cc:133: thread->suspend_count = 0; On 2015/09/09 18:57:27, Mark Mentovai - ...
5 years, 3 months ago (2015-09-09 19:13:25 UTC) #7
Mark Mentovai
LGTM https://codereview.chromium.org/1326443007/diff/40001/snapshot/win/process_reader_win.cc File snapshot/win/process_reader_win.cc (right): https://codereview.chromium.org/1326443007/diff/40001/snapshot/win/process_reader_win.cc#newcode133 snapshot/win/process_reader_win.cc:133: DCHECK(suspension_state == ProcessSuspensionState::kRunning); scottmg wrote: > dcheck_eq fails ...
5 years, 3 months ago (2015-09-09 19:22:11 UTC) #8
scottmg
https://codereview.chromium.org/1326443007/diff/40001/snapshot/win/process_reader_win_test.cc File snapshot/win/process_reader_win_test.cc (right): https://codereview.chromium.org/1326443007/diff/40001/snapshot/win/process_reader_win_test.cc#newcode143 snapshot/win/process_reader_win_test.cc:143: EXPECT_EQ(0u, thread.suspend_count); On 2015/09/09 19:22:11, Mark Mentovai - August ...
5 years, 3 months ago (2015-09-09 19:28:00 UTC) #9
scottmg
Committed patchset #4 (id:60001) manually as d7f90b45b6318eb3e54002aa52bfd579e5346852 (presubmit successful).
5 years, 3 months ago (2015-09-09 19:29:36 UTC) #10
Mark Mentovai
5 years, 3 months ago (2015-09-09 19:29:50 UTC) #11
Message was sent while issue was closed.
LGTM

Powered by Google App Engine
This is Rietveld 408576698