Zelphir Kaltstahl
Zelphir Kaltstahl

Reputation: 6189

Why can't Firefox cope with a memory limit set by ulimit?

When I set a memory limit for firefox using:

$ ulimit -Sv 512000
$ ulimit -v
512000
$ firefox %u

I get the following error:

[4881] ###!!! ABORT: PR_CreateThread failed!: file /builddir/build/BUILD/firefox-49.0/firefox-49.0/js/xpconnect/src/XPCJSRuntime.cpp, line 1045
[4881] ###!!! ABORT: PR_CreateThread failed!: file /builddir/build/BUILD/firefox-49.0/firefox-49.0/js/xpconnect/src/XPCJSRuntime.cpp, line 1045
Segmentation fault (core dumped)

However, if Firefox is already running, it opens a new window without any errors.

What is the issue with setting a ulimit for Firefox?

The OS is Fedora 24: 4.7.5-200.fc24.x86_64

Upvotes: 2

Views: 1309

Answers (1)

András Korn
András Korn

Reputation: 170

Firefox is just a memory hog; 512M of virtual address space isn't enough to run it. In my experiments, I couldn't get a busy session started without ulimit -v set to at least 1.5G.

It works for you when firefox is already running because in that case you don't start a new firefox process (which would inherit the ulimit) but just tell the already running one to open a new window.

Upvotes: 1

Related Questions