New issue
Advanced search Search tips

Issue 881886 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Dec 5
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

arc: Shelf button hangs in case of using context menu.

Project Member Reported by khmel@chromium.org, Sep 7

Issue description

I prepared the system that sends app shortcuts for context menu with a delay to emulate some edge case.

When I open context menu it is shown with a delay which is expected (Probably we might have reasonable timeout and show without ARC short cuts in this case)

However main problem is following.

If I activate/try to open context menu again, while it is not shown from previous case, shelf button hangs for forever.
 
Labels: M-70
I fixed this for the AppList, I will land a fix for the ShelfButton too. Thanks for reporting!
Labels: -M-70 M-71
I'm going to fix this in M-71 because without a large delay I cannot reproduce this. Khmel@ do you agree?
#2 Defer final decision to Vlad. I don't mind :)
Since this is not really reproducible without an artificial delay, I agree with targeting 71
Thanks all :)
Cc: apurvapanse@chromium.org
Status: Started (was: Untriaged)
Starting this one. 

apurvapanse@ can repro reliably, but only if a menu is shown during arc startup. It's hard to get right. 
#6 - to be honest I faced this few times when was actively pressing context menu trying to reproduce other crash.
Repro details:
We make one request to AppShortcutLauncherItemController::GetContextMenuItems, then there is some delay and we make a second request before the first response completes.

The first request never finishes (as expected).

This second request accomplishes everything, but when AppShortcutLauncherItemController runs the callback passed by ShelfView (ShelfView::AfterGetContextMenuItems), the callback does not reach ShelfView.

After getting the shelf in this state, I can't launch that specific shelf item, all communication with the ShelfItemDelegate stops at RemoteShelfItemDelegate because all calls to AppShorcutLauncherItemController (chrome side) fail silently.

I have a temporary fix for this[1] (preventing sending requests while one is processing) but the root cause here is not something I have been able to track down.

[1]
https://chromium-review.googlesource.com/c/chromium/src/+/1321729/


Project Member

Comment 9 by bugdroid1@chromium.org, Nov 7

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/000d99b6e182107fe67f368bce6cc61195eea4e6

commit 000d99b6e182107fe67f368bce6cc61195eea4e6
Author: Alex Newcomer <newcomer@chromium.org>
Date: Wed Nov 07 18:26:37 2018

cros: Fix hanging ShelfButton when showing two menus

This fix does not fix the root cause, but it will prevent the bug from
reproing on M-71.

Root cause fix can be tracked in the same bug.

Bug:  881886 
Change-Id: I83882f9d0a5725aad660ea8a6926dd3b689ad306
Reviewed-on: https://chromium-review.googlesource.com/c/1321729
Reviewed-by: Michael Wasserman <msw@chromium.org>
Commit-Queue: Alex Newcomer <newcomer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606080}
[modify] https://crrev.com/000d99b6e182107fe67f368bce6cc61195eea4e6/ash/app_list/views/app_list_item_view.cc
[modify] https://crrev.com/000d99b6e182107fe67f368bce6cc61195eea4e6/ash/app_list/views/app_list_item_view.h
[modify] https://crrev.com/000d99b6e182107fe67f368bce6cc61195eea4e6/ash/shelf/shelf_view.cc
[modify] https://crrev.com/000d99b6e182107fe67f368bce6cc61195eea4e6/ash/shelf/shelf_view.h

Labels: Merge-Request-71
Project Member

Comment 11 by sheriffbot@chromium.org, Nov 8

Labels: -Merge-Request-71 Hotlist-Merge-Review Merge-Review-71
This bug requires manual review: M71 has already been promoted to the beta branch, so this requires manual review
Please contact the milestone owner if you have questions.
Owners: benmason@(Android), kariahda@(iOS), kbleicher@(ChromeOS), govind@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Merge-Review-71 Merge-Approved-71
Approved for ChromeOS M71
Status: Fixed (was: Started)
ty sir
Labels: -Merge-Approved-71 Merge-Merged-71-3578
The following revision refers to this bug: 
https://chromium.googlesource.com/chromium/src.git/+/54c3f55c4aa933fe403d7be2ce4e26de893dab4d

Commit: 54c3f55c4aa933fe403d7be2ce4e26de893dab4d
Author: newcomer@chromium.org
Commiter: newcomer@chromium.org
Date: 2018-11-08 23:53:21 +0000 UTC

cros: Fix hanging ShelfButton when showing two menus

This fix does not fix the root cause, but it will prevent the bug from
reproing on M-71.

Root cause fix can be tracked in the same bug.

Bug:  881886 
Change-Id: I83882f9d0a5725aad660ea8a6926dd3b689ad306
Reviewed-on: https://chromium-review.googlesource.com/c/1321729
Reviewed-by: Michael Wasserman <msw@chromium.org>
Commit-Queue: Alex Newcomer <newcomer@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#606080}(cherry picked from commit 000d99b6e182107fe67f368bce6cc61195eea4e6)
Reviewed-on: https://chromium-review.googlesource.com/c/1327806
Reviewed-by: Alex Newcomer <newcomer@chromium.org>
Cr-Commit-Position: refs/branch-heads/3578@{#595}
Cr-Branched-From: 4226ddf99103e493d7afb23a4c7902ee496108b6-refs/heads/master@{#599034}
Project Member

Comment 15 by bugdroid1@chromium.org, Nov 8

Labels: merge-merged-3578
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/54c3f55c4aa933fe403d7be2ce4e26de893dab4d

commit 54c3f55c4aa933fe403d7be2ce4e26de893dab4d
Author: Alex Newcomer <newcomer@chromium.org>
Date: Thu Nov 08 23:53:21 2018

cros: Fix hanging ShelfButton when showing two menus

This fix does not fix the root cause, but it will prevent the bug from
reproing on M-71.

Root cause fix can be tracked in the same bug.

Bug:  881886 
Change-Id: I83882f9d0a5725aad660ea8a6926dd3b689ad306
Reviewed-on: https://chromium-review.googlesource.com/c/1321729
Reviewed-by: Michael Wasserman <msw@chromium.org>
Commit-Queue: Alex Newcomer <newcomer@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#606080}(cherry picked from commit 000d99b6e182107fe67f368bce6cc61195eea4e6)
Reviewed-on: https://chromium-review.googlesource.com/c/1327806
Reviewed-by: Alex Newcomer <newcomer@chromium.org>
Cr-Commit-Position: refs/branch-heads/3578@{#595}
Cr-Branched-From: 4226ddf99103e493d7afb23a4c7902ee496108b6-refs/heads/master@{#599034}
[modify] https://crrev.com/54c3f55c4aa933fe403d7be2ce4e26de893dab4d/ash/app_list/views/app_list_item_view.cc
[modify] https://crrev.com/54c3f55c4aa933fe403d7be2ce4e26de893dab4d/ash/app_list/views/app_list_item_view.h
[modify] https://crrev.com/54c3f55c4aa933fe403d7be2ce4e26de893dab4d/ash/shelf/shelf_view.cc
[modify] https://crrev.com/54c3f55c4aa933fe403d7be2ce4e26de893dab4d/ash/shelf/shelf_view.h

Status: Started (was: Fixed)
Actually, I'll keep this as "started" because I am still working on the root cause.
Labels: -M-71 M-72
Retargeting the correct fix for 72
Cc: msw@chromium.org newcomer@chromium.org
Owner: ----
Status: Available (was: Started)
I passed this off to MSW for expert mojo analysis. Happy to pick it back up whenever their investigations are done. For now, unnasigning myself so it doesn't falseley appear that I'm actively working on this.
Owner: msw@chromium.org
Status: Started (was: Available)
Thanks for expediently finding a good (short term?) fix here, Alex!
The symptoms should be effectively fixed by Alex's changes for M-71+.

I'm investigating possible additional protections against this defect.
Labels: -M-72 -m-72 M-73
Bulk moving <p-1's to the next milestone because we branched to M-73.
Labels: -M-73 M-72
(didn't mean to grab these P-1's)
Labels: -Pri-1 -M-72 M-73 Pri-2
Since we have plugged the hole (p-1), budging this to P-2 and moving the milestone.
Project Member

Comment 23 by bugdroid1@chromium.org, Dec 5

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8f86c04fb9973399551c357dbf94ec944579f434

commit 8f86c04fb9973399551c357dbf94ec944579f434
Author: Mike Wasserman <msw@chromium.org>
Date: Wed Dec 05 22:47:41 2018

mash: Avoid concurrent ShelfItem menu/selection requests.

Expands and refines the workaround from http://crrev.com/c/1321729
This avoids the same issue with delayed application menu responses.

Hide ink drops when user interactions are ignored.
Cancel any open menu when a new menu is to be shown.

Alternatively, we could have Chrome support concurrent menu requests.
(when the user quickly left/right clicks various shelf items)
Ash would need to decide which menu(s) to show and when.

Bug:  881886 
Change-Id: I3b90a8964cd4d7d8f54bdd2d8fd53b7169b148c4
Reviewed-on: https://chromium-review.googlesource.com/c/1333658
Reviewed-by: Alex Newcomer <newcomer@chromium.org>
Commit-Queue: Michael Wasserman <msw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#614146}
[modify] https://crrev.com/8f86c04fb9973399551c357dbf94ec944579f434/ash/shelf/shelf_button.cc
[modify] https://crrev.com/8f86c04fb9973399551c357dbf94ec944579f434/ash/shelf/shelf_view.cc
[modify] https://crrev.com/8f86c04fb9973399551c357dbf94ec944579f434/ash/shelf/shelf_view.h

Status: Fixed (was: Started)
Marking this fixed, I don't think we need to merge my latest change.
This workaround leaves users unable to select or get the menu for an item if another item is already hung doing that.
We can make the system more robust to delayed client-side responses and concurrent requests, but I'll punt on that for now.

Sign in to add a comment