Bug 202362 - [GTK] White pages in AC mode: Cannot get default EGL display: EGL_BAD_PARAMETER
Summary: [GTK] White pages in AC mode: Cannot get default EGL display: EGL_BAD_PARAMETER
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 192523
  Show dependency treegraph
 
Reported: 2019-09-30 06:07 PDT by Michael Catanzaro
Modified: 2019-10-14 22:30 PDT (History)
14 users (show)

See Also:


Attachments
Patch (6.51 KB, patch)
2019-10-08 03:35 PDT, Carlos Garcia Campos
clopez: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Catanzaro 2019-09-30 06:07:36 PDT
Since all the other AC mode failures in bug #192523 were resolved, I tried reenabling AC mode in Epiphany (hardware acceleration policy NEVER -> ON_DEMAND), but this failed. It sometimes works, but often all web processes display only blank white pages until the browser is restarted, so we'll give up again. It's a regression from either 2.24 or 2.26, not sure which because we haven't had AC mode enabled in Epiphany since 2.22 era.
Comment 1 Carlos Garcia Campos 2019-09-30 06:26:23 PDT
Never happened here.
Comment 2 Carlos Alberto Lopez Perez 2019-09-30 13:32:45 PDT
Is this reproducible only with flatpak+epiphany_tech_preview? or is also reproducible outside of flatpak? 

What does about:gpu says? I wonder if it may be caused by incorrect graphic drivers inside the flatpak environment.
Comment 3 Michael Catanzaro 2019-09-30 13:40:14 PDT
So far I've only noticed it in Tech Preview, but that's because it's what I use as my daily browser.

It's not reproducible at all, so it's not easy to check if it occurs outside flatpak without disruption. I'd have to use system Epiphany for several days to be confident the issue does not occur there.

about:gpu is a blank page. Epiphany does not have an about:gpu and I don't think it ever did.
Comment 4 Adrian Perez 2019-09-30 13:54:39 PDT
(In reply to Michael Catanzaro from comment #3)
> So far I've only noticed it in Tech Preview, but that's because it's what I
> use as my daily browser.
> 
> It's not reproducible at all, so it's not easy to check if it occurs outside
> flatpak without disruption. I'd have to use system Epiphany for several days
> to be confident the issue does not occur there.

In which page have you noticed the problem? Even if it's very
intermittent, if there is there some particular known to result
in a white page when switching to AC mode would be already be
of help. Here I tend to use Epiphany from distribution packages
or built by me against system libraries, so I can try to help
out and see whether it shows outside of Flatpak.

> about:gpu is a blank page. Epiphany does not have an about:gpu and I don't
> think it ever did.

The support for about:gpu has landed just today (see bug #202305 for
that), so I suppose it will take still a bit to be in Tech Preview :)
Comment 5 Michael Catanzaro 2019-09-30 15:42:00 PDT
(In reply to Adrian Perez from comment #4)
> In which page have you noticed the problem? Even if it's very
> intermittent, if there is there some particular known to result
> in a white page when switching to AC mode would be already be
> of help. Here I tend to use Epiphany from distribution packages
> or built by me against system libraries, so I can try to help
> out and see whether it shows outside of Flatpak.

No, it's not any particular page. It's a UI process issue. When the issue occurs, all pages that trigger AC mode are white until the browser is restarted. Sorry if that wasn't clear enough from my initial report.

> > about:gpu is a blank page. Epiphany does not have an about:gpu and I don't
> > think it ever did.
> 
> The support for about:gpu has landed just today (see bug #202305 for
> that), so I suppose it will take still a bit to be in Tech Preview :)

I'll try to get 2.27.1 into the runtime as soon as it's released, as usual (unless the MSE rework is not fixed first, in which case I'll skip releases until that's sorted).
Comment 6 Carlos Garcia Campos 2019-10-01 00:59:57 PDT
X11 or Wayland? wpe renderer or wayland compositor? Does resizing the browser window instead of restart fix it too?
Comment 7 Michael Catanzaro 2019-10-01 02:33:48 PDT
(In reply to Carlos Garcia Campos from comment #6)
> X11 or Wayland?

Wayland

> wpe renderer or wayland compositor?

WPE renderer

> Does resizing the
> browser window instead of restart fix it too?

I'll try to find out.
Comment 8 Michael Catanzaro 2019-10-02 15:23:38 PDT
Well it's been two days and I haven't noticed this bug again, so maybe it's not as common as I'd feared. I've toggled AC mode back on in Epiphany... we can see how many bug reports we get between now and 3.36.
Comment 9 Michael Catanzaro 2019-10-04 06:17:54 PDT
OK, I'm seeing the bug right now and resizing the page does NOT help avoid the issue.

I have warnings in my journal:

Oct 04 08:14:31 chargestone-cave org.gnome.Epiphany.Devel.desktop[1896]: Cannot get default EGL display: EGL_BAD_PARAMETER
Oct 04 08:14:31 chargestone-cave org.gnome.Epiphany.Devel.desktop[1896]: Cannot create EGL context: invalid display (last error: EGL_SUCCESS)
Oct 04 08:14:32 chargestone-cave org.gnome.Epiphany.Devel.desktop[1896]: Cannot get default EGL display: EGL_BAD_PARAMETER
Oct 04 08:14:32 chargestone-cave org.gnome.Epiphany.Devel.desktop[1896]: PlatformDisplayLibWPE: could not create the EGL display: EGL_SUCCESS.
Oct 04 08:14:37 chargestone-cave org.gnome.Epiphany.Devel.desktop[1896]: Cannot get default EGL display: EGL_BAD_PARAMETER
Oct 04 08:14:37 chargestone-cave org.gnome.Epiphany.Devel.desktop[1896]: Cannot create EGL context: invalid display (last error: EGL_SUCCESS)
Oct 04 08:14:43 chargestone-cave org.gnome.Epiphany.Devel.desktop[1896]: Cannot get default EGL display: EGL_BAD_PARAMETER
Oct 04 08:14:43 chargestone-cave org.gnome.Epiphany.Devel.desktop[1896]: PlatformDisplayLibWPE: could not create the EGL display: EGL_SUCCESS.

If anyone is online *right now* and wants me to check something (e.g. attach with 'gdb -p') I can do so now. As soon as Epiphany or gnome-shell crashes we'll be out of luck until next time I see the bug.
Comment 10 Michael Catanzaro 2019-10-04 06:46:35 PDT
This seems to be related to bug #201507.
Comment 11 Michael Catanzaro 2019-10-04 13:34:36 PDT
Other bugs where we print EGL_SUCCESS as if it were an error: bug #178896, bug #178937, bug #195742
Comment 12 Carlos Garcia Campos 2019-10-08 03:35:43 PDT
Created attachment 380417 [details]
Patch

This patch handles the EGL display initialization failure and disables AC, but it doesn't fix the actual bug. Let's figure out what's failing in bug #201507, since it's the same problem in the end.
Comment 13 Michael Catanzaro 2019-10-08 09:14:13 PDT
Comment on attachment 380417 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=380417&action=review

> Source/WebCore/ChangeLog:9
> +        reason. We need to understand why, but we should also handle the case of failing to initialize the WGL display

WGL -> EGL?
Comment 14 Carlos Garcia Campos 2019-10-09 00:10:51 PDT
(In reply to Michael Catanzaro from comment #13)
> Comment on attachment 380417 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=380417&action=review
> 
> > Source/WebCore/ChangeLog:9
> > +        reason. We need to understand why, but we should also handle the case of failing to initialize the WGL display
> 
> WGL -> EGL?

Yes, it's a typo.
Comment 15 Carlos Garcia Campos 2019-10-14 22:30:20 PDT
Committed r251122: <https://trac.webkit.org/changeset/251122>