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

Issue 231493002: libevent: fix race in the common case. (Closed)

Created:
6 years, 8 months ago by agl
Modified:
6 years, 8 months ago
CC:
chromium-reviews
Visibility:
Public.

Description

libevent: fix race in the common case. There's a small race in the libevent code: it tests whether the monotonic clock works and, if so, uses it and skips time-warp detection. However, the flag is a static and thus causes a race. We don't want to lose the ability to skip time-warp detection when the system has a monotonic clock because we expect the vast majority of systems to have it. But I'm not quite confident enough to remove support for systems without it yet. Thus this patch moves the race so that it only triggers on old systems that don't have a monotonic clock. It's still there because we don't have easy access to a "once" object this far down and we don't want to add a static init function. But it will stop triggering the detectors and only arise on very old systems. BUG=360449 R=jln@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=262853

Patch Set 1 #

Total comments: 2

Patch Set 2 : ... #

Unified diffs Side-by-side diffs Delta from patch set Stats (+72 lines, -19 lines) Patch
M third_party/libevent/README.chromium View 1 chunk +1 line, -1 line 0 comments Download
M third_party/libevent/chromium.patch View 1 1 chunk +65 lines, -0 lines 0 comments Download
M third_party/libevent/event.c View 1 4 chunks +6 lines, -18 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
agl
6 years, 8 months ago (2014-04-09 18:46:28 UTC) #1
jln (very slow on Chromium)
lgtm, but not sure why you inverted the polarity on use_monotonic. For integers, no static ...
6 years, 8 months ago (2014-04-09 20:13:08 UTC) #2
agl
https://codereview.chromium.org/231493002/diff/1/third_party/libevent/event.c File third_party/libevent/event.c (right): https://codereview.chromium.org/231493002/diff/1/third_party/libevent/event.c#newcode110 third_party/libevent/event.c:110: static int no_monotonic_clock = 0; On 2014/04/09 20:13:09, jln ...
6 years, 8 months ago (2014-04-09 20:25:20 UTC) #3
agl
The CQ bit was checked by agl@chromium.org
6 years, 8 months ago (2014-04-09 20:25:44 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/agl@chromium.org/231493002/20001
6 years, 8 months ago (2014-04-09 20:26:13 UTC) #5
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-09 21:06:00 UTC) #6
commit-bot: I haz the power
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_presubmit&number=60461
6 years, 8 months ago (2014-04-09 21:06:00 UTC) #7
agl
6 years, 8 months ago (2014-04-09 23:21:10 UTC) #8
Message was sent while issue was closed.
Committed patchset #2 manually as r262853.

Powered by Google App Engine
This is Rietveld 408576698