Closed Bug 1744389 Opened 2 years ago Closed 2 years ago

Silence "ATTENTION: default value of option mesa_glthread overridden by environment." warning when not needed

Categories

(Core :: Graphics: WebRender, enhancement)

enhancement

Tracking

()

RESOLVED WONTFIX
Tracking Status
firefox95 --- wontfix
firefox96 --- wontfix
firefox97 --- wontfix
firefox98 --- wontfix

People

(Reporter: rmader, Assigned: rmader)

References

(Blocks 1 open bug)

Details

Attachments

(1 obsolete file)

Since bug 1670545 we unconditionally override the mesa_glthread env var. Unfortunately this triggers a warning from Mesa, cluttering debug logs. Let's not override the variable if it's not set. Also lets print an explicitly warning that we override it so users know that the variable is causing troubles.

Since bug 1670545 we unconditionally override the mesa_glthread
env var when using the EGL backend on X11 to avoid crashes.
Unfortunately this triggers warnings from Mesa, cluttering debug
logs.

Let's not override the variable if it's not set. Also lets log an
explicitly warning that we disabled it so users know that the
variable is causing troubles.

As documented in bug 1741433, I only see this warning with X.Org X Server not with Wayland.

(In reply to Paul Menzel from comment #3)

As documented in bug 1741433, I only see this warning with X.Org X Server not with Wayland.

Ah, didn't see that bug, thanks for filing (and closing) it. Indeed we only do this on X11, as on Wayland the crashes don't occur. Actually this should be fixed in mesa, but I haven't come around to look into it (or open a bug).

Pushed by robert.mader@posteo.de:
https://hg.mozilla.org/integration/autoland/rev/5d8ddb19b485
Silence 'ATTENTION: default value of option mesa_glthread overridden by enviroment.' warning when not needed, r=gfx-reviewers,lsalzman
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 96 Branch
Regressions: 1745530

Backed out changeset 5d8ddb19b485 out of 96.0rc2 for causing startup crash in bug 1745530 see below:
Backout link

Flags: needinfo?(robert.mader)

Backed out from trunk due to bug 1745530. Will backout from Beta for 97.0b7 as well.
https://hg.mozilla.org/integration/autoland/rev/82ffc227df20e8628cbffc69f8e5b3d877b3e2cb

Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: 96 Branch → ---

Backout has been merged to central

Leaving this open for now. May end up getting fixed by Mesa or users moving to Wayland.

Flags: needinfo?(robert.mader)

There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:rmader, could you have a look please?
If you still have some work to do, you can add an action "Plan Changes" in Phabricator.
For more information, please visit auto_nag documentation.

Flags: needinfo?(robert.mader)
Flags: needinfo?(lsalzman)
Flags: needinfo?(lsalzman)
Attachment #9253726 - Attachment is obsolete: true
Flags: needinfo?(robert.mader)

It seems unclear what is happening with this bug report.

Status: REOPENED → RESOLVED
Closed: 2 years ago2 years ago
Depends on: wayland-stable
Resolution: --- → WONTFIX

@Darkspirit:

Status: REOPENED → RESOLVED
Closed: 5 months ago → 6 days ago
Depends on: wayland-stable
Resolution: --- → WONTFIX

I am afraid that that does not make matters clear (at least not to me). Is it that this bug will not be fixed because . . something . . Wayland . . actually, no, I have very little idea what is meant.

Flags: needinfo?(jan)

(Robert Mader [:rmader] from comment #11)

[...] fixed by [...] moving to Wayland.

Flags: needinfo?(jan)

If someone wanted to remove this warning for X11, one would need to parse Mesa config files (.drirc, etc.) to avoid bug 1745530.
X11 is deprecated: https://www.phoronix.com/scan.php?page=news_item&px=XWayland-21.1-Released

See Also: → 1767231

I noticed that Zoom breaks when I try to use a blurred background, but only when it is directly launched through Firefox. I compared the Zoom logs and found "ATTENTION: default value of option mesa_glthread overridden by environment." so I guess the fact that Firefox messes with environment variables can cause observable issues in other applications such as Zoom.

Firefox just ensures that the mesa_glthread environment variable has its default value (false) for Firefox itself. The env var isn't set system-wide.

It is not set system-wide, but apparently, applications such as Zoom that are launched through Firefox (e.g., via a Zoom meeting link) inherit from Firefox's environment. If mesa_glthread is set to false, it seems to propagate to those applications.

(In reply to me from comment #19)

It is not set system-wide, but apparently, applications such as Zoom that are launched through Firefox (e.g., via a Zoom meeting link) inherit from Firefox's environment. If mesa_glthread is set to false, it seems to propagate to those applications.

Interesting! Can you double-check that zoom also breaks if you launch it from the command line with mesa_glthread=false? (and also check mesa_glthread=true?).

Flags: needinfo?(me)

If running zoom with $ mesa_glthread=false path/to/zoom does not show any problem, then the problem lies elsewhere.
If the zoom app problem is really caused by Firefox, you could try to find a regression range with these steps:
$ pip3 install --upgrade mozregression
$ ~/.local/bin/mozregression --good 2021-06-01 --2022-05-23 -a https://example.com

It turns out that what I have noticed is indeed a Zoom bug (see https://community.zoom.com/t5/Meetings/zoom-5-10-4-2845-1-x86-64-on-Linux-locks-up-when-invoked-with/td-p/59402). However, if I wrap the Zoom launcher and unset mesa_glthread before opening Zoom, the "ATTENTION: default value of option mesa_glthread overridden by environment." error disappears. So there's clearly some potential for misconfiguration still.

Flags: needinfo?(me)

It turns out that what I have noticed is indeed a Zoom bug

Thanks for checking!

So there's clearly some potential for misconfiguration still.

The fact that we override mesa_glthread is an outlier - AFAIK we don't do that with any other (non-moz) env var. I'd actually love to get rid of it as well, but apparently a bunch of users have badly configured systems which force mesa_glthread on. In many cases FF (on X11 with EGL) is the only negatively affected app, leading to a bunch of bug reports and users switching browsers. Forcing mesa_glthread off should never affect apps negatively apart from slightly lower performance (otherwise the app is badly broken). And unfortunately we also can't check whether the env var is set and only then unset it - because some users force threaded gl via conf files which is super hard to detect.

So I'm afraid there's currently no way around this (apart from trying to fix the FF/X11/EGL backend and/or the drivers). And apart from the loud warning it shouldn't have negative consequences.

mesa_glthread=false is only set on legacy X11. You won't get this irrelevant success message on Wayland (MOZ_ENABLE_WAYLAND=1, bug 1752398).

The ATTENTION warning comes from libGLX_Mesa.so and can be silenced by (also) settingMESA_DEBUG=silent

If I run
MESA_DEBUG=silent thunderbird/thunderbird
with Thunderbird 102.2 I get no ATTENTION warnings; without MESA_DEBUG I see
ATTENTION: default value of option mesa_glthread overridden by environment.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: