Bug 250985 - [GTK] mesa fails to create shader cache, xdg cache dir not mounted in flatpak-spawn subsandbox
Summary: [GTK] mesa fails to create shader cache, xdg cache dir not mounted in flatpak...
Status: RESOLVED MOVED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: Other
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: Flatpak
  Show dependency treegraph
 
Reported: 2023-01-22 11:09 PST by Jeff Fortin
Modified: 2023-06-28 06:42 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff Fortin 2023-01-22 11:09:23 PST
Originally reported at https://gitlab.gnome.org/GNOME/epiphany/-/issues/1957 :

With the EpiphanyDevel flatpak from gnome nightly, this gets printed multiple times in the terminal on startup:

`Failed to create /home/user/.var/app/org.gnome.Epiphany.Devel/cache for shader cache (No such file or directory)---disabling.`

...even with the local storage/caching setting turned on in the Privacy tab in the Preferences dialog. And yet, the folder exists, and has subfolders:

```
$ ls ~/.var/app/org.gnome.Epiphany.Devel/cache
epiphany
fontconfig
mesa_shader_cache
tmp
webkitgtk-6.0
```
Comment 1 Michael Catanzaro 2023-01-22 14:18:52 PST
Looks like the shader cache is an ANGLE thing, so *probably* an ANGLE bug, although I'm failing to immediately find the code.

But wait, is your username literally "user"? Because the error message says "/home/user".
Comment 2 Michael Catanzaro 2023-01-22 14:22:00 PST
OK surprise, this is actually coming from mesa, not from ANGLE. It's in src/util/disk_cache_os.c.
Comment 3 Michael Catanzaro 2023-01-22 14:32:50 PST
Oh and I can reproduce:

Failed to create /home/mcatanzaro/.var/app/org.gnome.Epiphany.Devel/cache for shader cache (No such file or directory)---disabling.
Failed to create /home/mcatanzaro/.var/app/org.gnome.Epiphany.Devel/cache for shader cache (No such file or directory)---disabling.

I think it doesn't exist in the flatpak-spawn subsandbox. We don't want to provide access to the real host dirs because that defeats the point of subsandboxing, but I guess we could create empty ones.
Comment 4 Michael Catanzaro 2023-06-28 06:42:55 PDT
This is https://gitlab.freedesktop.org/mesa/mesa/-/issues/8294