Closed Bug 620850 Opened 9 years ago Closed 9 years ago

silentfail tests should run with ulimit to limit memory usage

Categories

(Core :: JavaScript Engine, defect)

defect
Not set

Tracking

()

RESOLVED FIXED

People

(Reporter: paul.biggar, Unassigned)

Details

(Whiteboard: [fixed-in-tracemonkey])

Attachments

(1 file)

From the js-internals list:

From: Igor Bukanov <igor@mir2.org>
Date: Tue, Dec 21, 2010 at 7:18 AM
Subject: Re: [JS-internals] Recent js/src/tests regression
To: dev-tech-js-engine-internals@lists.mozilla.org


On 21 December 2010 01:26, Paul Biggar <pbiggar@mozilla.com> wrote:
> Right. In general, what should we do about silentfail tests? The ones
> I looked at take 2 minutes to run, and eat all the memory on my
> machine while running.

I run the tests on Linux under ulimit -v 500000 to limit the max
amount of virtual memory the process can use to less then 500 MB. Then
there is no problem to run silentfail tests. This suggests to annotate
memory hogs as such in the manifest and change the test driver to call
them using explicit ulimit or just skip the test if ulimit is not
available.
On Mac, ulimit seems to just not work. Neither does rlimit (with any of RLIMIT_DATA, RLIMIT_AS and RLIMIT_RSS), which is what the test driver uses (though currently set to 1GB).

It seems the best way to proceed is to turn off these tests in the manifest, on systems that don't support ulimit/rlimit (windows and mac). Other suggestions welcome.
Attached patch Fix slow testsSplinter Review
On Mac, there is no ulimit, so I'm interpreting 'silentfail' as "don't run on mac'. I've also labelled a lot of slow tests as 'slow', which makes them not run except when --run-slow-tests is included. (This stops my machine freezing when I run ref-tests).
Attachment #507349 - Flags: review?(igor)
Comment on attachment 507349 [details] [diff] [review]
Fix slow tests

It would be nice to add an explicit ulimit support to the test driver itself, but on its own the patch does the right things.
Attachment #507349 - Flags: review?(igor) → review+
(In reply to comment #3)
> It would be nice to add an explicit ulimit support to the test driver itself,
> but on its own the patch does the right things.

I started to add that, but it's already there, with soft and hard limits of 1GB. See tests/tests.py:set_limits().
http://hg.mozilla.org/tracemonkey/rev/a4ec3ddcfc37
Whiteboard: [fixed-in-tracemonkey]
Backed out: http://hg.mozilla.org/tracemonkey/rev/8db4bbd751d6
Whiteboard: [fixed-in-tracemonkey]
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.