New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 782258 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
please use my google.com address
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Chrome
Pri: 2
Type: Bug



Sign in to add a comment

browser crash in UdevLinux constructor

Reported by olivier....@canonical.com, Nov 7 2017

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/63.0.3239.30 Chrome/63.0.3239.30 Safari/537.36

Steps to reproduce the problem:
I cannot reproduce the problem myself, but that crash has been reported by a user of the Ubuntu chromium package. The top of the stacktrace is:

#0  0x000055e92c4b91a5 in UdevLinux () at ../../device/udev_linux/udev_linux.cc:20
#1  0x000055e92c4b7deb in Initialize () at ../../media/device_monitors/device_monitor_udev.cc:60
#2  0x000055e92dca3899 in Run () at ../../base/callback.h:64
#3  RunTask () at ../../base/debug/task_annotator.cc:65

It appears the call to CHECK(monitor_) in device::UdevLinux::UdevLinux(…) causes the browser to crash if monitor_ is null. According to the man page of udev_monitor_new_from_netlink, the function may fail and return a null pointer (although it's unclear why it would fail). I don't think the browser should crash in such a case, a polite error message would be better.

What is the expected behavior?
No hard crash.

What went wrong?
Browser crash because it failed to instantiate a udev monitor.

Crashed report ID: 

How much crashed? Whole browser

Is it a problem with a plugin? No 

Did this work before? N/A 

Chrome version: 62.0.3202.62  Channel: stable
OS Version: Ubuntu 17.10
Flash Version:
 
Components: Internals>Media
This is failing in the media code path. This crash is consistent with how chromium is written over to the media team to decided if failing to create a udev monitor should be fatal for them.
Cc: maxmorin@chromium.org olka@chromium.org
Components: -Internals>Media Blink>GetUserMedia
olka, max do you know who owns the device monitor code these days?
Cc: dalecur...@chromium.org
Components: -Blink>GetUserMedia Internals>Media>Capture
Cc: guidou@chromium.org mcasas@chromium.org
Labels: OS-Chrome
I don't think the code has an owner :). CCing some people from the git log.
Cc: perkj@chromium.org
Components: Blink>WebRTC
perkj@ does this ring a bell?

Comment 7 by perkj@chromium.org, Nov 9 2017

Owner: guidou@chromium.org
No, sorry I can say that it does. guidou@ is working in Chrome and have worked on device selection code. He might be a good owner to start with. 
Owner: roc...@chromium.org
rockot@: You are listed as UdevLinux owner. Can you help triage?

Comment 9 by roc...@chromium.org, Nov 10 2017

Status: Assigned (was: Unconfirmed)
So I suspect this can only happen in the event of a misconfigured Linux system, but I don't think CHECKing is the right thing to do. IMHO UdevLinux should fail silently in this case (at worst, a LOG(ERROR) to help bewildered users?)

I'll remove the CHECK.
Project Member

Comment 10 by bugdroid1@chromium.org, Nov 10 2017

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

commit fb9262d6d88054c12bbb3dc7239869a86a31686c
Author: Ken Rockot <rockot@chromium.org>
Date: Fri Nov 10 21:11:56 2017

Remove CHECKs from UdevLinux

We CHECK that udev intiailization succeeds, but this is not guaranteed.
A misconfigured system can thus effectively make Chrome unusable.

Instead, log an error but allow the browser to operate normally
otherwise.

Bug:  782258 
Change-Id: I217412e841d6622f3166542c1d6dc33d89d0f95d
Reviewed-on: https://chromium-review.googlesource.com/764116
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Commit-Queue: Ken Rockot <rockot@chromium.org>
Cr-Commit-Position: refs/heads/master@{#515682}
[modify] https://crrev.com/fb9262d6d88054c12bbb3dc7239869a86a31686c/device/gamepad/gamepad_platform_data_fetcher_linux.cc
[modify] https://crrev.com/fb9262d6d88054c12bbb3dc7239869a86a31686c/device/udev_linux/udev_linux.cc

Status: Fixed (was: Assigned)
Thanks Ken, that sounds sensible to me.

Sign in to add a comment