Crash at startup due to low datasize limits since bug #1334933
Categories
(Core :: JavaScript Engine: JIT, defect, P3)
Tracking
()
People
(Reporter: gaston, Unassigned)
References
Details
Attachments
(1 obsolete file)
| Reporter | ||
Updated•8 years ago
|
| Reporter | ||
Comment 1•8 years ago
|
||
Comment 2•8 years ago
|
||
Comment 3•8 years ago
|
||
| Reporter | ||
Comment 4•8 years ago
|
||
Comment 5•8 years ago
|
||
Comment 6•8 years ago
|
||
| Reporter | ||
Comment 7•8 years ago
|
||
Comment 8•8 years ago
|
||
Comment 9•8 years ago
|
||
| Reporter | ||
Comment 10•8 years ago
|
||
Comment 11•8 years ago
|
||
Comment 12•8 years ago
|
||
| Reporter | ||
Comment 13•8 years ago
|
||
Comment 14•8 years ago
|
||
| Reporter | ||
Comment 15•8 years ago
|
||
| Reporter | ||
Comment 16•8 years ago
|
||
Comment 17•8 years ago
|
||
| Reporter | ||
Comment 19•8 years ago
|
||
| Reporter | ||
Comment 20•6 years ago
|
||
Fwiw, we've been running fine with a default of 140Mb hardcoded for the past two years. I'd like to eventually get rid of the patch we're carrying for this, so how about upstreaming a variation of min(getrlimit(RLIMIT_DATA)/5, 1Gb), or with a better heuristic ? And eventually apply it to all unix platforms ?
Recently started an unmodified nightly build, and it segfaulted right away because mmap failed with ENOMEM, even with ulimit -d defaulting to 1.5Gb, so that memory consumption is a bit worrying.
Comment 21•6 years ago
|
||
(In reply to Landry Breuil (:gaston) from comment #20)
Fwiw, we've been running fine with a default of 140Mb hardcoded for the past two years. I'd like to eventually get rid of the patch we're carrying for this, so how about upstreaming a variation of min(getrlimit(RLIMIT_DATA)/5, 1Gb), or with a better heuristic ? And eventually apply it to all unix platforms ?
What's been nice about the current constant value is that we can use it in static_asserts and to compute other constants, for example MaxCodePages. It also makes things easier for us to reason about. I'm a bit wary of adding a different notion of "non-constant, actually reserved size" just for OpenBSD.
What about hard-coding 140Mb on 64-bit platforms with an OpenBSD ifdef?
Comment 22•6 years ago
|
||
OpenBSD is probably at the extreme here but I've seen other systems with very low rlimit values on 64-bit (in the 8GB range of address space), which will make them fail to deal with WebAssembly content at all. In response to that problem we've started to choose a compilation strategy for wasm that depends on the rlimit value -- if it's quite low, we choose explicit bounds checks and a small memory reservation even on 64-bit systems. I know that that's a different problem than what's being debated here, but we could usefully be more adaptive here than we are. (Not saying the ifdef solution isn't the best one, just that OpenBSD is unlikely to be the only system with problems.)
| Reporter | ||
Comment 23•6 years ago
|
||
(In reply to Jan de Mooij [:jandem] from comment #21)
(In reply to Landry Breuil (:gaston) from comment #20)
Fwiw, we've been running fine with a default of 140Mb hardcoded for the past two years. I'd like to eventually get rid of the patch we're carrying for this, so how about upstreaming a variation of min(getrlimit(RLIMIT_DATA)/5, 1Gb), or with a better heuristic ? And eventually apply it to all unix platforms ?
What's been nice about the current constant value is that we can use it in
static_asserts and to compute other constants, for exampleMaxCodePages. It also makes things easier for us to reason about. I'm a bit wary of adding a different notion of "non-constant, actually reserved size" just for OpenBSD.What about hard-coding 140Mb on 64-bit platforms with an OpenBSD ifdef?
That's what we've been shipping since 2 years in
https://github.com/openbsd/ports/blob/master/www/mozilla-firefox/patches/patch-js_src_jit_ProcessExecutableMemory_h - i can of course upstream that but to me that's a bandaid/hack - and yeah as :lth satys other operating systems might apply rlimits.
Updated•3 years ago
|
Updated•1 year ago
|
Description
•