Bug 154749

Summary: Remove the on demand executable allocator
Product: WebKit Reporter: Oliver Hunt <oliver>
Component: New BugsAssignee: Oliver Hunt <oliver>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: ap, clopez, commit-queue, ggaren, ossy, saam
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=154831
Bug Depends on: 154822, 154910    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch none

Oliver Hunt
Reported 2016-02-26 13:55:42 PST
Remove the on demand executable allocator
Attachments
Patch (31.19 KB, patch)
2016-02-26 13:58 PST, Oliver Hunt
no flags
Patch (21.45 KB, patch)
2016-02-26 16:20 PST, Oliver Hunt
no flags
Oliver Hunt
Comment 1 2016-02-26 13:58:00 PST
Geoffrey Garen
Comment 2 2016-02-26 14:04:26 PST
Comment on attachment 272366 [details] Patch This patch (and its history) will be easier to read if you first make the changes necessary to remove the demand allocator, check that in, and then do any moves you want to do.
Saam Barati
Comment 3 2016-02-26 14:04:44 PST
Comment on attachment 272366 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=272366&action=review > Source/JavaScriptCore/jit/ExecutableAllocator.cpp:105 > + RELEASE_ASSERT_NOT_REACHED(); // In debug mode, this should be a hard failure. This comment isn't true. Maybe it should just be ASSERT_NOT_REACHED? Or we could remove the break on the next line.
Oliver Hunt
Comment 4 2016-02-26 16:20:16 PST
Geoffrey Garen
Comment 5 2016-02-26 16:40:48 PST
Comment on attachment 272380 [details] Patch r=me
WebKit Commit Bot
Comment 6 2016-02-26 18:10:24 PST
Comment on attachment 272380 [details] Patch Clearing flags on attachment: 272380 Committed r197226: <http://trac.webkit.org/changeset/197226>
WebKit Commit Bot
Comment 7 2016-02-26 18:10:27 PST
All reviewed patches have been landed. Closing bug.
Oliver Hunt
Comment 9 2016-02-27 10:14:46 PST
(In reply to comment #8) > Looks like this broke LLINT Cloop build: > https://build.webkit.org/builders/ > Apple%20El%20Capitan%20LLINT%20CLoop%20%28BuildAndTest%29/builds/3832/steps/ > compile-webkit/logs/stdio Ugh I'm a muppet - will fix in a few minutes
Oliver Hunt
Comment 10 2016-02-27 11:28:40 PST
Uuid fux Committing to http://svn.webkit.org/repository/webkit/trunk ... M Source/JavaScriptCore/ChangeLog M Source/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp Committed r197256
Carlos Alberto Lopez Perez
Comment 12 2016-02-29 10:49:24 PST
Why was this removed? It caused OOM crashes: see bug 154822
Csaba Osztrogonác
Comment 13 2016-03-01 21:35:03 PST
(In reply to comment #12) > Why was this removed? It caused OOM crashes: see bug 154822 Ping
WebKit Commit Bot
Comment 14 2016-03-01 22:52:49 PST
Re-opened since this is blocked by bug 154910
Alexey Proskuryakov
Comment 15 2016-03-01 22:58:04 PST
Csaba Osztrogonác
Comment 16 2016-03-08 01:20:31 PST
(In reply to comment #12) > Why was this removed? Do you still plan to remove on demand executable allocator? If yes, could you explain what is the reason? If no, let's close this bug.
Oliver Hunt
Comment 17 2016-03-08 10:36:56 PST
(In reply to comment #16) > (In reply to comment #12) > > Why was this removed? > > Do you still plan to remove on demand executable allocator? > If yes, could you explain what is the reason? If no, let's close this bug. Because multiple allocators with variable behaviour are bad? Because it makes a number of other features impossible? You never answered my question in the other bug: does your ARM port support going back and forth between the LLINT and the JIT?
Csaba Osztrogonác
Comment 18 2016-03-08 10:51:43 PST
(In reply to comment #17) > (In reply to comment #16) > > (In reply to comment #12) > > > Why was this removed? > > > > Do you still plan to remove on demand executable allocator? > > If yes, could you explain what is the reason? If no, let's close this bug. > > Because multiple allocators with variable behaviour are bad? Because it > makes a number of other features impossible? > > You never answered my question in the other bug: does your ARM port support > going back and forth between the LLINT and the JIT? If you point me how to d(In reply to comment #17) > (In reply to comment #16) > > (In reply to comment #12) > > > Why was this removed? > > > > Do you still plan to remove on demand executable allocator? > > If yes, could you explain what is the reason? If no, let's close this bug. > > Because multiple allocators with variable behaviour are bad? Because it > makes a number of other features impossible? In this case it would have been better to ask before removing. > You never answered my question in the other bug: does your ARM port support > going back and forth between the LLINT and the JIT? https://bugs.webkit.org/show_bug.cgi?id=154822#c7 I haven't found any option to enable fallback on OOM. Could you point me where can we switch this on? Is it possible to enable this fallback if LLINT is disabled during stress test running? (Tests failed only in JSC_useLLINT=false case.)
Oliver Hunt
Comment 19 2016-03-08 12:13:42 PST
> > You never answered my question in the other bug: does your ARM port support > > going back and forth between the LLINT and the JIT? > > If you point me how to d(In reply to comment #17) Do you have the actual llint enabled? Because that should just happen automatically if it can't allocate executable memory. > > (In reply to comment #16) > > > (In reply to comment #12) > > > > Why was this removed? > > > > > > Do you still plan to remove on demand executable allocator? > > > If yes, could you explain what is the reason? If no, let's close this bug. > > > > Because multiple allocators with variable behaviour are bad? Because it > > makes a number of other features impossible? > > In this case it would have been better to ask before removing. Yeah, i talked about it internally but didn't comment in the bug as I assumed it was an obviously worth while change. > > > You never answered my question in the other bug: does your ARM port support > > going back and forth between the LLINT and the JIT? > > https://bugs.webkit.org/show_bug.cgi?id=154822#c7 > > I haven't found any option to enable fallback on OOM. > Could you point me where can we switch this on? > > Is it possible to enable this fallback if LLINT is disabled during > stress test running? (Tests failed only in JSC_useLLINT=false case.) Wait, are you deliberately disabling the llint during stress testing? If you are then your stress test is _correct_ to crash. The LLINT design is deliberately intended to allow for running out of executable memory. That part of the value it provides.
Csaba Osztrogonác
Comment 20 2016-03-09 00:02:48 PST
(In reply to comment #19) > Wait, are you deliberately disabling the llint during stress testing? If you > are then your stress test is _correct_ to crash. The LLINT design is > deliberately intended to allow for running out of executable memory. That > part of the value it provides. To make it clear, I'm not the one - the bad guy - who deliberately disables LLINT during testing, but jsc-stress-tests script - wrote by Filip Pizlo - which runs all tests in different configurations. It's same on all platforms. As you can see in the description of the other bug, tests fail only in no-llint configuration: https://bugs.webkit.org/show_bug.cgi?id=154822#c0 . Not only on Linux, but your own Apple's ARM platform too. But you guys simply skipped these tests previously. Just read this comment again if you haven't do it: https://bugs.webkit.org/show_bug.cgi?id=154822#c1 Back to the different allocators, we should make it clear, it wasn't my decision which one we use. You at Apple implemented both of them, enabled the fixed allocator only on X86_64, IOS and ARM64, other platforms uses the on demand allocator. Platform.h ----------- #if CPU(X86_64) || PLATFORM(IOS) || CPU(ARM64) #define ENABLE_EXECUTABLE_ALLOCATOR_FIXED 1 #else #define ENABLE_EXECUTABLE_ALLOCATOR_DEMAND 1 #endif It means that the fixed allocator wasn't tested ever on other platforms. In this case it isn't fair to switch to untested code path and remove the current codepath without asking. Now we know that the fixed allocator has at least three problems: - The fixed sized 16Mb isn't enough to run all JSC stress tests. https://bugs.webkit.org/show_bug.cgi?id=154822 - Increasing the fixed size over 16Mb causes many crashes on the Apple owned Thumb2 ARMv7Assembler . https://bugs.webkit.org/show_bug.cgi?id=154822#c3 - There are crashed on Apple Mac x86 platforms too https://bugs.webkit.org/show_bug.cgi?id=154910 https://build.webkit.org/builders/Apple%20El%20Capitan%2032-bit%20JSC%20%28BuildAndTest%29/builds/1607 I think it would be fair to fix the ARMv7Assembler issue and increase the fixed size to 32 MB to make all stress tests pass _ before _ removing the on demand allocator. But of course, it is just a suggestion. You can do here whatever you want, because you are stronger.
Csaba Osztrogonác
Comment 21 2017-02-23 08:59:45 PST
*** This bug has been marked as a duplicate of bug 168754 ***
Note You need to log in before you can comment on or make changes to this bug.