Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Some Javascript crashes Firefox
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
chaoscommander
Tux's lil' helper
Tux's lil' helper


Joined: 15 Oct 2012
Posts: 106

PostPosted: Sat Oct 08, 2016 9:12 am    Post subject: Some Javascript crashes Firefox Reply with quote

There are some websites I can't use with JS enabled (prominent example: Twitter) or Firefox will immediately segfault upon loading the page. I tried building FF with debug symbols, but https://bugs.gentoo.org/show_bug.cgi?id=583266. So, since I enabled some rather unusual USE flags, I'm wondering if anyone knows of a connection (before I go the trial-and-error way with a package that takes 5-10 hours to compile each time). Here's the output of "eix firefox":
Code:

Installed versions: 49.0^d(10:25:44 07.10.2016)(custom-optimization dbus gmp-autoupdate hwaccel jemalloc jit pgo skia startup-notification system-harfbuzz system-icu system-jpeg system-libevent system-libvpx system-sqlite -bindist -custom-cflags -debug -gtk2 -hardened -neon -pulseaudio -selinux -system-cairo -test -wifi L10N="de -ach -af -an -ar -as -ast -az -be -bg -bn-BD -bn-IN -br -bs -ca -cs -cy -da -el -en-GB -en-ZA -eo -es-AR -es-CL -es-ES -es-MX -et -eu -fa -fi -fr -fy -ga -gd -gl -gu -he -hi -hr -hsb -hu -hy -id -is -it -ja -kk -km -kn -ko -lt -lv -mai -mk -ml -mr -ms -nb -nl -nn -or -pa -pl -pt-BR -pt-PT -rm -ro -ru -si -sk -sl -son -sq -sr -sv -ta -te -th -tr -uk -uz -vi -xh -zh-CN -zh-TW")

BTW, happy that pgo finally works! Or could it be the cause of my problem after all?

[Moderator edit: added [code] tags to preserve output layout. -Hu]
Back to top
View user's profile Send private message
Apheus
Guru
Guru


Joined: 12 Jul 2008
Posts: 422

PostPosted: Sat Oct 08, 2016 9:39 am    Post subject: Reply with quote

With pgo, you get double the compile time, and you get potentially different results of each emerge run: If, for some reason, the profile run performs differently because your system has a different workload because of other tasks, different optimisations could be enabled for the second compile run at each subsequent firefox emerge. It will be hard to systematically search for the reason that way...

However, in my experience firefox crashes have always been due to graphic driver bugs. Try without "hwaccel", but disable "Use hardware acceleration if available" in firefox's options-advanced first.

Also, disable all plugins and addons, try with a new firefox profile or a new user profile.
_________________
My phrenologist says I'm stupid.
Back to top
View user's profile Send private message
chaoscommander
Tux's lil' helper
Tux's lil' helper


Joined: 15 Oct 2012
Posts: 106

PostPosted: Sat Oct 08, 2016 10:01 am    Post subject: Reply with quote

Apheus wrote:
Also, disable all plugins and addons, try with a new firefox profile or a new user profile.

Tried that, didn't work.

Turning off hardware acceleration also doesn't help. Should I still try rebuilding without it? In case of a rebuild I will definitely turn off pgo, considering your remarks about non-reproducibility.

Oh, by the way, another oddity: The settings tab "Advanced - Data reporting (? using German translation)" is empty. No text, no options. How can this be?
Back to top
View user's profile Send private message
Apheus
Guru
Guru


Joined: 12 Jul 2008
Posts: 422

PostPosted: Sat Oct 08, 2016 2:27 pm    Post subject: Reply with quote

chaoscommander wrote:
Turning off hardware acceleration also doesn't help. Should I still try rebuilding without it?


Does "about:support" mention anything about acceleration in the "graphics" section?

The use flag "skia" toggles availability of the new "skia" rendering backend which is supposed to replace cairo. I don't know if mozilla have already enabled skia by default in Firefox 49. You could try to switch the backend for rendering content and/or browser UI in about:config:

Code:
gfx.canvas.azure.backends
gfx.content.azure.backends


Possible values are "cairo" and "skia". Restart the browser after changing this. If the browser does not start at all, you will have to edit <path-to-firefox-profile>/prefs.js with a text editor and change it back.

Quote:
Oh, by the way, another oddity: The settings tab "Advanced - Data reporting (? using German translation)" is empty. No text, no options. How can this be?


I have "Firefox health report" there. Firefox 45 here. Did you disable something about health reporting in about:config? But this should not cause a crash anyway.
_________________
My phrenologist says I'm stupid.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21494

PostPosted: Sat Oct 08, 2016 3:38 pm    Post subject: Reply with quote

You said that this is related to Javascript. Does that mean that, if you use NoScript to disable all Javascript on that page, then Firefox does not crash? The page will likely work poorly (if at all) with Javascript blocked, so this is a diagnostic, not a long term workaround. I note that you have JIT enabled. Is there anything relevant in dmesg after a crash? I wonder if your Firefox might be trying to JIT-compile Javascript into native code, placing that code into a non-executable page, and then trying to execute it anyway. If it did, I would expect a crash. I do not know why Firefox would do that, but if it did, a crash would be likely.

Have you tried starting Firefox using its "Safe Mode"? This turns off various features, and according to MozillaZine:Safe_Mode, Firefox Safe Mode disables the JIT compiler.
Back to top
View user's profile Send private message
chaoscommander
Tux's lil' helper
Tux's lil' helper


Joined: 15 Oct 2012
Posts: 106

PostPosted: Mon Nov 07, 2016 8:16 pm    Post subject: Reply with quote

Sorry, didn't look into this thread again before recompiling without all the system-xyz USE flags and without pgo (and it took me until today to find a calm afternoon for general Gentoo maintenance). After doing so, the problem seems to have disappeared, so I can't reproduce it at the moment to debug it. If anyone believes it's really important for further development, I could re-enable the suspicious options and recompile FF again, but for now I'm happy it just works. :wink: I might, however, do that at some point later, possibly with the next regular FF update when I have to rebuild anyway, and get back to the above suggestions to find out what's going on, in case someone is curious.

Hu:
Exactly, when JS is blocked using NoScript, no crash happens. I didn't look into dmesg. Turning on Safe Mode also "fixed" the problem.

Apheus:
I haven't manually disabled anything, it almost looks like the whole stuff hasn't been compiled in but I didn't see any USE flag affecting data reporting. I'm sure this had nothing to do with the crashes, I just stumbled over the fact that I have an empty Settings tab where there should be things to configure.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum