Bug#893488: gnome-shell 3.28 crashes on Radeon R9: Failed to create texture 2d due to size/format constraints

2018-05-19 Thread Matteo Settenvini
Apparently this bug went away after upgrading to gnome-shell 3.28.2-1.
Might have been fixed upstream. It can be marked as fixed in that version.

Thanks,

Matteo Settenvini
FSF Associated Member
Email : mat...@member.fsf.org


Bug#893488: gnome-shell 3.28 crashes on Radeon R9: Failed to create texture 2d due to size/format constraints

2018-04-05 Thread Matteo Settenvini
Il giorno sab, 31/03/2018 alle 17.47 +0100, Simon McVittie ha scritto:
> On Sat, 31 Mar 2018 at 01:04:04 +0200, Matteo Settenvini wrote:
> > I finally got round to re-install the packages that are crashing
> > for me (by the way, this seem to happen roughly the same on another
> > computer of mine, which has a nVidia graphics card).
> 
> nVidia with the proprietary drivers from nvidia-graphics-drivers, or
> nVidia with the open-source "Nouveau" driver from Mesa? (They have
> different bugs, and Nouveau in particular has quite a lot in common
> with the amdgpu driver that you're presumably using on the Radeon.)

The nVidia proprietary drivers, to be exact. But I reviewed the logs
today and maybe the problem is slightly different by attempting to also
look at a coredump.

> Unfortunately, this looks like heap corruption, so the damage was
> probably done earlier (perhaps via a double-free, or by calling
> g_free() on memory that came from g_slice_alloc()).
> 
> You might get a better backtrace from running gnome-shell with either
> G_SLICE=always-malloc MALLOC_CHECK_=2, or G_SLICE=debug-blocks, for
> instance by moving /usr/bin/gnome-shell to /usr/bin/gnome-shell.real
> and replacing it with a script like:

I can see the following:

--

Apr 05 20:24:19 rosebud gnome-shell.rea[3361]:
_cogl_buffer_gl_map_range: assertion 'data != ((void *)0)' failed
Apr 05 20:24:19 rosebud gnome-shell.rea[3361]: g_error_free: assertion
'error != NULL' failed
Apr 05 20:24:19 rosebud gnome-shell.rea[3361]:
_cogl_buffer_bind_no_create: assertion 'ctx->current_buffer[buffer-
>last_target] != buffer' failed
Apr 05 20:24:19 rosebud gnome-shell.rea[3361]:
_cogl_buffer_gl_map_range: assertion 'data != ((void *)0)' failed
Apr 05 20:24:19 rosebud gnome-shell.rea[3361]: g_error_free: assertion
'error != NULL' failed
Apr 05 20:24:19 rosebud gnome-shell.rea[3361]:
_cogl_buffer_bind_no_create: assertion 'ctx->current_buffer[buffer-
>last_target] != buffer' failed
Apr 05 20:24:19 rosebud gnome-shell.rea[3361]: Failed to allocate
texture: Failed to create texture 2d due to size/format constraints
Apr 05 20:24:19 rosebud gnome-shell.rea[3361]: cogl_object_ref:
assertion 'object != ((void *)0)' failed
Apr 05 20:24:19 rosebud gnome-shell.rea[3361]:
clutter_texture_set_cogl_texture: assertion 'cogl_is_texture
(cogl_tex)' failed
Apr 05 20:24:19 rosebud gnome-shell.rea[3361]: CoglError set over the
top of a previous CoglError or uninitialized memory.
   This indicates a bug in
someone's code. You must ensure an error is NULL before it's set.
   The overwriting error
message was: Sliced texture size of 16 x 16 not possible with max waste
set to -1
Apr 05 20:24:19 rosebud gnome-shell.rea[3361]:
clutter_texture_set_cogl_texture: assertion 'cogl_is_texture
(cogl_tex)' failed
Apr 05 20:24:19 rosebud gnome-shell.rea[3361]: CoglError set over the
top of a previous CoglError or uninitialized memory.
   This indicates a bug in
someone's code. You must ensure an error is NULL before it's set.
   The overwriting error
message was: Sliced texture size of 16 x 16 not possible with max waste
set to -1
Apr 05 20:24:19 rosebud gnome-shell.rea[3361]: Failed to allocate
texture: Failed to create texture 2d due to size/format constraints
Apr 05 20:24:19 rosebud gnome-shell.rea[3361]: cogl_object_ref:
assertion 'object != ((void *)0)' failed
Apr 05 20:24:19 rosebud gnome-shell.rea[3361]:
clutter_texture_set_cogl_texture: assertion 'cogl_is_texture
(cogl_tex)' failed
Apr 05 20:24:19 rosebud gnome-shell.rea[3361]: CoglError set over the
top of a previous CoglError or uninitialized memory.
   This indicates a bug in
someone's code. You must ensure an error is NULL before it's set.
   The overwriting error
message was: Sliced texture size of 16 x 16 not possible with max waste
set to -1
Apr 05 20:24:19 rosebud gnome-shell.rea[3361]: Failed to allocate
texture: Failed to create texture 2d due to size/format constraints
Apr 05 20:24:19 rosebud gnome-shell.rea[3361]: cogl_object_ref:
assertion 'object != ((void *)0)' failed
Apr 05 20:24:19 rosebud gnome-shell.rea[3361]:
clutter_texture_set_cogl_texture: assertion 'cogl_is_texture
(cogl_tex)' failed
Apr 05 20:24:19 rosebud gnome-shell.rea[3361]: CoglError set over the
top of a previous CoglError or uninitialized memory.
   This indicates a bug in
someone's code. You must ensure an error is NULL before it's set.
   The overwriting error
message was: Sliced texture size of 16 x 16 not possible with max waste
set to -1
Apr 05 20:24:19 rosebud gnome-shell.rea[3361]: Failed to allocate
texture: Failed to create texture 2d 

Bug#893488: gnome-shell 3.28 crashes on Radeon R9: Failed to create texture 2d due to size/format constraints

2018-03-31 Thread Simon McVittie
On Sat, 31 Mar 2018 at 01:04:04 +0200, Matteo Settenvini wrote:
> I finally got round to re-install the packages that are crashing for me (by 
> the
> way, this seem to happen roughly the same on another computer of mine, which
> has a nVidia graphics card).

nVidia with the proprietary drivers from nvidia-graphics-drivers, or nVidia
with the open-source "Nouveau" driver from Mesa? (They have different bugs,
and Nouveau in particular has quite a lot in common with the amdgpu driver
that you're presumably using on the Radeon.)

> Thread 1 (Thread 0x7f2be1603ac0 (LWP 21374)):
> #0  0x7f2be0776509 in magazine_chain_pop_head (magazine_chunks= out>) at ../../../../glib/gslice.c:539
> #1  0x7f2be0776509 in thread_memory_magazine1_alloc (tmem=,
> ix=0) at ../../../../glib/gslice.c:842
> #2  0x7f2be0776509 in g_slice_alloc (mem_size=mem_size@entry=12) at ../..
> /../../glib/gslice.c:1016
> #3  0x7f2be0776b29 in g_slice_alloc0 (mem_size=mem_size@entry=12) at ../..
> /../../glib/gslice.c:1051
> #4  0x7f2be10360c7 in shell_generic_container_get_preferred_width (actor=
> 0x565161957920 [ShellGenericContainer], for_height=, 
> min_width_p
> =0x7ffebc4a4fa0, natural_width_p=0x7ffebc4a4fa4) at ../src/shell-generic-
> container.c:94
> #5  0x7f2bdf3e4f92 in clutter_actor_get_preferred_width (self=
> 0x565161957920 [ShellGenericContainer], for_height=27, min_width_p=
> 0x7ffebc4a5010, natural_width_p=0x7ffebc4a5014) at clutter-actor.c:9556

Unfortunately, this looks like heap corruption, so the damage was probably
done earlier (perhaps via a double-free, or by calling g_free() on memory
that came from g_slice_alloc()).

You might get a better backtrace from running gnome-shell with either
G_SLICE=always-malloc MALLOC_CHECK_=2, or G_SLICE=debug-blocks, for
instance by moving /usr/bin/gnome-shell to /usr/bin/gnome-shell.real
and replacing it with a script like:

#!/bin/sh
export G_SLICE=always-malloc
export MALLOC_CHECK_=2
exec /usr/bin/gnome-shell.real "$@"

or

#!/bin/sh
export G_SLICE=debug-blocks
exec /usr/bin/gnome-shell.real "$@"

Regards,
smcv



Bug#893488: gnome-shell 3.28 crashes on Radeon R9: Failed to create texture 2d due to size/format constraints

2018-03-30 Thread Matteo Settenvini
Thanks Simon,

I finally got round to re-install the packages that are crashing for me (by
the way, this seem to happen roughly the same on another computer of mine,
which has a nVidia graphics card).
I have no gnome-shell extensions enabled. I am using the stock Adwaita
theme. I saved the original core dump, it is about 11 MB compressed. If it
can be helpful, I can send it to you.
The crashes happen only under Wayland. Running under Xorg seems fine.

Here is a full backtrace for all threads, it crashes in thread 21374
("Thread 1"):


Thread 28 (Thread 0x7f2ba891f700 (LWP 21388)):
#0  0x7f2bde9ca4ec in futex_wait_cancelable (private=,
expected=0, futex_word=0x565160998954) at ../sysdeps/unix/sysv/linux/
futex-internal.h:88
#1  0x7f2bde9ca4ec in __pthread_cond_wait_common (abstime=0x0,
mutex=0x565160998900, cond=0x565160998928) at pthread_cond_wait.c:502
#2  0x7f2bde9ca4ec in __pthread_cond_wait (cond=cond@entry=0x565160998928,
mutex=mutex@entry=0x565160998900) at pthread_cond_wait.c:655
#3  0x7f2bb9bf926b in cnd_wait (mtx=0x565160998900,
cond=0x565160998928) at ../../../include/c11/threads_posix.h:159
#4  0x7f2bb9bf926b in util_queue_thread_func
(input=input@entry=0x5651609a8fe0)
at ../../../src/util/u_queue.c:171
#5  0x7f2bb9bf9187 in impl_thrd_routine (p=) at
../../../include/c11/threads_posix.h:87
#6  0x7f2bde9c45aa in start_thread (arg=0x7f2ba891f700) at
pthread_create.c:463
#7  0x7f2bde6f9cbf in clone () at ../sysdeps/unix/sysv/linux/
x86_64/clone.S:95

Thread 27 (Thread 0x7f2b71ffb700 (LWP 21438)):
#0  0x7f2bde9ca4ec in futex_wait_cancelable (private=,
expected=0, futex_word=0x5651607204bc) at ../sysdeps/unix/sysv/linux/
futex-internal.h:88
#1  0x7f2bde9ca4ec in __pthread_cond_wait_common (abstime=0x0,
mutex=0x56516072d620, cond=0x565160720490) at pthread_cond_wait.c:502
#2  0x7f2bde9ca4ec in __pthread_cond_wait (cond=0x565160720490,
mutex=0x56516072d620) at pthread_cond_wait.c:655
#3  0x7f2bd64c83c4 in  () at /lib/x86_64-linux-gnu/libmozjs-52.so.0
#4  0x7f2bd64c8615 in  () at /lib/x86_64-linux-gnu/libmozjs-52.so.0
#5  0x7f2bd68c3da5 in  () at /lib/x86_64-linux-gnu/libmozjs-52.so.0
#6  0x7f2bd68e45d2 in  () at /lib/x86_64-linux-gnu/libmozjs-52.so.0
#7  0x7f2bde9c45aa in start_thread (arg=0x7f2b71ffb700) at
pthread_create.c:463
#8  0x7f2bde6f9cbf in clone () at ../sysdeps/unix/sysv/linux/
x86_64/clone.S:95

Thread 26 (Thread 0x7f2b6fff7700 (LWP 21442)):
#0  0x7f2bde9ca4ec in futex_wait_cancelable (private=,
expected=0, futex_word=0x5651607204b8) at ../sysdeps/unix/sysv/linux/
futex-internal.h:88
#1  0x7f2bde9ca4ec in __pthread_cond_wait_common (abstime=0x0,
mutex=0x56516072d620, cond=0x565160720490) at pthread_cond_wait.c:502
#2  0x7f2bde9ca4ec in __pthread_cond_wait (cond=0x565160720490,
mutex=0x56516072d620) at pthread_cond_wait.c:655
#3  0x7f2bd64c83c4 in  () at /lib/x86_64-linux-gnu/libmozjs-52.so.0
#4  0x7f2bd64c8615 in  () at /lib/x86_64-linux-gnu/libmozjs-52.so.0
#5  0x7f2bd68c3da5 in  () at /lib/x86_64-linux-gnu/libmozjs-52.so.0
#6  0x7f2bd68e45d2 in  () at /lib/x86_64-linux-gnu/libmozjs-52.so.0
#7  0x7f2bde9c45aa in start_thread (arg=0x7f2b6fff7700) at
pthread_create.c:463
#8  0x7f2bde6f9cbf in clone () at ../sysdeps/unix/sysv/linux/
x86_64/clone.S:95

Thread 25 (Thread 0x7f2baa7fc700 (LWP 21385)):
#0  0x7f2bde9ca4ec in futex_wait_cancelable (private=,
expected=0, futex_word=0x5651607a20d8) at ../sysdeps/unix/sysv/linux/
futex-internal.h:88
#1  0x7f2bde9ca4ec in __pthread_cond_wait_common (abstime=0x0,
mutex=0x5651607a2088, cond=0x5651607a20b0) at pthread_cond_wait.c:502
#2  0x7f2bde9ca4ec in __pthread_cond_wait (cond=cond@entry=0x5651607a20b0,
mutex=mutex@entry=0x5651607a2088) at pthread_cond_wait.c:655
#3  0x7f2bb9bf926b in cnd_wait (mtx=0x5651607a2088,
cond=0x5651607a20b0) at ../../../include/c11/threads_posix.h:159
#4  0x7f2bb9bf926b in util_queue_thread_func
(input=input@entry=0x5651607a59c0)
at ../../../src/util/u_queue.c:171
#5  0x7f2bb9bf9187 in impl_thrd_routine (p=) at
../../../include/c11/threads_posix.h:87
#6  0x7f2bde9c45aa in start_thread (arg=0x7f2baa7fc700) at
pthread_create.c:463
#7  0x7f2bde6f9cbf in clone () at ../sysdeps/unix/sysv/linux/
x86_64/clone.S:95

Thread 24 (Thread 0x7f2b70ff9700 (LWP 21440)):
#0  0x7f2bde9ca4ec in futex_wait_cancelable (private=,
expected=0, futex_word=0x5651607204b8) at ../sysdeps/unix/sysv/linux/
futex-internal.h:88
#1  0x7f2bde9ca4ec in __pthread_cond_wait_common (abstime=0x0,
mutex=0x56516072d620, cond=0x565160720490) at pthread_cond_wait.c:502
#2  0x7f2bde9ca4ec in __pthread_cond_wait (cond=0x565160720490,
mutex=0x56516072d620) at pthread_cond_wait.c:655
#3  0x7f2bd64c83c4 in  () at /lib/x86_64-linux-gnu/libmozjs-52.so.0
#4  0x7f2bd64c8615 in  () at /lib/x86_64-linux-gnu/libmozjs-52.so.0
#5  0x7f2bd68c3da5 in  () at /lib/x86_64-linux-gnu/libmozjs-52.so.0
#6  0x7f2bd68e45d2 in  () 

Bug#893488: gnome-shell 3.28 crashes on Radeon R9: Failed to create texture 2d due to size/format constraints

2018-03-30 Thread Matteo Settenvini
2018-03-26 21:00 GMT+02:00 Simon McVittie :

> Something is already going wrong with OpenGL drawing in gdm's gnome-shell,
> but unlike yours, it didn't crash.
>
> Did you notice that in GNOME Shell 3.28, you don't get the grey "noise"
> background texture that you should? In GNOME Shell 3.26, do you get the
> "noise" texture correctly?
>
> (This one:
> https://askubuntu.com/questions/534187/where-is-the-
> login-screen-wallpaper-for-gdm-stored)
>

​I forgot to add that I can see the "noise" wallpaper correctly in GDM,
however text is all garbled whenever shown at all (sometimes it is,
sometimes there is absolutely none displayed).​

​Cheers again,
Matteo​


Bug#893488: gnome-shell 3.28 crashes on Radeon R9: Failed to create texture 2d due to size/format constraints

2018-03-26 Thread Simon McVittie
Control: retitle -1 gnome-shell 3.28 crashes on Radeon R9: Failed to create 
texture 2d due to size/format constraints

I'm retitling this based on my best guess at the root cause to stop
others thinking it's an appropriate place to report different crashes.
I think we'd prefer to err on the side of having different reports and
merging them, rather than having one report for multiple crashes and
having to disentangle which is which.

On Mon, 19 Mar 2018 at 12:05:42 +0100, Matteo Settenvini wrote:
> I am attaching also a core file appearing in my home folder,
> apparently it is for Xwayland.

This core probably isn't helpful: it's part of the symptom, not the
cause. If the Wayland compositor (in this case gnome-shell) crashes,
Xwayland will crash too: that's (currently) an expected thing.

> Looking at the journal I see:

To help with interpretation:

Process 1402 looks like the gdm "greeter" GNOME Shell process (uid 117).

Process 1925 looks like your GNOME Shell (uid 1000).

> mar 19 11:46:42 rosebud gnome-shell[1402]: g_array_free: assertion 'array' 
> failed

This means something isn't quite right, a long way before what I
think is probably the actual root cause. If you can run GNOME Shell
with G_DEBUG=fatal-criticals and get a backtrace from the resulting
crash (systemd-coredump is probably the easiest way), that might be
helpful; but this isn't likely to be the root cause.

> mar 19 11:46:44 rosebud gnome-shell[1402]: JS WARNING: 
> [resource:///org/gnome/shell/ui/main.js 332]: reference to undefined property 
> "MetaStage"
> mar 19 11:46:44 rosebud gnome-shell[1402]: JS WARNING: 
> [resource:///org/gnome/shell/ui/layout.js 220]: reference to undefined 
> property "MetaWindowGroup"
> mar 19 11:46:44 rosebud gnome-shell[1402]: JS WARNING: 
> [resource:///org/gnome/shell/ui/osdMonitorLabeler.js 59]: reference to 
> undefined property "MetaDBusDisplayConfigSkeleton"

This stuff is probably harmless.

> mar 19 11:46:45 rosebud gnome-shell[1402]: _cogl_buffer_gl_map_range: 
> assertion 'data != ((void *)0)' failed
> mar 19 11:46:45 rosebud gnome-shell[1402]: g_error_free: assertion 'error != 
> NULL' failed
> mar 19 11:46:45 rosebud gnome-shell[1402]: _cogl_buffer_bind_no_create: 
> assertion 'ctx->current_buffer[buffer->last_target] != buffer' failed
> mar 19 11:46:45 rosebud gnome-shell[1402]: Failed to create texture for 
> background
> mar 19 11:46:45 rosebud gnome-shell[1402]: Failed to create texture for 
> background

Something is already going wrong with OpenGL drawing in gdm's gnome-shell,
but unlike yours, it didn't crash.

Did you notice that in GNOME Shell 3.28, you don't get the grey "noise"
background texture that you should? In GNOME Shell 3.26, do you get the
"noise" texture correctly?

(This one:
https://askubuntu.com/questions/534187/where-is-the-login-screen-wallpaper-for-gdm-stored)

> mar 19 11:51:50 rosebud gnome-shell[1925]: GNOME Shell started at Mon Mar 19 
> 2018 11:51:46 GMT+0100 (CET)
> mar 19 11:51:52 rosebud gnome-shell[1925]: _cogl_buffer_gl_map_range: 
> assertion 'data != ((void *)0)' failed
> mar 19 11:51:52 rosebud gnome-shell[1925]: g_error_free: assertion 'error != 
> NULL' failed
> mar 19 11:51:52 rosebud gnome-shell[1925]: _cogl_buffer_bind_no_create: 
> assertion 'ctx->current_buffer[buffer->last_target] != buffer' failed
> mar 19 11:51:52 rosebud gnome-shell[1925]: _cogl_buffer_gl_map_range: 
> assertion 'data != ((void *)0)' failed
> mar 19 11:51:52 rosebud gnome-shell[1925]: g_error_free: assertion 'error != 
> NULL' failed
> mar 19 11:51:52 rosebud gnome-shell[1925]: _cogl_buffer_bind_no_create: 
> assertion 'ctx->current_buffer[buffer->last_target] != buffer' failed

Again, this isn't right, and backtraces from these assertion failures
might be interesting, but it probably isn't the whole story.

There might also be some bugs in the error-handling.

> mar 19 11:51:52 rosebud gnome-shell[1925]: Failed to allocate texture: Failed 
> to create texture 2d due to size/format constraints
> mar 19 11:51:52 rosebud gnome-shell[1925]: cogl_object_ref: assertion 'object 
> != ((void *)0)' failed
> mar 19 11:51:52 rosebud gnome-shell[1925]: clutter_texture_set_cogl_texture: 
> assertion 'cogl_is_texture (cogl_tex)' failed
> mar 19 11:51:52 rosebud gnome-shell[1925]: CoglError set over the top of a 
> previous CoglError or uninitialized memory.
> mar 19 11:51:52 rosebud gnome-shell[1925]: clutter_texture_set_cogl_texture: 
> assertion 'cogl_is_texture (cogl_tex)' failed
> mar 19 11:51:52 rosebud kernel: gnome-shell[1925]: segfault at 1 ip 
> 7fae6a9a7509 sp 7fffdb1a0d30 error 4 in 
> libglib-2.0.so.0.5600.0[7fae6a93e000+113000]

I think "Failed to create texture 2d due to size/format constraints"
might be the root cause here. We've had similar Shell crashes in the past,
but I don't know what caused them.

There's also some wrong error-handling, unfortunately.

smcv