New issue
Advanced search Search tips

Issue 922968 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Intermittent failures when connecting to a re-attached USB-C device

Project Member Reported by emaxx@chromium.org, Jan 17 (5 days ago)

Issue description

Chrome Version: 71.0.3578.94
OS: Chrome OS

What steps will reproduce the problem?
(1) Attach a smart card reader USB device via a USB-C port to the Google Pixel Slate ("nocturne").
(2) Run a Chrome app that uses the chrome.usb API, opens this smart card reader USB device and talks to it.
(3) Detach the smart card reader USB device.
(4) Attach the USB device back.
(5) Try to open a connection to the USB device using chrome.usb.openDevice().

What is the expected result?
chrome.usb.openDevice() completes successfully.

What happens instead?
Sometimes (at about 50% rate) chrome.usb.openDevice() fails with the error "Failed to open device.".
All repeated attempts to call openDevice() fail consistently with this error.
The only way to recover is to detach and reattach the USB device a few times, or to reboot the Chromebook.


If I'm reading logs correctly, the problem is that permission_broker decides to deny access to the device due to DenyClaimedUsbDeviceRule:

  2019-01-17T15:38:13.641541+01:00 INFO permission_broker[1689]: ProcessPath(/dev/bus/usb/001/005)
  2019-01-17T15:38:13.722671+01:00 INFO permission_broker[1689]:   AllowUsbDeviceRule: ALLOW
  2019-01-17T15:38:13.722689+01:00 INFO permission_broker[1689]:   AllowTtyDeviceRule: IGNORE
  2019-01-17T15:38:13.814185+01:00 INFO permission_broker[1689]:   DenyClaimedUsbDeviceRule: DENY
  2019-01-17T15:38:13.814210+01:00 INFO permission_broker[1689]: Verdict for /dev/bus/usb/001/005: DENY
  2019-01-17T15:38:13.814269+01:00 ERR permission_broker[1689]: OpenPath(...): Domain=permission_broker, Code=permission_denied, Message=Permission to open '/dev/bus/usb/001/005' denied

Please find complete logs attached (collected from a test Public Session account; however, the problem is also reproducible in normal user sessions).


I can reproduce the problem on a Google Pixel Slate device with a few different smart card readers (including both (a) USB-A devices attached via a USB-A-to-USB-C adapter and (b) USB-C devices). For some reason, I couldn't reproduce this on other Chromebooks using USB-A ports.
 
debug-logs_20190117-153824.tgz
2.4 MB Download

Sign in to add a comment