Bug 144677

Summary: New stress/new-largeish-contiguous-array-with-size.js fails on 32 bit platforms
Product: WebKit Reporter: Csaba Osztrogonác <ossy>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: cgarcia, clopez, fpizlo, mark.lam, ossy
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 108645    

Description Csaba Osztrogonác 2015-05-06 02:12:05 PDT
New stress/new-largeish-contiguous-array-with-size.js
introduced in https://trac.webkit.org/changeset/183847
and fails on 32 bit platforms.

It failed once on GTK 32 bit bot:
- https://build.webkit.org/builders/GTK%20Linux%2032-bit%20Release/builds/52461
- stress/new-largeish-contiguous-array-with-size.js.default: Exception: Error: heap too big before forced GC: 108104384

It fails persistently on EFL 32 bit ARM bots since it is introduced:
- stress/new-largeish-contiguous-array-with-size.js.default: Exception: Error: heap too big before forced GC: 119708840
- stress/new-largeish-contiguous-array-with-size.js.default: Exception: Error: heap too big before forced GC: 124108928
- stress/new-largeish-contiguous-array-with-size.js.default: Exception: Error: heap too big before forced GC: 129308808
- stress/new-largeish-contiguous-array-with-size.js.default: Exception: Error: heap too big before forced GC: 120108656
...

Can it be a real bug or a bug in the test?
Comment 1 Csaba Osztrogonác 2015-05-06 02:13:37 PDT
and the same failure on the GTK ARM bot
Comment 2 Filip Pizlo 2015-05-07 10:52:14 PDT
(In reply to comment #0)
> New stress/new-largeish-contiguous-array-with-size.js
> introduced in https://trac.webkit.org/changeset/183847
> and fails on 32 bit platforms.
> 
> It failed once on GTK 32 bit bot:
> -
> https://build.webkit.org/builders/GTK%20Linux%2032-bit%20Release/builds/52461
> - stress/new-largeish-contiguous-array-with-size.js.default: Exception:
> Error: heap too big before forced GC: 108104384
> 
> It fails persistently on EFL 32 bit ARM bots since it is introduced:
> - stress/new-largeish-contiguous-array-with-size.js.default: Exception:
> Error: heap too big before forced GC: 119708840
> - stress/new-largeish-contiguous-array-with-size.js.default: Exception:
> Error: heap too big before forced GC: 124108928
> - stress/new-largeish-contiguous-array-with-size.js.default: Exception:
> Error: heap too big before forced GC: 129308808
> - stress/new-largeish-contiguous-array-with-size.js.default: Exception:
> Error: heap too big before forced GC: 120108656
> ...
> 
> Can it be a real bug or a bug in the test?

I think that the test might be wrong.  I was assuming that 100MB is the largest that our minimum heap size would get.  But I'm wrong:

static inline size_t minHeapSize(HeapType heapType, size_t ramSize)
{
    if (heapType == LargeHeap)
        return min(largeHeapSize, ramSize / 4);
    return smallHeapSize;
}

So, if you're on a machine with tons of heap, we'll be happy to give you 1/4 RAM headroom.  This actually seems super sketchy anyways and maybe we should fix that - but for now it means that as written, my test is incorrect.

I'll investigate.
Comment 3 Filip Pizlo 2015-05-07 11:10:21 PDT
I will fix this bug as part of https://bugs.webkit.org/show_bug.cgi?id=144609.
Comment 4 Filip Pizlo 2015-05-07 11:10:32 PDT

*** This bug has been marked as a duplicate of bug 144609 ***