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

Issue 997683002: Exit cleanly for the SRPC "log" requests instead of generating crash reports. (Closed)

Created:
5 years, 9 months ago by jvoung (off chromium)
Modified:
5 years, 9 months ago
CC:
native-client-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/native_client/src/native_client.git@master
Target Ref:
refs/heads/master
Project:
nacl
Visibility:
Public.

Description

Exit cleanly for the SRPC "log" requests instead of generating crash reports. This is to avoid spamming the crash report server for things like validation errors, DEP unsupported, "read error", or no memory for address space of which we already have UMA stats for. Of those, validation is currently the lowest ranking one. NaClLog(LOG_FATAL, ...) would have caused the code to run a special "gNaClLogAbortBehavior" hook, which ends up copying data to the renderer: https://codereview.chromium.org/469423002/ This change downgrades from LOG_FATAL to LOG_ERROR, exposes the hook, and manually calls the hook. It leaves other types of NaClLog(LOG_FATAL, ...) alone and allows generating a crash report and backtrace. See Chrome's ServiceRuntime::ReapLogs for the source of this RPC call: https://code.google.com/p/chromium/codesearch#chromium/src/components/nacl/renderer/plugin/service_runtime.cc&sq=package:chromium&l=225&q=ReapLogs BUG= https://code.google.com/p/chromium/issues/detail?id=405697 TEST= (a) ./scons run_nacl_error_log_test (still runs the hooks and aborts) (b) patch into chrome and build/run browser_tests. "NativeClient: Validation failure..." from NaClBrowserTestNewlib.BadNative and "NativeClient: Bad ELF header magic number" from NaClBrowserTestNewlib.Bad still show up. (c) Also check manually check the javascript console to see the "reap logs" and other buffered logs show up. Committed: https://chromium.googlesource.com/native_client/src/native_client/+/72e0e5f8ec337dcdf90f1a11854a19f9cd8c3399

Patch Set 1 #

Total comments: 4

Patch Set 2 : run the hook just in case #

Unified diffs Side-by-side diffs Delta from patch set Stats (+24 lines, -2 lines) Patch
M src/shared/platform/nacl_log.h View 1 1 chunk +5 lines, -0 lines 0 comments Download
M src/shared/platform/nacl_log.c View 1 2 chunks +6 lines, -1 line 0 comments Download
M src/trusted/service_runtime/nacl_error_log_hook.c View 1 1 chunk +0 lines, -1 line 0 comments Download
M src/trusted/service_runtime/nacl_secure_service.c View 1 1 chunk +13 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (2 generated)
jvoung (off chromium)
Is this what you were thinking of Mark?
5 years, 9 months ago (2015-03-10 23:37:34 UTC) #2
Mark Seaborn
LGTM, thanks, but one question... https://codereview.chromium.org/997683002/diff/1/src/trusted/service_runtime/nacl_secure_service.c File src/trusted/service_runtime/nacl_secure_service.c (right): https://codereview.chromium.org/997683002/diff/1/src/trusted/service_runtime/nacl_secure_service.c#newcode260 src/trusted/service_runtime/nacl_secure_service.c:260: if (LOG_FATAL == severity) ...
5 years, 9 months ago (2015-03-11 01:26:14 UTC) #3
jvoung (off chromium)
https://codereview.chromium.org/997683002/diff/1/src/trusted/service_runtime/nacl_secure_service.c File src/trusted/service_runtime/nacl_secure_service.c (right): https://codereview.chromium.org/997683002/diff/1/src/trusted/service_runtime/nacl_secure_service.c#newcode260 src/trusted/service_runtime/nacl_secure_service.c:260: if (LOG_FATAL == severity) { On 2015/03/11 01:26:14, Mark ...
5 years, 9 months ago (2015-03-11 18:02:06 UTC) #4
Mark Seaborn
LGTM
5 years, 9 months ago (2015-03-11 19:08:13 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/997683002/20001
5 years, 9 months ago (2015-03-11 20:06:59 UTC) #7
commit-bot: I haz the power
5 years, 9 months ago (2015-03-11 20:35:31 UTC) #8
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/native_client/src/native_client/+/72e0e5f8e...

Powered by Google App Engine
This is Rietveld 408576698