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

Issue 2865283002: Reland of Linux: Disable DBus auto-launch (Closed)

Created:
3 years, 7 months ago by Primiano Tucci (use gerrit)
Modified:
3 years, 6 months ago
CC:
chromium-reviews, Ken Russell (switch to Gerrit), Rick Byers, johnchen, satorux, Lei Zhang, jam, satorux1, iclelland
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Reland of Linux: Disable DBus auto-launch (patchset #1 id:1 of https://codereview.chromium.org/2869843003/ ) Reason for reland: Adding TSan suppression. The race is independent of this CL, see crbug.com/719633 Original issue's description: > Revert of Linux: Disable DBus auto-launch (patchset #1 id:1 of https://codereview.chromium.org/2861163002/ ) > > Reason for revert: > Speculative revert -- the TSan bots have been reporting a data race when setting Envvars (in this case, appending to the python path to start a websocket server). The race appeared immediately after this patch landed, so it may be legitimate. Reverting this to see if it clears the failures up; if so, we'll probably just have to serialize the calls to setenv. > > Filed crbug.com/719633 for this as well. > > Original issue's description: > > Linux: Disable DBus auto-launch > > > > This is a workaround (ETA ~ 2-3 years) for libdbus not being multi-threading > > friendly and causing random hangs when running chrome outside of Linux > > desktop environments. > > > > Background: > > ----------- > > Typically, Linux desktop environments set the DBUS_SESSION_BUS_ADDRESS > > environment variable. This variable allows the dbus client library to > > directly connect to the existing bus, which is started by the desktop > > environment or systemd. > > When this variable is missing, the dbus client library will fallback > > to auto-launch mode [1], which causes 4 nested fork() + exec() calls. > > Doing this has two problems: (i) slows down startup; (ii) can hang > > the browser if the fork() happens while another thread is in a malloc() > > (Chrome's tcmalloc has no at-fork handlers). > > This situation (no env variable) is very common in test scenarios > > (browsertests, chromedriver, etc). > > > > Change introduced by this CL: > > ----------------------------- > > This CL sets the bus address env variable to "disabled:" if not set. > > This effectively shuts down the dbus auto-launch. If necessary, this > > behavior can be restored by setting, before launching chrome, > > DBUS_SESSION_BUS_ADDRESS="autolaunch:" . > > This workaround will be necessary until libdbus and gspawn are fixed > > to be multi-threading friendly [2,3] and that fix rolls into the > > various distributions. > > The change is introduced in the main embedder rather than in the > > google-chrome wrapper, as several binaries can be affected by this, > > for instance: > > - browser tests (http://crbug.com/693668) > > - chrome --headless > > - webdriver/selenium which seem to directly invoke "chrome" > > see https://github.com/SeleniumHQ/docker-selenium/issues/87 > > > > [1] https://dbus.freedesktop.org/doc/dbus-launch.1.html > > [2] https://bugs.freedesktop.org/show_bug.cgi?id=100843 > > [3] https://bugs.chromium.org/p/chromedriver/issues/detail?id=1699 > > > > BUG=715658, 695643, 713947 > > TEST=strace -ff -o trace chrome; grep dbus-launch trace* > > > > Review-Url: https://codereview.chromium.org/2861163002 > > Cr-Commit-Position: refs/heads/master@{#469987} > > Committed: https://chromium.googlesource.com/chromium/src/+/8511820ec8280caacbd4f81f3ecd13b6c61681b0 > Review-Url: https://codereview.chromium.org/2869843003 > Cr-Commit-Position: refs/heads/master@{#470059} > Committed: https://chromium.googlesource.com/chromium/src/+/1e78cb7863da28bb3411286cdbcc4fb4510ce173 BUG=715658, 695643, 713947, 719633 TBR=satorux@google.com,thestig@chromium.org,jam@chromium.org Review-Url: https://codereview.chromium.org/2865283002 Cr-Commit-Position: refs/heads/master@{#470301} Committed: https://chromium.googlesource.com/chromium/src/+/2fc330d0b93d4bfd7bd04b9fdd3102e529901f91

Patch Set 1 #

Patch Set 2 : add suppression #

Patch Set 3 : fix test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+339 lines, -419 lines) Patch
M base/BUILD.gn View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M base/trace_event/memory_dump_manager.h View 1 2 3 chunks +7 lines, -6 lines 0 comments Download
M base/trace_event/memory_dump_manager.cc View 1 2 7 chunks +16 lines, -10 lines 0 comments Download
A base/trace_event/memory_dump_manager_test_utils.h View 1 2 1 chunk +46 lines, -0 lines 0 comments Download
M base/trace_event/memory_dump_manager_unittest.cc View 1 2 48 chunks +254 lines, -369 lines 0 comments Download
M net/url_request/url_request_quic_perftest.cc View 1 2 3 chunks +13 lines, -31 lines 0 comments Download
M services/resource_coordinator/memory_instrumentation/coordinator_impl.cc View 1 2 2 chunks +2 lines, -3 lines 0 comments Download

Messages

Total messages: 17 (10 generated)
Primiano Tucci (use gerrit)
Created Reland of Linux: Disable DBus auto-launch
3 years, 7 months ago (2017-05-09 10:58:01 UTC) #1
Primiano Tucci (use gerrit)
+glider for the new suppression TBR-ing others as this is a reland as-is
3 years, 7 months ago (2017-05-09 11:19:13 UTC) #5
_com_google_glider
On 2017/05/09 11:19:13, Primiano Tucci wrote: > +glider for the new suppression > TBR-ing others ...
3 years, 7 months ago (2017-05-09 11:23:04 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2865283002/40001
3 years, 7 months ago (2017-05-09 11:25:17 UTC) #8
commit-bot: I haz the power
No L-G-T-M from a valid reviewer yet. CQ run can only be started once the ...
3 years, 7 months ago (2017-05-09 11:25:19 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2865283002/40001
3 years, 7 months ago (2017-05-09 11:34:31 UTC) #14
commit-bot: I haz the power
3 years, 7 months ago (2017-05-09 13:07:30 UTC) #17
Message was sent while issue was closed.
Committed patchset #2 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/2fc330d0b93d4bfd7bd04b9fdd31...

Powered by Google App Engine
This is Rietveld 408576698