Skip Menu |

This queue is for tickets about the JavaScript-V8 CPAN distribution.

Report information
The Basics
Id: 78512
Status: resolved
Priority: 0/
Queue: JavaScript-V8

People
Owner: Nobody in particular
Requestors: TEAM [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.06
Fixed in: (no value)



Subject: Instantiation fails with <1Gb virtual memory
Hi there, Seems that the v8 library needs a fair bit of virtual memory to instantiate - when running under ulimit, for example: ulimit -v 524288 cpan -t JavaScript::V8 this causes all the tests to fail with the following output: t/01load.t ......... ok # # Fatal error in v8::Context::New() # Error initializing V8 # t/basic.t .......... No subtests run Running with ulimit -v 700000 or above seems fine - would it perhaps be possible to add a note to the documentation in case anyone else runs into this? thanks, Tom
Subject: ulimit-doc.patch
diff -uNPr JavaScript-V8-0.06-original/lib/JavaScript/V8.pm JavaScript-V8-0.06-patched/lib/JavaScript/V8.pm --- JavaScript-V8-0.06-original/lib/JavaScript/V8.pm 2011-03-29 23:06:40.000000000 +0100 +++ JavaScript-V8-0.06-patched/lib/JavaScript/V8.pm 2012-07-22 03:25:16.993954006 +0100 @@ -40,6 +40,14 @@ =head1 INSTALLING V8 +Note that the V8 engine requires that you have at least 600MB virtual memory +available. If you find tests failing with + + Fatal error in v8::Context::New() + +then check whether you have sufficient virtual memory available for the process; +under Unix systems this may be affected by ulimit(1) for example. + =head2 From Source See L<V8 issue 413|http://code.google.com/p/v8/issues/detail?id=413> if you are
Subject: Re: [rt.cpan.org #78512] Instantiation fails with <1Gb virtual memory
Date: Sun, 22 Jul 2012 04:03:24 +0100
To: bug-JavaScript-V8 [...] rt.cpan.org
From: David Leadbeater <dgl [...] dgl.cx>
I'd rather people didn't use broken mechanisms like ulimit -v. Using cgroups I see it uses around 2MB of rss. Adding something to the docs about it needing 600MB when it doesn't is just going to confuse/scare people. On 22 July 2012 03:26, Thomas Edward Alexander Molesworth via RT < bug-JavaScript-V8@rt.cpan.org> wrote: Show quoted text
> Sat Jul 21 22:26:38 2012: Request 78512 was acted upon. > Transaction: Ticket created by TEAM > Queue: JavaScript-V8 > Subject: Instantiation fails with <1Gb virtual memory > Broken in: 0.06 > Severity: (no value) > Owner: Nobody > Requestors: TEAM@cpan.org > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=78512 > > > > Hi there, > > Seems that the v8 library needs a fair bit of virtual memory to > instantiate - when running under ulimit, for example: > > ulimit -v 524288 > cpan -t JavaScript::V8 > > this causes all the tests to fail with the following output: > > t/01load.t ......... ok > > # > # Fatal error in v8::Context::New() > # Error initializing V8 > # > > t/basic.t .......... > No subtests run > > Running with ulimit -v 700000 or above seems fine - would it perhaps be > possible to add a note to the documentation in case anyone else runs > into this? > > thanks, > > Tom >
Fair enough - hopefully this ticket will show up in a search if anyone else runs into the issue, which is Good Enough for me. Note that RSS isn't particularly relevant here - it's specifically VSZ: $ perl -MJavaScript::V8 -E'say qx{ps -p $$ u}; JavaScript::V8::Context->new; say qx{ps -p $$ u};' USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND tom 7502 0.0 0.0 58760 4160 pts/10 S+ 04:13 0:00 perl -MJavaScript::V8 -Esay qx{ps -p $$ u}; JavaScript::V8::Context->new; say qx{ps -p $$ u}; USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND tom 7502 0.0 0.0 630832 7312 pts/10 Sl+ 04:13 0:00 perl -MJavaScript::V8 -Esay qx{ps -p $$ u}; JavaScript::V8::Context->new; say qx{ps -p $$ u}; I think a few other people may run CPAN installations (particularly for smoke testing) with ulimits enabled, even though there are probably better options out there, so if you do see any other similar failure reports maybe that's something to check with the reporter before spending time investigating. thanks, Tom On Sat Jul 21 23:03:38 2012, DGL wrote: Show quoted text
> I'd rather people didn't use broken mechanisms like ulimit -v. Using > cgroups I see it uses around 2MB of rss. Adding something to the docs
about Show quoted text
> it needing 600MB when it doesn't is just going to confuse/scare people. > > On 22 July 2012 03:26, Thomas Edward Alexander Molesworth via RT < > bug-JavaScript-V8@rt.cpan.org> wrote: >
> > Sat Jul 21 22:26:38 2012: Request 78512 was acted upon. > > Transaction: Ticket created by TEAM > > Queue: JavaScript-V8 > > Subject: Instantiation fails with <1Gb virtual memory > > Broken in: 0.06 > > Severity: (no value) > > Owner: Nobody > > Requestors: TEAM@cpan.org > > Status: new > > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=78512 > > > > > > > Hi there, > > > > Seems that the v8 library needs a fair bit of virtual memory to > > instantiate - when running under ulimit, for example: > > > > ulimit -v 524288 > > cpan -t JavaScript::V8 > > > > this causes all the tests to fail with the following output: > > > > t/01load.t ......... ok > > > > # > > # Fatal error in v8::Context::New() > > # Error initializing V8 > > # > > > > t/basic.t .......... > > No subtests run > > > > Running with ulimit -v 700000 or above seems fine - would it perhaps be > > possible to add a note to the documentation in case anyone else runs > > into this? > > > > thanks, > > > > Tom > >
I've added a note to the docs linking to this ticket. Thanks! Closing.