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

Issue 1153293003: NaCl cleanup: Stop connecting to the SRPC trusted command channel (Closed)

Created:
5 years, 6 months ago by Mark Seaborn
Modified:
5 years, 6 months ago
CC:
chromium-reviews, bradnelson, gdeepti
Base URL:
http://git.chromium.org/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

NaCl cleanup: Stop connecting to the SRPC trusted command channel Before this change, the SetupCommand() call in service_runtime.cc connected to the SRPC trusted command channel. We replace this with a subset of what SetupCommand() did. (Note that the renderer can still connect to the *untrusted* SRPC command channel, which is used by the PNaCl translator.) Before, we were not sending any messages on the trusted command channel, but the NaCl loader process was detecting EOF on the channel and exiting in response (via a call to NaClAppShutdown() in nacl_secure_service.c). We replace this with new logic in nacl_trusted_listener.cc which detects EOF on a Chrome IPC channel. * This happens to be tested indirectly via tests for the GDB debug stub. They hang if the NaCl loader process sticks around after an <embed> element is deleted. * This change changes the debug stub's behaviour slightly: If a NaCl process is forcibly terminated (such as by its <embed> being deleted), GDB will get an EOF on the debug socket without seeing a SIGKILL (-9) exit status being reported first. I'm not sure it's worthwhile doing the extra plumbing to keep the original "-9" status reporting (which was added for https://crbug.com/157881). Before, GDB prints: Program terminated with signal SIGKILL, Killed. The program no longer exists. After, GDB prints: Remote connection closed * Remove the existing OnChannelError() because it never gets called. A call to it get queued on the main thread, but the main thread gets blocked in NaClChromeMainAppStart(). BUG=496287 TEST=debug stub tests: NaClGdbDebugStubTest.*, NaClBrowserTestPnaclDebug.* Committed: https://crrev.com/2eeecfc4babe46bef3a1a4946a6a77e17b9179fa Cr-Commit-Position: refs/heads/master@{#334097}

Patch Set 1 #

Patch Set 2 : Make tests pass #

Total comments: 6

Patch Set 3 : Restore error reporting #

Patch Set 4 : Remove uncalled OnChannelError() #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+58 lines, -17 lines) Patch
M chrome/test/data/nacl/debug_stub_browser_tests.py View 1 3 chunks +15 lines, -6 lines 0 comments Download
M chrome/test/data/nacl/gdb_rsp.py View 1 2 chunks +7 lines, -0 lines 2 comments Download
M components/nacl/loader/nacl_trusted_listener.h View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M components/nacl/loader/nacl_trusted_listener.cc View 1 2 3 3 chunks +27 lines, -4 lines 0 comments Download
M components/nacl/renderer/plugin/service_runtime.h View 1 1 chunk +0 lines, -1 line 0 comments Download
M components/nacl/renderer/plugin/service_runtime.cc View 1 2 3 chunks +9 lines, -5 lines 0 comments Download

Messages

Total messages: 26 (9 generated)
Mark Seaborn
5 years, 6 months ago (2015-06-08 23:19:25 UTC) #2
jvoung (off chromium)
lgtm https://codereview.chromium.org/1153293003/diff/20001/components/nacl/loader/nacl_trusted_listener.cc File components/nacl/loader/nacl_trusted_listener.cc (right): https://codereview.chromium.org/1153293003/diff/20001/components/nacl/loader/nacl_trusted_listener.cc#newcode18 components/nacl/loader/nacl_trusted_listener.cc:18: void OnChannelError() override { It wasn't too clear ...
5 years, 6 months ago (2015-06-09 15:43:44 UTC) #3
Mark Seaborn
https://codereview.chromium.org/1153293003/diff/20001/components/nacl/loader/nacl_trusted_listener.cc File components/nacl/loader/nacl_trusted_listener.cc (right): https://codereview.chromium.org/1153293003/diff/20001/components/nacl/loader/nacl_trusted_listener.cc#newcode18 components/nacl/loader/nacl_trusted_listener.cc:18: void OnChannelError() override { On 2015/06/09 15:43:44, jvoung wrote: ...
5 years, 6 months ago (2015-06-10 00:31:04 UTC) #4
jvoung (off chromium)
otherwise slgtm, thanks! https://codereview.chromium.org/1153293003/diff/20001/components/nacl/loader/nacl_trusted_listener.cc File components/nacl/loader/nacl_trusted_listener.cc (right): https://codereview.chromium.org/1153293003/diff/20001/components/nacl/loader/nacl_trusted_listener.cc#newcode18 components/nacl/loader/nacl_trusted_listener.cc:18: void OnChannelError() override { On 2015/06/10 ...
5 years, 6 months ago (2015-06-10 16:33:01 UTC) #5
Mark Seaborn
https://codereview.chromium.org/1153293003/diff/20001/components/nacl/loader/nacl_trusted_listener.cc File components/nacl/loader/nacl_trusted_listener.cc (right): https://codereview.chromium.org/1153293003/diff/20001/components/nacl/loader/nacl_trusted_listener.cc#newcode18 components/nacl/loader/nacl_trusted_listener.cc:18: void OnChannelError() override { On 2015/06/10 16:33:01, jvoung wrote: ...
5 years, 6 months ago (2015-06-10 17:05:21 UTC) #6
Mark Seaborn
+bradnelson, mcgrathr and gdeepti, as people who might be interested in the GDB debug stub: ...
5 years, 6 months ago (2015-06-10 17:12:42 UTC) #7
Roland McGrath
On 2015/06/10 17:12:42, Mark Seaborn wrote: > +bradnelson, mcgrathr and gdeepti, as people who might ...
5 years, 6 months ago (2015-06-10 18:24:08 UTC) #8
bradnelson
lgtm
5 years, 6 months ago (2015-06-11 19:07:31 UTC) #10
bradn
https://codereview.chromium.org/1153293003/diff/60001/chrome/test/data/nacl/gdb_rsp.py File chrome/test/data/nacl/gdb_rsp.py (right): https://codereview.chromium.org/1153293003/diff/60001/chrome/test/data/nacl/gdb_rsp.py#newcode20 chrome/test/data/nacl/gdb_rsp.py:20: extra line?
5 years, 6 months ago (2015-06-11 19:51:59 UTC) #12
Mark Seaborn
https://codereview.chromium.org/1153293003/diff/60001/chrome/test/data/nacl/gdb_rsp.py File chrome/test/data/nacl/gdb_rsp.py (right): https://codereview.chromium.org/1153293003/diff/60001/chrome/test/data/nacl/gdb_rsp.py#newcode20 chrome/test/data/nacl/gdb_rsp.py:20: On 2015/06/11 19:51:59, bradn wrote: > extra line? Well, ...
5 years, 6 months ago (2015-06-11 20:05:11 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1153293003/60001
5 years, 6 months ago (2015-06-11 20:07:37 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/16737)
5 years, 6 months ago (2015-06-11 21:44:42 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1153293003/60001
5 years, 6 months ago (2015-06-11 21:47:19 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/16813)
5 years, 6 months ago (2015-06-11 23:36:14 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1153293003/60001
5 years, 6 months ago (2015-06-11 23:38:39 UTC) #24
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 6 months ago (2015-06-12 00:49:39 UTC) #25
commit-bot: I haz the power
5 years, 6 months ago (2015-06-12 00:50:42 UTC) #26
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/2eeecfc4babe46bef3a1a4946a6a77e17b9179fa
Cr-Commit-Position: refs/heads/master@{#334097}

Powered by Google App Engine
This is Rietveld 408576698