NVIDIA / egl-wayland

The EGLStream-based Wayland external platform
MIT License
293 stars 47 forks source link

Firefox randomly crashes with "Exiting due to channel error" #73

Closed git-bruh closed 5 months ago

git-bruh commented 1 year ago

Firefox seems to randomly exit during normal usage, say while opening the downloads menu, middle-clicking or right-clicking. It's not reproducible at all though, happens like once in 2 days or usage.

Not sure if this is an NVIDIA related bug or a firefox bug, but I've attached both sway and firefox logs so someone more familiar with this stuff can comment.

nvidia 525.60.11 (Happened on older versions aswell) sway 1.8-rc1 (Happened on older versions aswell) gtk+3 3.24.34 wlroots 0.16.0 wayland 1.21.0

Sway log: https://bugzilla.mozilla.org/attachment.cgi?id=9306380 Firefox log: https://bugzilla.mozilla.org/attachment.cgi?id=9306381

Firefox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1795663

vieiraa commented 1 year ago

I'm having a similar problem, and it is very reproducible. All I have to do to trigger the crash is watch a few minutes of a Youtube video in fullscreen and then exit fullscreen.

I'm using GNOME 44, firefox 116.0.2 and nvidia 535.98.

teatwig commented 1 year ago

I have the same problem. Gnome 44, Firefox 117, Nvidia 535.104.05. It's not consistently reproducible but most of the time happens when unmaximizing the window.

sontjer commented 1 year ago

I'm having a similar problem, and it is very reproducible. All I have to do to trigger the crash is watch a few minutes of a Youtube video in fullscreen and then exit fullscreen.

I'm using GNOME 44, firefox 116.0.2 and nvidia 535.98.

I have experienced the same as you described. Wayland- NV Hardware acceleration-Firefox 117. X11 all fine.

erik-kz commented 1 year ago

I've seen similar crashes sporadically on Intel hardware, so I'm not sure that this is NVIDIA specific.

AlynxZhou commented 1 year ago

I got crash most likely closing a tab with a video stream, my firefox crash report (https://crash-stats.mozilla.org/report/index/8e4cc429-9756-4abc-bcfd-8761f0230920) says it happens in egl-wayland.

erik-kz commented 1 year ago

@AlynxZhou I have a theory about that explained in my last comment here https://bugzilla.mozilla.org/show_bug.cgi?id=1850285

Unfortunately I cannot reproduce the crash to confirm. Would you be willing to build egl-wayland with the patch linked on that bug report to see if it fixes things?

AlynxZhou commented 1 year ago

@AlynxZhou I have a theory about that explained in my last comment here https://bugzilla.mozilla.org/show_bug.cgi?id=1850285

Unfortunately I cannot reproduce the crash to confirm. Would you be willing to build egl-wayland with the patch linked on that bug report to see if it fixes things?

No problem!

AlynxZhou commented 1 year ago

@erik-kz I think it fixes the crash, but I may need more test because the crash does not happen every time.

I think I need to logout my Wayland session and re-login to load the patched version of egl-wayland, right?

What I tried:

I'll continue trying the patched version tomorrow and if I got crash I'll tell you ASAP.

AlynxZhou commented 1 year ago

Oh no, my firefox just crashed with the patched egl-wayland, I just drag a video tab out and let it play for some minutes and drag it back.

AlynxZhou commented 1 year ago

This time the crash backtrace is a little bit different: https://crash-stats.mozilla.org/report/index/e0728872-f710-4ea2-80fa-911570230920

erik-kz commented 1 year ago

Thank you very much for testing. Just to confirm, did you apply the patch on top of the git master branch? In particular, did your build also have this commit https://github.com/NVIDIA/egl-wayland/commit/3ead05d4587991b75dc704444b1b1365c08af5ce ?

AlynxZhou commented 1 year ago

Thank you very much for testing. Just to confirm, did you apply the patch on top of the git master branch? In particular, did your build also have this commit 3ead05d ?

No, I build it against egl-wayland in Arch's official repo, will try master today.

AlynxZhou commented 1 year ago

This time it looks fine, but please wait for more tests today. I'll tell you if it crashes again.

AlynxZhou commented 1 year ago

I think this time it fixes this bug. I've tested a lot.

erik-kz commented 1 year ago

Awesome, I'll get the patch checked in then. Again, thank you so much for your help.

AlynxZhou commented 1 year ago

Awesome, I'll get the patch checked in then. Again, thank you so much for your help.

This is one of the most annoying problems on my Wayland experience with NVIDIA (well, another one is https://gitlab.freedesktop.org/xorg/xserver/-/issues/1317, but at least it won't crash and for me only happens with Slack), I am so grateful for all your works on making NVIDIA users' Wayland experience better including this one 😸️

CosmicFusion commented 11 months ago

Without this patch, firefox crashes when going fullscreen with nv hwaccel 100% of the time

With this patch applied, firefox plays fullscreen video with nv hwaccel but messing around with the video causes a crash

Definitely an improvement