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

Issue 443393003: Speculative fix for occasional crazy linker crash (Closed)

Created:
6 years, 4 months ago by simonb (inactive)
Modified:
6 years, 3 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Speculative fix for occasional crazy linker crash. crbug/397634 describes crashes that occur occasionally in the crazy linker when loading the browser shared library. These crashes have been observed only in the M37 beta. The current theory is that part of the address range that the crazy linker must map with MAP_FIXED for shared RELRO to work may, on occasions, already be mapped. If it is mapped then the crazy linker's MAP_FIXED to reserve space will overwrite it, with unpleasant results. The crazy linker tries to use a range of addresses that is 'safe' from use by the system, but it may not be watertight. This fix should work round the problem by removing the MAP_FIXED from the mmap that reserves space, so that if any part of the range is already occupied then the mmap returns a valid mapping, just not at the requested address. If that happens the fixed address load fails, and the ChildProcessService retries with a non-fixed address. This is mildly suboptimal since it loses the gain from shared RELRO, but the library will still load and run. Occurrences of this in the M37 beta suggest that it will be a relatively rare event. So far the bug reported by the beta has not shown up in testing, but something a little similar can be simulated by deliberately moving the crazy linker's wanted address to around the heap. With this perturbation in place and without this fix, the browser crashes. When this fix is added the browser/renderer library loads and runs, and correctly reports back-out and retry in logcat. BUG=397634 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=288126

Patch Set 1 #

Total comments: 4

Patch Set 2 : Review feedback changes #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+34 lines, -7 lines) Patch
M content/public/android/java/src/org/chromium/content/app/ChildProcessService.java View 1 2 chunks +24 lines, -5 lines 0 comments Download
M third_party/android_crazy_linker/README.chromium View 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/android_crazy_linker/src/src/crazy_linker_elf_loader.cpp View 3 chunks +8 lines, -2 lines 1 comment Download

Messages

Total messages: 13 (1 generated)
simonb (inactive)
6 years, 4 months ago (2014-08-07 14:19:37 UTC) #1
rmcilroy
lgtm +benm for content OWNER review. Could you make the title and first line of ...
6 years, 4 months ago (2014-08-07 15:41:52 UTC) #2
rmcilroy
actually +benm for content OWNERS review this time...
6 years, 4 months ago (2014-08-07 15:44:38 UTC) #3
rmcilroy
actually +benm for content OWNERS review this time...
6 years, 4 months ago (2014-08-07 15:44:40 UTC) #4
benm (inactive)
lgtm
6 years, 4 months ago (2014-08-07 15:46:55 UTC) #5
simonb (inactive)
https://codereview.chromium.org/443393003/diff/1/content/public/android/java/src/org/chromium/content/app/ChildProcessService.java File content/public/android/java/src/org/chromium/content/app/ChildProcessService.java (right): https://codereview.chromium.org/443393003/diff/1/content/public/android/java/src/org/chromium/content/app/ChildProcessService.java#newcode132 content/public/android/java/src/org/chromium/content/app/ChildProcessService.java:132: boolean inServiceProcessWithSharedRelro = false; On 2014/08/07 15:41:52, rmcilroy wrote: ...
6 years, 4 months ago (2014-08-07 16:42:46 UTC) #6
simonb (inactive)
The CQ bit was checked by simonb@chromium.org
6 years, 4 months ago (2014-08-07 17:24:21 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/simonb@chromium.org/443393003/20001
6 years, 4 months ago (2014-08-07 17:26:01 UTC) #8
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_gpu_triggered_tests on tryserver.chromium.gpu ...
6 years, 4 months ago (2014-08-07 18:51:10 UTC) #9
commit-bot: I haz the power
Change committed as 288126
6 years, 4 months ago (2014-08-07 19:55:46 UTC) #10
pasko
lgtm as a speculative fix, but it's scary for long term. The original crazylinker design ...
6 years, 3 months ago (2014-09-10 18:46:18 UTC) #12
simonb (inactive)
6 years, 3 months ago (2014-09-11 14:21:21 UTC) #13
Message was sent while issue was closed.
See also:

https://codereview.chromium.org/470053003/

Powered by Google App Engine
This is Rietveld 408576698