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

Issue 1208733002: Fix cluster-fuzz regression when getting message from Worker (Closed)

Created:
5 years, 6 months ago by binji
Modified:
5 years, 6 months ago
CC:
v8-dev
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Fix cluster-fuzz regression when getting message from Worker The issue is that Worker.prototype.terminate was deleting the C++ Worker object, and then Worker.prototype.getMessage was trying to read messages from the queue. The simplest solution is to keep workers in a zombie state when they have been terminated. They won't be reaped until Shell::CleanupWorkers is called. I've also fixed some threading issues with Workers: * Workers can be created by another Worker, so the Shell::workers_ variable must be protected by a mutex. * An individual Worker can typically only be accessed by the isolate that created it, but the main thread can always terminate it, so the Worker::state_ must be accessed in a thread-safe way. BUG=chromium:504136 R=jochen@chromium.org LOG=n Committed: https://crrev.com/28b0129b03b50d0b29fc3c45452aced2f8bcbaf6 Cr-Commit-Position: refs/heads/master@{#29306}

Patch Set 1 #

Patch Set 2 : don't remove Worker from workers_ on terminate #

Unified diffs Side-by-side diffs Delta from patch set Stats (+110 lines, -66 lines) Patch
M src/d8.h View 3 chunks +6 lines, -0 lines 0 comments Download
M src/d8.cc View 1 11 chunks +75 lines, -45 lines 0 comments Download
M test/mjsunit/d8-worker.js View 1 chunk +8 lines, -0 lines 0 comments Download
A + test/mjsunit/d8-worker-spawn-worker.js View 2 chunks +17 lines, -17 lines 0 comments Download
A + test/mjsunit/regress/regress-crbug-504136.js View 1 chunk +4 lines, -4 lines 0 comments Download

Messages

Total messages: 6 (1 generated)
binji
5 years, 6 months ago (2015-06-25 01:07:28 UTC) #1
jochen (gone - plz use gerrit)
lgtm
5 years, 6 months ago (2015-06-25 09:35:30 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1208733002/20001
5 years, 6 months ago (2015-06-25 17:58:59 UTC) #4
commit-bot: I haz the power
Committed patchset #2 (id:20001)
5 years, 6 months ago (2015-06-25 18:01:15 UTC) #5
commit-bot: I haz the power
5 years, 6 months ago (2015-06-25 18:01:34 UTC) #6
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/28b0129b03b50d0b29fc3c45452aced2f8bcbaf6
Cr-Commit-Position: refs/heads/master@{#29306}

Powered by Google App Engine
This is Rietveld 408576698