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

Issue 10830149: Kill pnacl translation processes immediately on coordinator error and destruction (Closed)

Created:
8 years, 4 months ago by Derek Schuff
Modified:
8 years, 4 months ago
CC:
chromium-reviews, native-client-reviews_googlegroups.com
Visibility:
Public.

Description

Kill pnacl translation processes immediately on coordinator error and destruction On errors and destruction, use the service_runtime object in the subprocess to kill the translator processes immediately rather than just signaling the translation thread, which may be blocked on an RPC. Any pending or new RPC calls will fail immediately, and the translation thread can simply bail. This makes destruction/surfaway much faster and more responsive and simplifies error handling and object cleanup. The only caveat is that now the translation thread and NaClSubprocess must be careful not to race service runtime operations (which are protected by subprocess_mu_) with RPCs (which are called without a mutex because they block). This is currently already ensured because srpc_client is a separate object from service_runtime in NaClSubprocess. R=sehr@chromium.org,jvoung@chromium.org,robertm@chromium.org BUG= http://code.google.com/p/nativeclient/issues/detail?id=2195 TEST=nacl_integration (especially pnacl_bad_browser_test) Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=149982

Patch Set 1 #

Patch Set 2 : #

Total comments: 4

Patch Set 3 : ensure idempotency #

Patch Set 4 : rebase #

Patch Set 5 : re-rebase #

Patch Set 6 : fix #

Patch Set 7 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+111 lines, -117 lines) Patch
M ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc View 4 3 chunks +3 lines, -5 lines 0 comments Download
M ppapi/native_client/src/trusted/plugin/pnacl_translate_thread.h View 1 2 4 2 chunks +14 lines, -21 lines 0 comments Download
M ppapi/native_client/src/trusted/plugin/pnacl_translate_thread.cc View 1 2 4 5 6 9 chunks +84 lines, -84 lines 0 comments Download
M ppapi/native_client/src/trusted/plugin/srpc_client.h View 2 chunks +3 lines, -0 lines 0 comments Download
M ppapi/native_client/src/trusted/plugin/srpc_client.cc View 1 chunk +7 lines, -7 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
Derek Schuff
8 years, 4 months ago (2012-08-02 22:50:43 UTC) #1
jvoung (off chromium)
one question but otherwise looks pretty good https://chromiumcodereview.appspot.com/10830149/diff/2001/ppapi/native_client/src/trusted/plugin/pnacl_translate_thread.cc File ppapi/native_client/src/trusted/plugin/pnacl_translate_thread.cc (right): https://chromiumcodereview.appspot.com/10830149/diff/2001/ppapi/native_client/src/trusted/plugin/pnacl_translate_thread.cc#newcode288 ppapi/native_client/src/trusted/plugin/pnacl_translate_thread.cc:288: if (llc_subprocess_ ...
8 years, 4 months ago (2012-08-02 23:24:10 UTC) #2
Derek Schuff
https://chromiumcodereview.appspot.com/10830149/diff/2001/ppapi/native_client/src/trusted/plugin/pnacl_translate_thread.cc File ppapi/native_client/src/trusted/plugin/pnacl_translate_thread.cc (right): https://chromiumcodereview.appspot.com/10830149/diff/2001/ppapi/native_client/src/trusted/plugin/pnacl_translate_thread.cc#newcode288 ppapi/native_client/src/trusted/plugin/pnacl_translate_thread.cc:288: if (llc_subprocess_ != NULL) llc_subprocess_->service_runtime()->Shutdown(); I *think* so, but ...
8 years, 4 months ago (2012-08-02 23:46:45 UTC) #3
jvoung (off chromium)
lgtm
8 years, 4 months ago (2012-08-02 23:54:42 UTC) #4
Derek Schuff
On 2012/08/02 23:54:42, jvoung (chromium) wrote: > lgtm OK, this should be the same as ...
8 years, 4 months ago (2012-08-03 22:35:59 UTC) #5
jvoung (off chromium)
On 2012/08/03 22:35:59, dschuff wrote: > On 2012/08/02 23:54:42, jvoung (chromium) wrote: > > lgtm ...
8 years, 4 months ago (2012-08-03 22:42:15 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dschuff@chromium.org/10830149/11002
8 years, 4 months ago (2012-08-03 22:45:10 UTC) #7
commit-bot: I haz the power
8 years, 4 months ago (2012-08-04 00:17:28 UTC) #8
Change committed as 149982

Powered by Google App Engine
This is Rietveld 408576698