Subject: Re: Bug#776911: gnome-shell: fails to start on i386 when [Mesa was] built with llvm-3.5

From: Simon McVittie <[email-masked]>
Date: Fri, 13 Mar 2015 13:01:13 +0000

Control: unmerge 775235
Control: retitle 775235 gnome-shell: fails to start on i386 when Mesa was built with llvm-3.5
Control: reassign 775235 libgl1-mesa-dri
Control: retitle 770130 gnome-shell: crashes with "Failed to create texture 2d" after "[drm:i8xx_irq_handler] *ERROR* pipe A underrun"

On 09/03/15 20:57, Julien Cristau wrote:
> On Thu, Feb 26, 2015 at 08:54:10 +0000, Simon McVittie wrote:
>> Context for Mesa maintainers: #775235 is that gnome-shell crashes in
>> an i386 VM with its default choice of emulated CPU, with
>> "LLVM ERROR: Do not know how to split the result of this operator!".

I think this should go to Mesa. There are two potential patches,
both tested by Bernhard Übelacker, with 

go back to llvm-3.4:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=775235#15

or apply an unmerged patch:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=775235#32

>> The merged bug #770130 is that gnome-shell crashes on an unknown i386
>> (probably relatively old, since it has 82830M/MG integrated graphics,
>> which Wikipedia says is a Pentium III-M chipset) with
>> "Cogl-ERROR **: Failed to create texture 2d due to size/format constraints".
>> Oddly, this only happens for non-power-of-two textures in the gnome-shell
>> run by the actual user, not by the gnome-shell used for the gdm login
>> prompt (even though both use non-power-of-two textures). Michael Gilbert
>> merged this with #775235 and #776911 without comment; I'm not sure of
>> the reasoning for believing that #775235 and #770130 is the same thing.
>>
>> The other merged bug #776911 is that gnome-shell crashes on an
>> unknown i386 with "Cogl-ERROR **: Failed to create texture 2d due to
>> size/format constraints"; that looks like the same thing as #770130.

I can reproduce symptoms similar to these on a slightly newer machine
(Pentium IV) and have filed an xserver-xorg-video-intel bug with full
logs. These two should maybe be merged with that bug, but I'll leave
that to the X maintainers.

This is on hardware about a decade old, so I don't think it should
realistically be RC: I filed my new bug as "normal".

Regards,
    S

---

From: Simon McVittie <[email-masked]>
Date: Fri, 13 Mar 2015 17:35:15 +0000

> Control: unmerge 775235
...
> both tested by Bernhard Übelacker, with 

Sorry, that should have said: with verification from Tails developers
for the second one.

    S

---

From: Michael Gilbert <[email-masked]>
Date: Wed, 15 Apr 2015 23:08:11 -0400

control: severity -1 wishlist
control: forwarded -1 https://freedesktop.org/patch/34445
control: retitle -1 mesa: use llvm's getCPUTargetFeatures() instead of
getHostCPUName()

It turns out that mesa uses llvm's getHostCPUName(), and qemu i386 by
default (correctly) reports itself as pentium2, which is assumed
non-sse2. gnome-shell uses a mesa feature that requires sse2, so it
fails at startup on qemu i386.

On llvm trunk they've implemented getCPUTargetFeatures(), which can be
used to check for specific cpu features like sse2, and that is the
long term solution to the problem:
https://llvm.org/bugs/show_bug.cgi?id=23201

In the meantime, the problem can be worked around by using a
non-default qemu cpu options.  Some examples:

$ qemu -cpu pentium3 test.img
$ kvm -cpu host test.img

Since there workarounds are straightforward I am reducing the severity.

Best wishes,
Mike