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

Issue 469423002: NaCl: Send fatal log messages via shared memory. (Closed)

Created:
6 years, 4 months ago by teravest
Modified:
6 years, 4 months ago
Reviewers:
Mark Seaborn, jschuh
CC:
chromium-reviews, yusukes+watch_chromium.org, tzik, binji+watch_chromium.org, raymes+watch_chromium.org, teravest+watch_chromium.org, nfullagar1, piman+watch_chromium.org, noelallen1, ihf+watch_chromium.org
Project:
chromium
Visibility:
Public.

Description

NaCl: Send fatal log messages via shared memory. nacl_helper reports the last few log messages to the renderer when a LOG_FATAL message is logged in the plugin. This currently uses the "bootstrap" channel, which we would like to get rid of. This uses a shared memory segment instead of IPC, since something bad may have happened in the plugin process, so we'd like to keep the behavior for handling that case as simple as possible. For that reason, the shared memory segment is mapped before the nexe is loaded. I've tested this locally by calling RemoteLog(LOG_FATAL, ...) after StartModule in ServiceRuntime, though I'd like to find some better way to test this as there's a decent amount of logic here. BUG=391039 R=jschuh@chromium.org, mseaborn@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=290910

Patch Set 1 #

Total comments: 10

Patch Set 2 : fixes for mseaborn #

Total comments: 20

Patch Set 3 : fixes for mseaborn, round 2 #

Patch Set 4 : Fix use of std::min with uint32 and size_t #

Patch Set 5 : std::min compile fix on windows #

Total comments: 2

Patch Set 6 : Remove commented out line #

Unified diffs Side-by-side diffs Delta from patch set Stats (+123 lines, -40 lines) Patch
M components/nacl/browser/nacl_process_host.h View 1 2 chunks +5 lines, -0 lines 0 comments Download
M components/nacl/browser/nacl_process_host.cc View 1 2 3 chunks +22 lines, -1 line 0 comments Download
M components/nacl/common/nacl_host_messages.h View 1 chunk +1 line, -0 lines 0 comments Download
M components/nacl/common/nacl_messages.h View 1 chunk +1 line, -0 lines 0 comments Download
M components/nacl/common/nacl_types.h View 1 2 5 chunks +13 lines, -1 line 0 comments Download
M components/nacl/common/nacl_types.cc View 3 chunks +8 lines, -4 lines 0 comments Download
M components/nacl/loader/nacl_listener.h View 3 chunks +5 lines, -0 lines 0 comments Download
M components/nacl/loader/nacl_listener.cc View 1 2 3 4 5 chunks +25 lines, -8 lines 0 comments Download
M components/nacl/renderer/nexe_load_manager.h View 4 chunks +8 lines, -1 line 0 comments Download
M components/nacl/renderer/nexe_load_manager.cc View 1 2 3 4 5 4 chunks +21 lines, -2 lines 0 comments Download
M components/nacl/renderer/ppb_nacl_private_impl.cc View 2 chunks +7 lines, -2 lines 0 comments Download
M ppapi/api/private/ppb_nacl_private.idl View 1 chunk +1 line, -2 lines 0 comments Download
M ppapi/c/private/ppb_nacl_private.h View 2 chunks +2 lines, -2 lines 0 comments Download
M ppapi/native_client/src/trusted/plugin/plugin.cc View 1 chunk +1 line, -4 lines 0 comments Download
M ppapi/native_client/src/trusted/plugin/service_runtime.h View 1 chunk +0 lines, -2 lines 0 comments Download
M ppapi/native_client/src/trusted/plugin/service_runtime.cc View 1 chunk +0 lines, -8 lines 0 comments Download
M ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c View 2 chunks +3 lines, -3 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
teravest
6 years, 4 months ago (2014-08-14 19:19:08 UTC) #1
Mark Seaborn
Regarding testing: I wonder if it would be possible to at least exercise the LOG_FATAL ...
6 years, 4 months ago (2014-08-17 20:13:45 UTC) #2
teravest
Hmm. Since this change uses shared memory instead of sending the data over IPC, Chrome ...
6 years, 4 months ago (2014-08-18 16:16:26 UTC) #3
Mark Seaborn
LGTM https://codereview.chromium.org/469423002/diff/20001/components/nacl/browser/nacl_process_host.cc File components/nacl/browser/nacl_process_host.cc (right): https://codereview.chromium.org/469423002/diff/20001/components/nacl/browser/nacl_process_host.cc#newcode748 components/nacl/browser/nacl_process_host.cc:748: } How about doing crash_info_shmem_.Close() to unref the ...
6 years, 4 months ago (2014-08-18 19:04:09 UTC) #4
teravest
+jschuh for components/nacl/common/nacl_host_messages.h and components/nacl/common/nacl_messages.h
6 years, 4 months ago (2014-08-18 21:21:19 UTC) #5
Mark Seaborn
On 18 August 2014 09:16, <teravest@chromium.org> wrote: > Hmm. Since this change uses shared memory ...
6 years, 4 months ago (2014-08-19 03:40:07 UTC) #6
teravest
On Mon, Aug 18, 2014 at 9:39 PM, Mark Seaborn <mseaborn@chromium.org> wrote: > On 18 ...
6 years, 4 months ago (2014-08-19 04:48:08 UTC) #7
Mark Seaborn
On 18 August 2014 21:47, Justin TerAvest <teravest@chromium.org> wrote: > On Mon, Aug 18, 2014 ...
6 years, 4 months ago (2014-08-19 14:32:31 UTC) #8
jschuh
Is there anything that can go wrong if the log spews arbitrary content (e.g. control ...
6 years, 4 months ago (2014-08-19 15:39:22 UTC) #9
teravest
On 2014/08/19 15:39:22, Justin Schuh wrote: > Is there anything that can go wrong if ...
6 years, 4 months ago (2014-08-19 17:10:47 UTC) #10
teravest
https://codereview.chromium.org/469423002/diff/20001/components/nacl/browser/nacl_process_host.cc File components/nacl/browser/nacl_process_host.cc (right): https://codereview.chromium.org/469423002/diff/20001/components/nacl/browser/nacl_process_host.cc#newcode748 components/nacl/browser/nacl_process_host.cc:748: } On 2014/08/18 19:04:08, Mark Seaborn wrote: > How ...
6 years, 4 months ago (2014-08-19 19:58:17 UTC) #11
Mark Seaborn
https://codereview.chromium.org/469423002/diff/100001/components/nacl/renderer/nexe_load_manager.cc File components/nacl/renderer/nexe_load_manager.cc (right): https://codereview.chromium.org/469423002/diff/100001/components/nacl/renderer/nexe_load_manager.cc#newcode276 components/nacl/renderer/nexe_load_manager.cc:276: // char crash_log_data[kNaClCrashInfoShmemSize]; I think you forgot to remove ...
6 years, 4 months ago (2014-08-19 23:38:51 UTC) #12
jschuh
okay, lgtm for ipc security then
6 years, 4 months ago (2014-08-20 04:16:17 UTC) #13
teravest
https://codereview.chromium.org/469423002/diff/100001/components/nacl/renderer/nexe_load_manager.cc File components/nacl/renderer/nexe_load_manager.cc (right): https://codereview.chromium.org/469423002/diff/100001/components/nacl/renderer/nexe_load_manager.cc#newcode276 components/nacl/renderer/nexe_load_manager.cc:276: // char crash_log_data[kNaClCrashInfoShmemSize]; On 2014/08/19 23:38:51, Mark Seaborn wrote: ...
6 years, 4 months ago (2014-08-20 14:23:28 UTC) #14
teravest
The CQ bit was checked by teravest@chromium.org
6 years, 4 months ago (2014-08-20 19:21:36 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/teravest@chromium.org/469423002/120001
6 years, 4 months ago (2014-08-20 19:24:12 UTC) #16
teravest
6 years, 4 months ago (2014-08-20 20:43:15 UTC) #17
Message was sent while issue was closed.
Committed patchset #6 manually as 290910 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698