[GH-ISSUE #1048] Firefox freezes when opened with many tabs #714

Closed
opened 2026-05-05 06:29:49 -06:00 by gitea-mirror · 29 comments
Owner

Originally created by @fuelflo on GitHub (Jan 13, 2017).
Original GitHub issue: https://github.com/netblue30/firejail/issues/1048

Hey,

I got following problem. When starting FF with firejail, FF freezes, when I had 15+ tabs open on last close and when he restores the session upon start.

firejail 0.9.44.4
Ubuntu 16.10
Firefox 51.0b14

Any ideas how to fix this?
Thx in advance!

Originally created by @fuelflo on GitHub (Jan 13, 2017). Original GitHub issue: https://github.com/netblue30/firejail/issues/1048 Hey, I got following problem. When starting FF with firejail, FF freezes, when I had 15+ tabs open on last close and when he restores the session upon start. firejail 0.9.44.4 Ubuntu 16.10 Firefox 51.0b14 Any ideas how to fix this? Thx in advance!
gitea-mirror 2026-05-05 06:29:49 -06:00
Author
Owner

@curiosity-seeker commented on GitHub (Jan 14, 2017):

The obvious question is: Have you tried if this also happens if you start Firefox with Firejail?

<!-- gh-comment-id:272628081 --> @curiosity-seeker commented on GitHub (Jan 14, 2017): The obvious question is: Have you tried if this also happens if you start Firefox with Firejail?
Author
Owner

@fuelflo commented on GitHub (Jan 14, 2017):

No, this only happens when I start FF with firejail. Without firejail FF doesn't freeze in the same situation.

<!-- gh-comment-id:272633337 --> @fuelflo commented on GitHub (Jan 14, 2017): No, this only happens when I start FF _with_ firejail. Without firejail FF doesn't freeze in the same situation.
Author
Owner

@GiantCrocodile commented on GitHub (Jan 17, 2017):

My firefox froze once I started it with firejail but never again after that. I just had 1 tab open. Not sure if this is related somehow. I wasn't able to type into the URL bar anymore nor to press any button.

<!-- gh-comment-id:273239297 --> @GiantCrocodile commented on GitHub (Jan 17, 2017): My firefox froze once I started it with firejail but never again after that. I just had 1 tab open. Not sure if this is related somehow. I wasn't able to type into the URL bar anymore nor to press any button.
Author
Owner

@chiraag-nataraj commented on GitHub (Jan 22, 2017):

@fuelflo One thing you can try is to first try firejail --noprofile firefox to see if it still happens (which would indicate that one of the basic setup steps firejail does screws with firefox --- unlikely). Assuming that works fine, then comment out most of the profile and slowly uncomment lines until it freezes again. (If I had the same problem, I'd help you debug...unfortunately, that isn't the case).

Side note: There have been a couple of updates to firejail recently as well, so maybe you should update (if possible) before trying all of this.

[Edit] I just realized I'm a couple of betas behind on Firefox (51.0b5) and a couple of releases ahead on Firejail (0.9.44.8) and on Debian sid/experimental. In addition I use a custom profile (the one that's in my repo). I guess what I'm trying to get at is that my experience may not be too helpful here 😛

[Edit 2] I went ahead and upgraded my Firefox to 52.0a2 and still don't see the problem you're describing. This leaves either the Ubuntu version of Firefox somehow uniquely conflicting with Firejail or something in your profile. Can you post your profile here? I can try starting Firefox with that profile to see if I experience the same problem.

<!-- gh-comment-id:274358927 --> @chiraag-nataraj commented on GitHub (Jan 22, 2017): @fuelflo One thing you can try is to first try `firejail --noprofile firefox` to see if it still happens (which would indicate that one of the basic setup steps firejail does screws with firefox --- unlikely). Assuming that works fine, then comment out most of the profile and slowly uncomment lines until it freezes again. (If I had the same problem, I'd help you debug...unfortunately, that isn't the case). Side note: There have been a couple of updates to firejail recently as well, so maybe you should update (if possible) before trying all of this. [Edit] I just realized I'm a couple of betas behind on Firefox (51.0b5) and a couple of releases ahead on Firejail (0.9.44.8) and on Debian sid/experimental. In addition I use a custom profile (the one that's in my repo). I guess what I'm trying to get at is that my experience may not be too helpful here 😛 [Edit 2] I went ahead and upgraded my Firefox to 52.0a2 and still don't see the problem you're describing. This leaves either the Ubuntu version of Firefox somehow uniquely conflicting with Firejail or something in your profile. Can you post your profile here? I can try starting Firefox with that profile to see if I experience the same problem.
Author
Owner

@GiantCrocodile commented on GitHub (Jan 22, 2017):

After reading this comment here I just tried it again with Firejail 0.9.44.8 and my Firefox 50.1.0 hangs badly. It freezes everytime for some seconds and then it responds again by doing 1 thing like opening a tab and then freezes again and so on. I'm using Linux Mint. After launching it with firejail --noprofile firefox all freezes were gone and Firefox runs in Firejail as fast as usually without Firejail.

<!-- gh-comment-id:274362273 --> @GiantCrocodile commented on GitHub (Jan 22, 2017): After reading this comment here I just tried it again with Firejail 0.9.44.8 and my Firefox 50.1.0 hangs badly. It freezes everytime for some seconds and then it responds again by doing 1 thing like opening a tab and then freezes again and so on. I'm using Linux Mint. After launching it with `firejail --noprofile firefox` all freezes were gone and Firefox runs in Firejail as fast as usually without Firejail.
Author
Owner

@chiraag-nataraj commented on GitHub (Jan 22, 2017):

@GiantCrocodile Are you using the default profile?

<!-- gh-comment-id:274363200 --> @chiraag-nataraj commented on GitHub (Jan 22, 2017): @GiantCrocodile Are you using the default profile?
Author
Owner

@GiantCrocodile commented on GitHub (Jan 22, 2017):

Yes I am @chiraag-nataraj!

<!-- gh-comment-id:274364124 --> @GiantCrocodile commented on GitHub (Jan 22, 2017): Yes I am @chiraag-nataraj!
Author
Owner

@chiraag-nataraj commented on GitHub (Jan 22, 2017):

@GiantCrocodile Huh. Seems to work okay for me, even with the default profile...

<!-- gh-comment-id:274364664 --> @chiraag-nataraj commented on GitHub (Jan 22, 2017): @GiantCrocodile Huh. Seems to work okay for me, even with the default profile...
Author
Owner

@chiraag-nataraj commented on GitHub (Jan 22, 2017):

You can try my profile at https://github.com/chiraag-nataraj/firejail-profiles and see if it helps?

<!-- gh-comment-id:274364686 --> @chiraag-nataraj commented on GitHub (Jan 22, 2017): You can try my profile at https://github.com/chiraag-nataraj/firejail-profiles and see if it helps?
Author
Owner

@GiantCrocodile commented on GitHub (Jan 22, 2017):

@chiraag-nataraj I will try that later on. Not sure if this helps but I found this in the console when I launch Firefox with Firejail:

(firefox:2): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(firefox:2): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed

(firefox:2): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(firefox:2): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed
<!-- gh-comment-id:274365289 --> @GiantCrocodile commented on GitHub (Jan 22, 2017): @chiraag-nataraj I will try that later on. Not sure if this helps but I found this in the console when I launch Firefox with Firejail: ``` (firefox:2): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed (firefox:2): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed (firefox:2): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed (firefox:2): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed ```
Author
Owner

@chiraag-nataraj commented on GitHub (Jan 22, 2017):

That always comes up heh - no idea what it is, but it's harmless.

<!-- gh-comment-id:274365390 --> @chiraag-nataraj commented on GitHub (Jan 22, 2017): That always comes up heh - no idea what it is, but it's harmless.
Author
Owner

@GiantCrocodile commented on GitHub (Jan 22, 2017):

Maybe it is related to my modern kernel? I'm using version 4.4. Running Firejail with --debug option made it run smooth too. System logs don't show something special. It is just weird!

<!-- gh-comment-id:274366382 --> @GiantCrocodile commented on GitHub (Jan 22, 2017): Maybe it is related to my modern kernel? I'm using version 4.4. Running Firejail with `--debug` option made it run smooth too. System logs don't show something special. It is just weird!
Author
Owner

@chiraag-nataraj commented on GitHub (Jan 22, 2017):

I'm using kernel 4.8.11 😉

<!-- gh-comment-id:274366919 --> @chiraag-nataraj commented on GitHub (Jan 22, 2017): I'm using kernel 4.8.11 😉
Author
Owner

@fuelflo commented on GitHub (Jan 27, 2017):

@chiraag-nataraj using firejail version 0.9.44.8 now....still happens.
Thats the output from the console:

Reading profile /etc/firejail/firefox.profile
Reading profile /etc/firejail/disable-common.inc
Reading profile /etc/firejail/disable-programs.inc
Reading profile /etc/firejail/disable-devel.inc
Reading profile /etc/firejail/whitelist-common.inc
Parent pid 2566, child pid 2567
Blacklist violations are logged to syslog
Child process initialized
Redirecting symlink to /usr/bin/firefox
Warning: cannot switch euid to root
Warning: cannot switch egid to root
Warning: cannot switch euid to root
Warning: cannot switch egid to root
Warning: an existing sandbox was detected. /usr/bin/firefox will run without any additional sandboxing features
Child process initialized
ATTENTION: default value of option force_s3tc_enable overridden by environment.
ATTENTION: default value of option force_s3tc_enable overridden by environment.

When using --noprofile, FF does not freeze. I'll try commenting out stuff from the profile today and post the results.

<!-- gh-comment-id:275645780 --> @fuelflo commented on GitHub (Jan 27, 2017): @chiraag-nataraj using firejail version 0.9.44.8 now....still happens. Thats the output from the console: > Reading profile /etc/firejail/firefox.profile > Reading profile /etc/firejail/disable-common.inc > Reading profile /etc/firejail/disable-programs.inc > Reading profile /etc/firejail/disable-devel.inc > Reading profile /etc/firejail/whitelist-common.inc > Parent pid 2566, child pid 2567 > Blacklist violations are logged to syslog > Child process initialized > Redirecting symlink to /usr/bin/firefox > Warning: cannot switch euid to root > Warning: cannot switch egid to root > Warning: cannot switch euid to root > Warning: cannot switch egid to root > Warning: an existing sandbox was detected. /usr/bin/firefox will run without any additional sandboxing features > Child process initialized > ATTENTION: default value of option force_s3tc_enable overridden by environment. > ATTENTION: default value of option force_s3tc_enable overridden by environment. When using --noprofile, FF does not freeze. I'll try commenting out stuff from the profile today and post the results.
Author
Owner

@chiraag-nataraj commented on GitHub (Jan 27, 2017):

Note that it's not actually using the firefox profile...at least not in the example you posted the output from. See that Warning: an existing sandbox was detected. /usr/bin/firefox will run without any additional sandboxing features? Are you running it from within another sandbox?

<!-- gh-comment-id:275668466 --> @chiraag-nataraj commented on GitHub (Jan 27, 2017): Note that it's not actually using the firefox profile...at least not in the example you posted the output from. See that `Warning: an existing sandbox was detected. /usr/bin/firefox will run without any additional sandboxing features`? Are you running it from within another sandbox?
Author
Owner

@fuelflo commented on GitHub (Jan 27, 2017):

Okay, thanks....that problem was probably caused, because I had a symlink in /usr/local/bin to automatically start all firefox instances with firejail. And while using 'firejail firefox' he called 'firejail firejail firefox' is that possible? However I deleted the link for now and it is running without the sandboxing error.

Concerning the profile....I checked everything and the problem only appears when I have seccomp activated.

<!-- gh-comment-id:275683218 --> @fuelflo commented on GitHub (Jan 27, 2017): Okay, thanks....that problem was probably caused, because I had a symlink in /usr/local/bin to automatically start all firefox instances with firejail. And while using `'firejail firefox'` he called `'firejail firejail firefox'` is that possible? However I deleted the link for now and it is running without the sandboxing error. Concerning the profile....I checked everything and the problem only appears when I have `seccomp` activated.
Author
Owner

@chiraag-nataraj commented on GitHub (Jan 28, 2017):

Huh interesting. That's worrying...

<!-- gh-comment-id:275823023 --> @chiraag-nataraj commented on GitHub (Jan 28, 2017): Huh interesting. That's worrying...
Author
Owner

@netblue30 commented on GitHub (Jan 28, 2017):

firejail firejail firefox

The first "firejail" disables SUID, so the second "firejail" will be killed immediately by the sandbox.

<!-- gh-comment-id:275850060 --> @netblue30 commented on GitHub (Jan 28, 2017): > firejail firejail firefox The first "firejail" disables SUID, so the second "firejail" will be killed immediately by the sandbox.
Author
Owner

@fuelflo commented on GitHub (Jan 28, 2017):

@chiraag-nataraj why? if FF would be doing malicious syscalls shouldnt they just be blocked and not nessesarily freeze FF?

@netblue30 any idea how i could continue debugging? strace -qcf to see what calls he is making?

<!-- gh-comment-id:275866213 --> @fuelflo commented on GitHub (Jan 28, 2017): @chiraag-nataraj why? if FF would be doing malicious syscalls shouldnt they just be blocked and not nessesarily freeze FF? @netblue30 any idea how i could continue debugging? `strace -qcf` to see what calls he is making?
Author
Owner

@chiraag-nataraj commented on GitHub (Jan 29, 2017):

@fuelflo Well it's worrying because seccomp provides a huge part of the protection for most profiles (unless the program implements its own seccomp filter).

<!-- gh-comment-id:275886855 --> @chiraag-nataraj commented on GitHub (Jan 29, 2017): @fuelflo Well it's worrying because seccomp provides a huge part of the protection for most profiles (unless the program implements its **own** seccomp filter).
Author
Owner

@fuelflo commented on GitHub (Jan 29, 2017):

@chiraag-nataraj which FF might have? I'm not a pro and not sure how its implemented, but if you scroll way down on the FF about:support page you find this:

Sandbox
Seccomp-BPF (System Call Filtering) true
Seccomp Thread Synchronization true
User Namespaces true
Media Plugin Sandboxing true

<!-- gh-comment-id:275901099 --> @fuelflo commented on GitHub (Jan 29, 2017): @chiraag-nataraj which FF might have? I'm not a pro and not sure how its implemented, but if you scroll way down on the FF about:support page you find this: > Sandbox > Seccomp-BPF (System Call Filtering) true > Seccomp Thread Synchronization true > User Namespaces true > Media Plugin Sandboxing true
Author
Owner

@chiraag-nataraj commented on GitHub (Jan 29, 2017):

Huh...you're right. I think that might be relatively new. So it's funny because my firefox has also ostensibly implemented seccomp-bpf, but if I don't run firefox with seccomp, it exits saying that GTK refuses to run as root.

<!-- gh-comment-id:275923110 --> @chiraag-nataraj commented on GitHub (Jan 29, 2017): Huh...you're right. I think that might be relatively new. So it's funny because my firefox has also ostensibly implemented seccomp-bpf, but if I _don't_ run firefox with seccomp, it exits saying that GTK refuses to run as root.
Author
Owner

@chiraag-nataraj commented on GitHub (Feb 5, 2017):

Also different - mine (for some reason) disabled user namespaces (but keeps them enabled for privileged processes...?).

<!-- gh-comment-id:277535741 --> @chiraag-nataraj commented on GitHub (Feb 5, 2017): Also different - mine (for some reason) disabled user namespaces (but keeps them enabled for privileged processes...?).
Author
Owner

@anatoli26 commented on GitHub (Mar 25, 2017):

I just tried FJ from this repo (0.9.45) with Firefox 52.0.1 on Ubuntu 16.04 stock and it hanged as @fuelflo described in the initial post. Why this issue was closed? Is there a fix or a workaround?

<!-- gh-comment-id:289181898 --> @anatoli26 commented on GitHub (Mar 25, 2017): I just tried FJ from this repo (0.9.45) with Firefox 52.0.1 on Ubuntu 16.04 stock and it hanged as @fuelflo described in the initial post. Why this issue was closed? Is there a fix or a workaround?
Author
Owner

@netblue30 commented on GitHub (Mar 26, 2017):

I'll reopen it, thanks.

<!-- gh-comment-id:289292757 --> @netblue30 commented on GitHub (Mar 26, 2017): I'll reopen it, thanks.
Author
Owner

@guillaume-uH57J9 commented on GitHub (Jul 10, 2017):

I reproduce this with Firejail 0.9.48, and Firefox 52.2.0.
There are several tabs opened (some tabs are older than 1 of my young nephews).

Was this closed because it was fixed recently? Consider reopening this otherwise.

FJ and FF are installed from the Debian testing repository (amd64), contrary to @fuelflo who is using Ubuntu, so that is not Ubuntu specific.

Nothing in the logs looks like a sandbox violation warning from firejail.
The logs I looked at are "journalctl -f" and "tail -f /var/log/syslog"

Summary of tests conducted:

  • Firejail + Firefox + my profile with many tabs + extensions : freeze
  • Firejail + Firefox + my profile with many tabs (w/o extensions) : freeze
  • Firejail + Firefox + fresh new profile with 2 tabs : okay
  • Firefox + my profile with many tabs + extensions : okay
<!-- gh-comment-id:314179207 --> @guillaume-uH57J9 commented on GitHub (Jul 10, 2017): I reproduce this with Firejail 0.9.48, and Firefox 52.2.0. There are several tabs opened (some tabs are older than 1 of my young nephews). Was this closed because it was fixed recently? Consider reopening this otherwise. FJ and FF are installed from the Debian testing repository (amd64), contrary to @fuelflo who is using Ubuntu, so that is not Ubuntu specific. Nothing in the logs looks like a sandbox violation warning from firejail. The logs I looked at are "journalctl -f" and "tail -f /var/log/syslog" Summary of tests conducted: * Firejail + Firefox + my profile with many tabs + extensions : freeze * Firejail + Firefox + my profile with many tabs (w/o extensions) : freeze * Firejail + Firefox + fresh new profile with 2 tabs : okay * Firefox + my profile with many tabs + extensions : okay
Author
Owner

@curiosity-seeker commented on GitHub (Jul 11, 2017):

@guillaume-uH57J9 : You didn't tell us if you used extensions in the 3rd case (fresh new profile). And you should also test it with many tabs.

If it's still okay this suggests that your normal profile is corrupted.

<!-- gh-comment-id:314396461 --> @curiosity-seeker commented on GitHub (Jul 11, 2017): @guillaume-uH57J9 : You didn't tell us if you used extensions in the 3rd case (fresh new profile). And you should also test it with many tabs. If it's still okay this suggests that your normal profile is corrupted.
Author
Owner

@guillaume-uH57J9 commented on GitHub (Jul 11, 2017):

@curiosity-seeker no extension was used in the 3rd case, as the "fresh new profile" imply

I created a new profile with many tabs and couldn't reproduce yet. However I suspect there might not be enough tabs, any tip on creating many tabs quickly?

I am skeptical about "your normal profile is corrupted", since Firefox never freezes when started normally, but repeatedly freeze when started with firejail.
Also, multiple people have reported the same issue, so it's unlikely a random profile corruption is causing this.

<!-- gh-comment-id:314537276 --> @guillaume-uH57J9 commented on GitHub (Jul 11, 2017): @curiosity-seeker no extension was used in the 3rd case, as the "fresh new profile" imply I created a new profile with many tabs and couldn't reproduce yet. However I suspect there might not be enough tabs, any tip on creating many tabs quickly? I am skeptical about "your normal profile is corrupted", since Firefox never freezes when started normally, but repeatedly freeze when started with firejail. Also, multiple people have reported the same issue, so it's unlikely a random profile corruption is causing this.
Author
Owner

@vn971 commented on GitHub (Dec 22, 2017):

"works for me"(C). I do use firefox with firejail, and I never have freezes.

I use a custom profile without blacklists though. (I prefer to always have a whitelist for firejail-ed apps instead.)
My profile also includes the following lines:

private-bin firefox,icecat,icecat-bin
seccomp.block-secondary
shell none
private-dev

Hope that can help in diagnostics. (You can try those settings in your firefox to see if it'll hang.)

<!-- gh-comment-id:353571620 --> @vn971 commented on GitHub (Dec 22, 2017): "works for me"(C). I do use firefox with firejail, and I never have freezes. I use a custom profile without blacklists though. (I prefer to always have a whitelist for firejail-ed apps instead.) My profile also includes the following lines: ``` private-bin firefox,icecat,icecat-bin seccomp.block-secondary shell none private-dev ``` Hope that can help in diagnostics. (You can try those settings in your firefox to see if it'll hang.)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#714
No description provided.