Mailing List Archive

google-chrome can render pages after update
I did an update this morning which installed the following:

aleph ~ # fgrep '>>> emerge ' emerge.log

1686579407: >>> emerge (1 of 11) dev-util/strace-6.3 to /
1686579455: >>> emerge (2 of 11) dev-libs/nspr-4.35-r2 to /
1686579470: >>> emerge (3 of 11) dev-python/fonttools-4.39.4 to /
1686579500: >>> emerge (4 of 11) dev-python/weasyprint-59.0 to /
1686579507: >>> emerge (5 of 11) net-print/cups-2.4.4 to /
1686579541: >>> emerge (6 of 11) sys-devel/llvm-15.0.7-r3 to /
1686582174: >>> emerge (7 of 11) app-portage/gemato-20.4 to /
1686582180: >>> emerge (8 of 11) media-libs/gstreamer-1.20.5 to /
1686582206: >>> emerge (9 of 11) dev-db/unixODBC-2.3.11 to /
1686582239: >>> emerge (10 of 11) media-libs/gst-plugins-base-1.20.5 to /
1686582282: >>> emerge (11 of 11) www-client/firefox-bin-114.0.1 to /


Now google-chrome-stable Version 114.0.5735.106 (Official Build)
(64-bit) can lo longer display pages proplerly. It looks like chunks
of the application window are randomly scrambled or shown in the wrong
places. AFIACT, the pages are being parsed/process properly but the
actaul rendering of the X11 window is broken.

You can see examples here:

https://www.panix.com/~grante/chrome/foo.png
https://www.panix.com/~grante/chrome/bar.png

None of the other "big" X11 apps seem to be affected (firefox,
thunderbird, libre-office, etc. all work fine).

The console window where I launch chrome now spews almost continuous
errors like those show below. Has anybody else run into this? I'm
going to start backing out the updates above, but thought I'd check to
see if this was a known problem. I haven't found anything in buzilla
yet...





Errors:
link failed but did not provide an info log
[7110:7110:0612/103618.780116:ERROR:shared_context_state.cc(81)] Skia shader compilation error
------------------------
// Vertex SKSL
#extension GL_NV_shader_noperspective_interpolation: require
uniform float4 sk_RTAdjust;uniform float2 uAtlasSizeInv_S0;in float2 inPosition;in half4 inColor;in ushort2 inTextureCoords;noperspective out float2 vTextureCoords_S0;flat out float vTexIndex_S0;noperspective out half4 vinColor_S0;void main() {// Primitive Processor BitmapText
int texIdx = 0;float2 unormTexCoords = float2(inTextureCoords.x, inTextureCoords.y);vTextureCoords_S0 = unormTexCoords * uAtlasSizeInv_S0;vTexIndex_S0 = float(texIdx);vinColor_S0 = inColor;float2 _tmp_1_inPosition = inPosition;sk_Position = inPosition.xy01;}
// Fragment SKSL
#extension GL_NV_shader_noperspective_interpolation: require
const int kFillBW_S1_c0 = 0;
const int kInverseFillBW_S1_c0 = 2;
const int kInverseFillAA_S1_c0 = 3;
uniform float4 urectUniform_S1_c0;uniform sampler2D uTextureSampler_0_S0;
noperspective in float2 vTextureCoords_S0;flat in float vTexIndex_S0;noperspective in half4 vinColor_S0;half4 Rect_S1_c0(half4 _input) {
half4 _tmp_0_inColor = _input;
half coverage;
if (int(2) == kFillBW_S1_c0 || int(2) == kInverseFillBW_S1_c0) {
coverage = half(all(greaterThan(float4(sk_FragCoord.xy, urectUniform_S1_c0.zw), float4(urectUniform_S1_c0.xy, sk_FragCoord.xy))));
} else {
half4 dists4 = saturate(half4(1.0, 1.0, -1.0, -1.0) * half4(sk_FragCoord.xyxy - urectUniform_S1_c0));
half2 dists2 = (dists4.xy + dists4.zw) - 1.0;
coverage = dists2.x * dists2.y;
}
if (int(2) == kInverseFillBW_S1_c0 || int(2) == kInverseFillAA_S1_c0) {
coverage = 1.0 - coverage;
}
return half4(half4(coverage));
}

half4 Blend_S1(half4 _src, half4 _dst) {
return blend_modulate(Rect_S1_c0(_src), _src);}

void main() {// Stage 0, BitmapText
half4 outputColor_S0;outputColor_S0 = vinColor_S0;half4 texColor;{ texColor = sample(uTextureSampler_0_S0, vTextureCoords_S0).rrrr; }half4 outputCoverage_S0 = texColor;half4 output_S1;output_S1 = Blend_S1(outputCoverage_S0, half4(1));{ // Xfer Processor: Porter Duff
sk_FragColor = outputColor_S0 * output_S1;}}
// Vertex GLSL
#version 300 es

#extension GL_NV_shader_noperspective_interpolation : require
precision mediump float;
precision mediump sampler2D;
uniform highp vec4 sk_RTAdjust;
uniform highp vec2 uAtlasSizeInv_S0;
in highp vec2 inPosition;
in mediump vec4 inColor;
in mediump uvec2 inTextureCoords;
noperspective out highp vec2 vTextureCoords_S0;
flat out highp float vTexIndex_S0;
noperspective out mediump vec4 vinColor_S0;
void main() {
highp int texIdx = 0;
highp vec2 unormTexCoords = vec2(float(inTextureCoords.x), float(inTextureCoords.y));
vTextureCoords_S0 = unormTexCoords * uAtlasSizeInv_S0;
vTexIndex_S0 = float(texIdx);
vinColor_S0 = inColor;
gl_Position = vec4(inPosition, 0.0, 1.0);
gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
}

// Fragment GLSL
#version 300 es

#extension GL_NV_shader_noperspective_interpolation : require
uniform highp vec2 u_skRTFlip;
precision mediump float;
precision mediump sampler2D;
out mediump vec4 sk_FragColor;
uniform highp vec4 urectUniform_S1_c0;
uniform sampler2D uTextureSampler_0_S0;
noperspective in highp vec2 vTextureCoords_S0;
flat in highp float vTexIndex_S0;
noperspective in mediump vec4 vinColor_S0;
void main() {
highp vec4 sk_FragCoord = vec4(gl_FragCoord.x, u_skRTFlip.x + u_skRTFlip.y * gl_FragCoord.y, gl_FragCoord.z, gl_FragCoord.w);
mediump vec4 outputColor_S0;
outputColor_S0 = vinColor_S0;
mediump vec4 texColor;
{
texColor = texture(uTextureSampler_0_S0, vTextureCoords_S0, -0.5).xxxx;
}
mediump vec4 outputCoverage_S0 = texColor;
mediump vec4 output_S1;
mediump float _3_coverage;
{
_3_coverage = float(all(greaterThan(vec4(sk_FragCoord.xy, urectUniform_S1_c0.zw), vec4(urectUniform_S1_c0.xy, sk_FragCoord.xy))));
}
{
_3_coverage = 1.0 - _3_coverage;
}
output_S1 = vec4(_3_coverage) * outputCoverage_S0;
{
sk_FragColor = outputColor_S0 * output_S1;
}
}


Errors:
link failed but did not provide an info log
Re: google-chrome can render pages after update [ In reply to ]
On 2023-06-12, Grant Edwards <grant.b.edwards@gmail.com> wrote:
> I did an update this morning which installed the following:
>
> aleph ~ # fgrep '>>> emerge ' emerge.log
>
> 1686579407: >>> emerge (1 of 11) dev-util/strace-6.3 to /
> 1686579455: >>> emerge (2 of 11) dev-libs/nspr-4.35-r2 to /
> 1686579470: >>> emerge (3 of 11) dev-python/fonttools-4.39.4 to /
> 1686579500: >>> emerge (4 of 11) dev-python/weasyprint-59.0 to /
> 1686579507: >>> emerge (5 of 11) net-print/cups-2.4.4 to /
> 1686579541: >>> emerge (6 of 11) sys-devel/llvm-15.0.7-r3 to /
> 1686582174: >>> emerge (7 of 11) app-portage/gemato-20.4 to /
> 1686582180: >>> emerge (8 of 11) media-libs/gstreamer-1.20.5 to /
> 1686582206: >>> emerge (9 of 11) dev-db/unixODBC-2.3.11 to /
> 1686582239: >>> emerge (10 of 11) media-libs/gst-plugins-base-1.20.5 to /
> 1686582282: >>> emerge (11 of 11) www-client/firefox-bin-114.0.1 to /
>
>
> Now google-chrome-stable Version 114.0.5735.106 (Official Build)
> (64-bit) can lo longer display pages proplerly. It looks like chunks
> of the application window are randomly scrambled or shown in the wrong
> places. AFIACT, the pages are being parsed/process properly but the
> actaul rendering of the X11 window is broken.

It seems to be a variation on this bug which affects only AMD GPUs:

https://bugs.gentoo.org/907431

Clearing the GPU driver cache or using the -disable-gpu-driver-bug-workarounds
option avoids the problem.

In my case, It wasn't a mesa update that triggered the problem. I
think it was the llvm update (I haven't confirmed that).

--
Grant
Re: Re: google-chrome can render pages after update [ In reply to ]
On Monday, 12 June 2023 17:05:31 BST Grant Edwards wrote:
> On 2023-06-12, Grant Edwards <grant.b.edwards@gmail.com> wrote:
> > I did an update this morning which installed the following:
> > aleph ~ # fgrep '>>> emerge ' emerge.log
> >
> > 1686579407: >>> emerge (1 of 11) dev-util/strace-6.3 to /
> > 1686579455: >>> emerge (2 of 11) dev-libs/nspr-4.35-r2 to /
> > 1686579470: >>> emerge (3 of 11) dev-python/fonttools-4.39.4 to /
> > 1686579500: >>> emerge (4 of 11) dev-python/weasyprint-59.0 to /
> > 1686579507: >>> emerge (5 of 11) net-print/cups-2.4.4 to /
> > 1686579541: >>> emerge (6 of 11) sys-devel/llvm-15.0.7-r3 to /
> > 1686582174: >>> emerge (7 of 11) app-portage/gemato-20.4 to /
> > 1686582180: >>> emerge (8 of 11) media-libs/gstreamer-1.20.5 to /
> > 1686582206: >>> emerge (9 of 11) dev-db/unixODBC-2.3.11 to /
> > 1686582239: >>> emerge (10 of 11) media-libs/gst-plugins-base-1.20.5
> > to /
> > 1686582282: >>> emerge (11 of 11) www-client/firefox-bin-114.0.1 to /
> >
> > Now google-chrome-stable Version 114.0.5735.106 (Official Build)
> > (64-bit) can lo longer display pages proplerly. It looks like chunks
> > of the application window are randomly scrambled or shown in the wrong
> > places. AFIACT, the pages are being parsed/process properly but the
> > actaul rendering of the X11 window is broken.
>
> It seems to be a variation on this bug which affects only AMD GPUs:
>
> https://bugs.gentoo.org/907431
>
> Clearing the GPU driver cache or using the
> -disable-gpu-driver-bug-workarounds option avoids the problem.
>
> In my case, It wasn't a mesa update that triggered the problem. I
> think it was the llvm update (I haven't confirmed that).
>
> --
> Grant

Did you (re)compile anything graphics related using llvm, which might be used
by the Chrome binary? I don't have chrome/chromium installed here to directly
compare notes and so far qtwebengine appears to work fine after updating llvm
this morning, as does www-client/microsoft-edge.
Re: google-chrome can render pages after update [ In reply to ]
On 2023-06-12, Michael <confabulate@kintzios.com> wrote:

>> It seems to be a variation on this bug which affects only AMD GPUs:
>>
>> https://bugs.gentoo.org/907431
>>
>> Clearing the GPU driver cache or using the
>> -disable-gpu-driver-bug-workarounds option avoids the problem.
>>
>> In my case, It wasn't a mesa update that triggered the problem. I
>> think it was the llvm update (I haven't confirmed that).
>
> Did you (re)compile anything graphics related using llvm, which
> might be used by the Chrome binary?

No -- but as I understand it, mesa uses llvm (at runtime) to generate
GPU object code. Based on the work-around, it looks like compiled GPU
object code is cached by Chrome/Chromium, and updates to mesa and/or
llvm can result attempts to use old, incompatible GPU object code.

As pages are rendered, there was a constant stream of "link failure"
messages on the console window where Chrome is running.

> I don't have chrome/chromium installed here to directly compare
> notes and so far qtwebengine appears to work fine after updating
> llvm this morning, as does www-client/microsoft-edge.

Firefix-bin still worked fine also. It only seemed to affect
Chrome/Chromium or it's derivitives.

--
Grant
Re: Re: google-chrome can render pages after update [ In reply to ]
On Monday, 12 June 2023 17:57:47 BST Grant Edwards wrote:
> On 2023-06-12, Michael <confabulate@kintzios.com> wrote:
> >> It seems to be a variation on this bug which affects only AMD GPUs:
> >> https://bugs.gentoo.org/907431
> >>
> >> Clearing the GPU driver cache or using the
> >> -disable-gpu-driver-bug-workarounds option avoids the problem.
> >>
> >> In my case, It wasn't a mesa update that triggered the problem. I
> >> think it was the llvm update (I haven't confirmed that).
> >
> > Did you (re)compile anything graphics related using llvm, which
> > might be used by the Chrome binary?
>
> No -- but as I understand it, mesa uses llvm (at runtime) to generate
> GPU object code. Based on the work-around, it looks like compiled GPU
> object code is cached by Chrome/Chromium, and updates to mesa and/or
> llvm can result attempts to use old, incompatible GPU object code.
>
> As pages are rendered, there was a constant stream of "link failure"
> messages on the console window where Chrome is running.

Yes, you're right. Gallium llvmpipe driver uses llvm in runtime for
rasterisation. I wasn't aware of this and thought llvm is only a build time
compiler! :-)

This also explains why clearing the cache fixes the problem of what is
essentially stale code.