void-linux / void-packages

The Void source packages collection
https://voidlinux.org
Other
2.52k stars 2.12k forks source link

Firefox crashes ( window closes) from time to time #50829

Closed haheute closed 2 months ago

haheute commented 3 months ago

Is this a new report?

Yes

System Info

Void 6.6.32_1 x86_64 AuthenticAMD uptodate rFFFFF

Package(s) Affected

firefox-127.0_1

Does a report exist for this bug with the project's home (upstream) and/or another distro?

No response

Expected behaviour

The Firefox window should not close on seemingly random sites or addresses.

Actual behaviour

Since some days I experience crashes from time to time. The first when I wanted to view a .pdf from my bank... then some on Mastodon sites, and the last one, when I try to open this site: https://maven.ly The browser window just closes immediately.

After the upgrade to Firefox 127.0 the problem still existed, so I tried and deleted everything in ~/.mozilla/firefox and started the browser again. It still crashed. Also with a private window.

Then I installed the noscript extension and then the window did not crash.. Maybe it is some Javascript problem.(?)

Steps to reproduce

  1. try to open this site (I have nothing to do with it, just use it to see if my Firefox works again): https://maven.ly
  2. see if the browser window closes or not
chrysos349 commented 3 months ago

see if the browser window closes or not

the site opens.

haheute commented 3 months ago

I am now on another machine, a laptop..

xuname: Void 6.6.32_1 x86_64 AuthenticAMD uptodate rFF

At first I thought, maybe my other PC has a hardware fault, because it seemed to work here, on the laptop. But then I did a doas xbps-install -Su (the last one was 1 or 2 weeks ago) and tried again.

And: the website then crashed Firefox. I don't know what could cause it. There were some linux-firmware updates and some with mesa . (and some libs I didn't really know)

Maybe that then? Some graphic problems maybe ?

biopsin commented 3 months ago

@haheute did you try launching it from terminal and see what it prints and dmesg?

haheute commented 3 months ago

@biopsin not yet, but that's a good idea :+1:

start:

ATTENTION: default value of option mesa_glthread overridden by environment.
console.error: ({})

when crashing:

ATTENTION: default value of option mesa_glthread overridden by environment.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
zsh: segmentation fault  firefox
Luciogi commented 3 months ago

Which GPU ? DE ? Multimonitor setup ?

haheute commented 3 months ago

GPU I don't know. Both, PC and Laptop use XFCE, and no multimonitor setup.

Luciogi commented 3 months ago

Try using firefox test mode

haheute commented 3 months ago

Thanks.. I have tried 2 times, the browser did not crash and I could see the website, these messages appeared in the terminal window (after closing firefox):

haheute@uboot ~ % firefox -safe-mode
console.error: ({})
JavaScript warning: https://www.googletagmanager.com/gtag/js?id=G-3ST289VE3Y, line 189: Script terminated by timeout at:
z@https://www.googletagmanager.com/gtag/js?id=G-3ST289VE3Y:189:192
RA@https://www.googletagmanager.com/gtag/js?id=G-3ST289VE3Y:549:134
SA/<@https://www.googletagmanager.com/gtag/js?id=G-3ST289VE3Y:549:111

Crash Annotation GraphicsCriticalError: |[0][GFX1-]: RenderCompositorSWGL failed mapping default framebuffer, no dt (t=27.5005) [GFX1-]: RenderCompositorSWGL failed mapping default framebuffer, no dt
haheute@uboot ~ % firefox -safe-mode
console.error: ({})
JavaScript warning: https://www.googletagmanager.com/gtag/js?id=G-3ST289VE3Y, line 189: Script terminated by timeout at:
z@https://www.googletagmanager.com/gtag/js?id=G-3ST289VE3Y:189:192
RA@https://www.googletagmanager.com/gtag/js?id=G-3ST289VE3Y:549:134
SA/<@https://www.googletagmanager.com/gtag/js?id=G-3ST289VE3Y:549:111
piekay commented 3 months ago

Thanks.. I have tried 2 times, the browser did not crash and I could see the website, these messages appeared in the terminal window (after closing firefox):

haheute@uboot ~ % firefox -safe-mode
console.error: ({})
JavaScript warning: https://www.googletagmanager.com/gtag/js?id=G-3ST289VE3Y, line 189: Script terminated by timeout at:
z@https://www.googletagmanager.com/gtag/js?id=G-3ST289VE3Y:189:192
RA@https://www.googletagmanager.com/gtag/js?id=G-3ST289VE3Y:549:134
SA/<@https://www.googletagmanager.com/gtag/js?id=G-3ST289VE3Y:549:111

Crash Annotation GraphicsCriticalError: |[0][GFX1-]: RenderCompositorSWGL failed mapping default framebuffer, no dt (t=27.5005) [GFX1-]: RenderCompositorSWGL failed mapping default framebuffer, no dt
haheute@uboot ~ % firefox -safe-mode
console.error: ({})
JavaScript warning: https://www.googletagmanager.com/gtag/js?id=G-3ST289VE3Y, line 189: Script terminated by timeout at:
z@https://www.googletagmanager.com/gtag/js?id=G-3ST289VE3Y:189:192
RA@https://www.googletagmanager.com/gtag/js?id=G-3ST289VE3Y:549:134
SA/<@https://www.googletagmanager.com/gtag/js?id=G-3ST289VE3Y:549:111

Safe mode launches the browser without extensions or themes, so your problem is probably a faulty extension or theme.

Are you only using NoScript or any other extension?

haheute commented 3 months ago

Thanks for the answer, but: I have deleted everything in ~/.mozilla/firefox and tried with a "blank" browser.. the problem persisted. also without addons and personal settings..

Before, there were some extensions installed, not NoScript, but some others. I think Ublock Origin, a translator (linguist), browserpass, and one or two others..

It's not that critical for me, as I can use chromium...

Luciogi commented 3 months ago

You could also try firefox with new profile firefox -p , create new profile from menu and use it for testing

neoklis commented 3 months ago
1. try to open this site (I have nothing to do with it, just use it to see if my Firefox works again): https://maven.ly

2. see if the browser window closes or not

I was having the same problem with firefox 127.0 with other websites too. Running under gdb it looked like graphics canvas acceleration was the problem. I disabled gfx.canvas.accelerated in about:config and that fixed the problem. Likely this is not a firefox bug?

neoklis

neoklis commented 3 months ago
1. try to open this site (I have nothing to do with it, just use it to see if my Firefox works again): https://maven.ly

2. see if the browser window closes or not

I may have spoken too soon :-( Although I no longer have crashes related to graphics canvas, I now had a crash due to a segfault in mozilla's libxul. But it was a one-off, not a stable reproducible crash.

-- neoklis

piekay commented 3 months ago

Can you reproduce the issue with the Flatpak version?

haheute commented 3 months ago

Yes, with the flatpak version it is the same here.

neoklis commented 3 months ago

Can you reproduce the issue with the Flatpak version?

I installed flatpak and asked it to install firefox. But although it reported that firefox was successfully installed, there is no firefox executable in /usr/bin and the command "firefox" fails. Mind you, its the first time I use flatpak...

-- neoklis

haheute commented 3 months ago

I installed it so: flatpak install flathub org.mozilla.firefox and then started it so: flatpak run org.mozilla.firefox instructions from the flathub pages: https://flathub.org/apps/org.mozilla.firefox when you click the small down arrow next to "install"

neoklis commented 3 months ago

OK thanks. It worked but I also got identical crash behavior on same sites, including maps.google.com.

neoklis

piekay commented 3 months ago

If it is reproducible with the Flatpak this is probably a Firefox, not a Void Linux issue

neoklis commented 3 months ago

More likely, yes, but it could also be some lib provided by Void. I suppose we may know when the next version is released.

neoklis

piekay commented 3 months ago

More likely, yes, but it could also be some lib provided by Void. I suppose we may know when the next version is released.

--

neoklis

The entire point of Flatpak is not having to use system libraries, so that is very unlikely.

https://docs.flatpak.org/en/latest/dependencies.html

One of the key advantages of Flatpak is that it allows application authors to bundle whatever libraries or dependencies that they want. This means that developers aren’t constrained by which libraries are available through Linux distributions.

It isn't impossible that it is a Void library, but increasingly unlikely. I currently believe this to be a Firefox issue. Since the Firefox Flatpak is officially maintained by Mozilla I would recommend reporting the bug directly to them

neoklis commented 3 months ago

OK, thank you. Actually this sounds similar to the app installation method of the RiscOS operating system of the early 90's as used in the Archimedes and other computers produced by ARM. I used to have one :-)

neoklis

cplir-c commented 3 months ago

For a few weeks, Firefox froze for about a minute when I tried to open specific kinds of dialogue boxes or dropdown menus. It happened after I removed what qt5 packages I could, and has stopped by now. I haven't had a problem like this thread is about; is there a way I can test this? Currently using the MOZ_ENABLE_WAYLAND env var to run Firefox on Sway.

lampmerchant commented 2 months ago

I started noticing what I believe is this same issue when I upgraded mesa-24.0.7_1 to mesa-24.1.1_2 (24.1.2_1 did not solve the issue).

Backtrace here: core.2330.backtrace.txt

I brought this to their IRC channel and they matched it to this issue, for which a fix is currently out for review: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11352

rdindir commented 2 months ago

I have the same issue. I am using

uname: Linux 6.6.37_1 #1 SMP PREEMPT_DYNAMIC Fri Jul  5 15:49:51 UTC 2024 x86_64 GNU/Linux
xuname: Void 6.6.37_1 x86_64 AuthenticAMD uptodate rrFF

Have filed an issue with mozilla/firefox some time ago. The details are in there. I suspect this has something to do with the patches, but I am not sure.

When I try to open webwhatsapp, it crashes. This is persistent, and did not happen 2 months ago (with version 125 or somthing, but am not sure about the version).

If I disable the performance settings (hardware acceleration) it does not crash. You might try disabling the "Use hardware acceleration when available" under the performance settings.

I am also not able to open the about:crashes page (I am using firefox 127.0.2). Maybe you can verify this too (that the crashes page does not open in the current version of firefox on voidlinux). But you can get more information with the about:crashes page, if you can open that.

The issue on mozilla is at https://bugzilla.mozilla.org/show_bug.cgi?id=1902589. This shows me that there is a problem with libEGL_mesa.so.0 or libc.so.6. But am not sure. But it crashes in the CanvasRenderer thread, looks like.

Anyways, when I have more information on this issue, I will either create a new ticket or report the findings here.

rdindir commented 2 months ago

Downgrading mesa and mesa-dri to version 24.0.7_1 solved the problem of firefox unexpectedly closing (crashing) for me. Mesa and mesa-dri version 24.1.1_2 did not work (firefox crashes).

My current system configuration is

xuname: Void 6.6.37_1 x86_64 AuthenticAMD uptodate rrFF
firefox: 128.0_1
graphics: radeon
lampmerchant commented 2 months ago

The fix has been merged and the issue has been closed as of this past Wednesday.

haheute commented 2 months ago

It seems to work here now, with mesa-dri-24.1.4_1 .