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

Issue 1834463002: Identify the hung thread using the Wait Chain Traversal API (Closed)

Created:
4 years, 9 months ago by Patrick Monette
Modified:
4 years, 8 months ago
CC:
chromium-reviews, manzagop (departed)
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Identify the hung thread using the Wait Chain Traversal API The exception record will be created for the culprit thread to get better bucketing on the crash back-end. BUG=485152, 478209 Committed: https://crrev.com/050187d61ed4be68072eb84ff864943aaf6e5d90 Cr-Commit-Position: refs/heads/master@{#387369}

Patch Set 1 : #

Total comments: 32

Patch Set 2 : Addressed comments/questions #

Total comments: 7

Patch Set 3 : Move wait chain to base and added test + fix nits #

Total comments: 21

Patch Set 4 : Siggi comments #

Total comments: 2

Patch Set 5 : Added dcheck #

Total comments: 20

Patch Set 6 : Grt comments #

Total comments: 4

Patch Set 7 : Sign mismatch + base::string16 #

Patch Set 8 : Rebase #

Total comments: 3

Patch Set 9 : Fixed channel misconception #

Patch Set 10 : Fixed logic error #

Patch Set 11 : Make use of copy elision #

Total comments: 2

Patch Set 12 : Fixed unit test #

Patch Set 13 : BASE_EXPORT #

Unified diffs Side-by-side diffs Delta from patch set Stats (+582 lines, -28 lines) Patch
M base/BUILD.gn View 1 2 3 4 5 6 7 2 chunks +3 lines, -0 lines 0 comments Download
M base/base.gyp View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M base/base.gypi View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
A base/win/wait_chain.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +37 lines, -0 lines 0 comments Download
A base/win/wait_chain.cc View 1 2 3 4 5 6 7 1 chunk +135 lines, -0 lines 0 comments Download
A base/win/wait_chain_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +318 lines, -0 lines 0 comments Download
M chrome/browser/process_singleton_win.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -4 lines 0 comments Download
M chrome/chrome_watcher/chrome_watcher_main.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -4 lines 0 comments Download
M chrome/chrome_watcher/kasko_util.cc View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +72 lines, -14 lines 0 comments Download
M chrome/test/kasko/hang_watcher_integration_test.py View 1 2 3 4 5 6 7 8 2 chunks +10 lines, -6 lines 0 comments Download

Messages

Total messages: 56 (20 generated)
Patrick Monette
Hey Siggi can you take a look? This will find the hung thread generate the ...
4 years, 9 months ago (2016-03-23 21:20:26 UTC) #3
Sigurður Ásgeirsson
looks nice - I have some nits, plus it'd be great to have a test ...
4 years, 9 months ago (2016-03-24 19:30:18 UTC) #4
manzagop (departed)
Nice! Some comments/ questions! https://codereview.chromium.org/1834463002/diff/20001/chrome/chrome_watcher/chrome_watcher_main.cc File chrome/chrome_watcher/chrome_watcher_main.cc (right): https://codereview.chromium.org/1834463002/diff/20001/chrome/chrome_watcher/chrome_watcher_main.cc#newcode240 chrome/chrome_watcher/chrome_watcher_main.cc:240: DCHECK(crash_keys); DCHECK the others as ...
4 years, 9 months ago (2016-03-24 19:36:37 UTC) #6
Patrick Monette
PTAL Another look. I'll add a test to the wait chain stuff in a following ...
4 years, 9 months ago (2016-03-24 23:21:04 UTC) #7
Patrick Monette
s/PTAL/Please take
4 years, 9 months ago (2016-03-24 23:26:58 UTC) #8
manzagop (departed)
Two more questions! https://codereview.chromium.org/1834463002/diff/40001/chrome/chrome_watcher/chrome_watcher_main.cc File chrome/chrome_watcher/chrome_watcher_main.cc (right): https://codereview.chromium.org/1834463002/diff/40001/chrome/chrome_watcher/chrome_watcher_main.cc#newcode267 chrome/chrome_watcher/chrome_watcher_main.cc:267: if (GetThreadWaitChain(main_thread_id, &wait_chain, &is_deadlock)) { IIUC ...
4 years, 8 months ago (2016-03-29 13:57:48 UTC) #9
Sigurður Ásgeirsson
I think it'd be great to write that test to assess the truth to those ...
4 years, 8 months ago (2016-03-29 16:57:32 UTC) #10
manzagop (departed)
https://chromiumcodereview.appspot.com/1834463002/diff/40001/chrome/chrome_watcher/chrome_watcher_main.cc File chrome/chrome_watcher/chrome_watcher_main.cc (right): https://chromiumcodereview.appspot.com/1834463002/diff/40001/chrome/chrome_watcher/chrome_watcher_main.cc#newcode245 chrome/chrome_watcher/chrome_watcher_main.cc:245: std::wcsncpy(crash_key.name, key, kasko::api::CrashKey::kNameMaxLength); Do you need a -1 to ...
4 years, 8 months ago (2016-03-31 20:24:45 UTC) #11
Patrick Monette
Take another look please. I plan to reuse PA's code to check the process id ...
4 years, 8 months ago (2016-04-05 19:03:12 UTC) #14
Sigurður Ásgeirsson
nice! https://codereview.chromium.org/1834463002/diff/100001/base/win/wait_chain_unittest.cc File base/win/wait_chain_unittest.cc (right): https://codereview.chromium.org/1834463002/diff/100001/base/win/wait_chain_unittest.cc#newcode33 base/win/wait_chain_unittest.cc:33: std::string switch_name) { nit: StringPiece here avoids string ...
4 years, 8 months ago (2016-04-05 20:07:02 UTC) #15
Patrick Monette
PTAL https://codereview.chromium.org/1834463002/diff/100001/base/win/wait_chain_unittest.cc File base/win/wait_chain_unittest.cc (right): https://codereview.chromium.org/1834463002/diff/100001/base/win/wait_chain_unittest.cc#newcode33 base/win/wait_chain_unittest.cc:33: std::string switch_name) { On 2016/04/05 20:07:01, Sigurður Ásgeirsson ...
4 years, 8 months ago (2016-04-05 22:55:31 UTC) #17
Sigurður Ásgeirsson
lgtm - sweet! https://codereview.chromium.org/1834463002/diff/100001/base/win/wait_chain_unittest.cc File base/win/wait_chain_unittest.cc (right): https://codereview.chromium.org/1834463002/diff/100001/base/win/wait_chain_unittest.cc#newcode33 base/win/wait_chain_unittest.cc:33: std::string switch_name) { On 2016/04/05 22:55:31, ...
4 years, 8 months ago (2016-04-06 14:57:46 UTC) #18
manzagop (departed)
Looking good % your donotcommit (blocked on me)! https://codereview.chromium.org/1834463002/diff/140001/chrome/chrome_watcher/chrome_watcher_main.cc File chrome/chrome_watcher/chrome_watcher_main.cc (right): https://codereview.chromium.org/1834463002/diff/140001/chrome/chrome_watcher/chrome_watcher_main.cc#newcode278 chrome/chrome_watcher/chrome_watcher_main.cc:278: } ...
4 years, 8 months ago (2016-04-06 14:58:09 UTC) #19
Patrick Monette
https://codereview.chromium.org/1834463002/diff/140001/chrome/chrome_watcher/chrome_watcher_main.cc File chrome/chrome_watcher/chrome_watcher_main.cc (right): https://codereview.chromium.org/1834463002/diff/140001/chrome/chrome_watcher/chrome_watcher_main.cc#newcode278 chrome/chrome_watcher/chrome_watcher_main.cc:278: } On 2016/04/06 14:58:08, manzagop wrote: > nit: DCHECK_NE(it, ...
4 years, 8 months ago (2016-04-06 22:24:24 UTC) #20
Patrick Monette
grt@ PTAL at base/win.
4 years, 8 months ago (2016-04-08 14:42:49 UTC) #22
Patrick Monette
@thakis Need owners approval for base/ build files.
4 years, 8 months ago (2016-04-08 14:47:58 UTC) #23
Patrick Monette
thakis@ Forgot to add you as reviewer. Can you please take a look at base/ ...
4 years, 8 months ago (2016-04-08 14:54:00 UTC) #25
grt (UTC plus 2)
très cool https://codereview.chromium.org/1834463002/diff/160001/base/win/wait_chain.cc File base/win/wait_chain.cc (right): https://codereview.chromium.org/1834463002/diff/160001/base/win/wait_chain.cc#newcode20 base/win/wait_chain.cc:20: void operator()(HWCT session_handle) { const methods https://codereview.chromium.org/1834463002/diff/160001/base/win/wait_chain.cc#newcode24 ...
4 years, 8 months ago (2016-04-12 14:31:12 UTC) #26
Patrick Monette
PTAL https://codereview.chromium.org/1834463002/diff/160001/base/win/wait_chain.cc File base/win/wait_chain.cc (right): https://codereview.chromium.org/1834463002/diff/160001/base/win/wait_chain.cc#newcode20 base/win/wait_chain.cc:20: void operator()(HWCT session_handle) { On 2016/04/12 14:31:12, grt ...
4 years, 8 months ago (2016-04-12 19:13:01 UTC) #27
grt (UTC plus 2)
lgtm
4 years, 8 months ago (2016-04-12 19:30:45 UTC) #28
Nico
lgtm with comments https://codereview.chromium.org/1834463002/diff/180001/base/win/wait_chain.h File base/win/wait_chain.h (right): https://codereview.chromium.org/1834463002/diff/180001/base/win/wait_chain.h#newcode29 base/win/wait_chain.h:29: std::wstring WaitChainNodeToString(const WAITCHAIN_NODE_INFO& node); prefer string16 ...
4 years, 8 months ago (2016-04-12 19:55:17 UTC) #29
Patrick Monette
Thanks. I've sent a try job to win_clang and will check the CQ if it ...
4 years, 8 months ago (2016-04-12 21:47:48 UTC) #30
Patrick Monette
Nvm I forgot I have a do not commit. Still waiting on manzagop's CL.
4 years, 8 months ago (2016-04-12 21:48:55 UTC) #31
manzagop (departed)
One more question. https://codereview.chromium.org/1834463002/diff/220001/chrome/chrome_watcher/kasko_util.cc File chrome/chrome_watcher/kasko_util.cc (right): https://codereview.chromium.org/1834463002/diff/220001/chrome/chrome_watcher/kasko_util.cc#newcode153 chrome/chrome_watcher/kasko_util.cc:153: auto current_process = base::Process::Open(it->ThreadObject.ProcessId); Is this ...
4 years, 8 months ago (2016-04-13 20:47:36 UTC) #32
Patrick Monette
https://codereview.chromium.org/1834463002/diff/220001/chrome/chrome_watcher/kasko_util.cc File chrome/chrome_watcher/kasko_util.cc (right): https://codereview.chromium.org/1834463002/diff/220001/chrome/chrome_watcher/kasko_util.cc#newcode153 chrome/chrome_watcher/kasko_util.cc:153: auto current_process = base::Process::Open(it->ThreadObject.ProcessId); On 2016/04/13 20:47:36, manzagop wrote: ...
4 years, 8 months ago (2016-04-13 20:51:12 UTC) #33
Patrick Monette
https://codereview.chromium.org/1834463002/diff/220001/chrome/chrome_watcher/kasko_util.cc File chrome/chrome_watcher/kasko_util.cc (right): https://codereview.chromium.org/1834463002/diff/220001/chrome/chrome_watcher/kasko_util.cc#newcode153 chrome/chrome_watcher/kasko_util.cc:153: auto current_process = base::Process::Open(it->ThreadObject.ProcessId); On 2016/04/13 20:51:11, Patrick Monette ...
4 years, 8 months ago (2016-04-13 21:21:23 UTC) #34
manzagop (departed)
lgtm Can you add bug 478209 to the list of related bugs?
4 years, 8 months ago (2016-04-13 21:35:43 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1834463002/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1834463002/260001
4 years, 8 months ago (2016-04-13 21:40:02 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1834463002/280001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1834463002/280001
4 years, 8 months ago (2016-04-13 22:28:42 UTC) #42
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_compile_dbg_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_compile_dbg_ng/builds/174244)
4 years, 8 months ago (2016-04-13 23:27:52 UTC) #44
grt (UTC plus 2)
https://codereview.chromium.org/1834463002/diff/280001/chrome/chrome_watcher/kasko_util.cc File chrome/chrome_watcher/kasko_util.cc (right): https://codereview.chromium.org/1834463002/diff/280001/chrome/chrome_watcher/kasko_util.cc#newcode154 chrome/chrome_watcher/kasko_util.cc:154: *process = std::move(current_process); #include <utility> for this
4 years, 8 months ago (2016-04-14 13:11:45 UTC) #45
Patrick Monette
https://codereview.chromium.org/1834463002/diff/280001/chrome/chrome_watcher/kasko_util.cc File chrome/chrome_watcher/kasko_util.cc (right): https://codereview.chromium.org/1834463002/diff/280001/chrome/chrome_watcher/kasko_util.cc#newcode154 chrome/chrome_watcher/kasko_util.cc:154: *process = std::move(current_process); On 2016/04/14 13:11:45, grt wrote: > ...
4 years, 8 months ago (2016-04-14 16:32:57 UTC) #46
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1834463002/300001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1834463002/300001
4 years, 8 months ago (2016-04-14 16:33:24 UTC) #49
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1834463002/320001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1834463002/320001
4 years, 8 months ago (2016-04-14 17:13:38 UTC) #52
commit-bot: I haz the power
Committed patchset #13 (id:320001)
4 years, 8 months ago (2016-04-14 18:17:14 UTC) #54
commit-bot: I haz the power
4 years, 8 months ago (2016-04-14 18:18:23 UTC) #56
Message was sent while issue was closed.
Patchset 13 (id:??) landed as
https://crrev.com/050187d61ed4be68072eb84ff864943aaf6e5d90
Cr-Commit-Position: refs/heads/master@{#387369}

Powered by Google App Engine
This is Rietveld 408576698