TaskManager DCHECK if displayed columns changes during sampling |
|||
Issue descriptionChrome Version: 57.0.2972.0 OS: Windows What steps will reproduce the problem? (1) Provoke TaskManager sampling to take a long time; in my case the SharedSampler had seemingly broken, so I was e.g. not getting any memory usage or idle wakeup updates. (2) Change the columns being displayed, i.e. enable or disable a column. I enabled the Process Priority Column This cause Chromium to hit a DCHECK due to the refresh_flags not matching (see screenshot).
,
Jan 5 2017
I'll see if I can repro this.
,
Jan 5 2017
I couldn't repro so far. The second column that was enabled was Idle Wakeups (512), not Priority as stated in repro steps. There is an assumption in SharedSampler that for any given cycle flags are the same for all processes. I guess what's going here is that the refresh on background thread is taking longer than one second for whatever reason and a new refresh cycle with a different set of columns starts before results are posted from the background thread. In that case it is possible fairly unlikely for the new mismatch flags passed with a new Refresh() call. I'll add a Sleep() in the sampler code to see if that helps to repro the bug. I guess this DCHECK could be safely removed. The worst that would happen is the new column results would be delayed by one cycle.
,
Jan 5 2017
Sorry, unreadable sentence - posted comment #3 before finishing editing it. What I meant to say is that if the background refresh is slow (delayed due to CPU scheduling) and a set of columns passed to SharedSampler has changed then yes, hitting this DCHECK is possible.
,
Jan 5 2017
Re #4: Yes, that was exactly the situation - SharedSampler had somehow got into an unresponsive state (I was not getting memory nor Idle Wakeups updates any more) and had been that way for several seconds. While in that state I added a new column, which was when things crashed. I wasn't able to repro the SharedSampler "hang" subsequently, though, so a Sleep is probably the best approximation!
,
Jan 5 2017
Reproduced DCHECK with an extra Sleep in the sampling code. Verified that removing the DCHECK is OK. The rest of the code handles this situation just fine.
,
Jan 6 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/929f43478f9acb732ce04c4a1209cf3cd1b7a582 commit 929f43478f9acb732ce04c4a1209cf3cd1b7a582 Author: stanisc <stanisc@chromium.org> Date: Fri Jan 06 17:15:10 2017 Removed errorneous DCHECK from TaskManager SharedSampler code The DCHECK could be triggered if sampling of results by SharedSampler on background thread took longer than refresh cycle (1 second) and at the same time user added or removed one of TaskManager columns handled by SharedSampler. This DCHECK was an errorneous assumption. I removed it and added a comment explaining this situation. BUG= 678471 Review-Url: https://codereview.chromium.org/2612773004 Cr-Commit-Position: refs/heads/master@{#441958} [modify] https://crrev.com/929f43478f9acb732ce04c4a1209cf3cd1b7a582/chrome/browser/task_manager/sampling/shared_sampler_win.cc
,
Jan 6 2017
|
|||
►
Sign in to add a comment |
|||
Comment 1 by afakhry@chromium.org
, Jan 5 2017Owner: stanisc@chromium.org
Status: Assigned (was: Untriaged)