Bug 93362 - Implementation error: bad target in _mesa_get_current_tex_object() with Intel Skylake HD 520 graphics
Summary: Implementation error: bad target in _mesa_get_current_tex_object() with Intel...
Status: RESOLVED INVALID
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: 11.0
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Ian Romanick
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-13 03:56 UTC by Daniel Miranda
Modified: 2016-03-15 16:45 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
GNOME Wayland session logs (7.80 KB, text/plain)
2016-02-10 10:55 UTC, Daniel Miranda
Details
gnome-shell backtrace (6.80 KB, text/plain)
2016-02-17 05:39 UTC, Daniel Miranda
Details
gnome shell backtrace (2) (6.18 KB, text/plain)
2016-02-17 06:34 UTC, Daniel Miranda
Details

Description Daniel Miranda 2015-12-13 03:56:34 UTC
I recently acquired a Dell XPS 13 and installed Fedora 23. To get the non-preliminary i915 support I upgraded to kernel 4.4-rc4. Unfortunately the Wayland session does not work, I suspect due to the following messages in the system logs:

(gnome-shell:2576): Cogl-WARNING **: driver/gl/cogl-framebuffer-gl.c:299: GL error (1280): Invalid enumeration value
gnome-shell-wayland.desktop[2576]: Mesa 11.0.6 implementation error: bad target in _mesa_get_current_tex_object()
gnome-shell-wayland.desktop[2576]: Please report at https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa
** repeat above a bunch of times **
gnome-shell-wayland.desktop[2576]: (gnome-shell:2576): Cogl-WARNING **: driver/gl/cogl-util-gl.c:96: GL error (1282): Invalid operation
gnome-shell-wayland.desktop[2576]: (gnome-shell:2576): Cogl-CRITICAL **: _cogl_buffer_gl_map_range: assertion 'data != ((void *)0)' failed
gnome-shell-wayland.desktop[2576]: (gnome-shell:2576): GLib-CRITICAL **: g_error_free: assertion 'error != NULL' failed
gnome-shell-wayland.desktop[2576]: (gnome-shell:2576): Cogl-CRITICAL **: _cogl_buffer_bind_no_create: assertion 'ctx->current_buffer[buffer->last_target]
gnome-shell-wayland.desktop[2576]: (gnome-shell:2576): Cogl-WARNING **: driver/gl/cogl-attribute-gl.c:182: GL error (1282): Invalid operation
gnome-shell-wayland.desktop[2576]: (gnome-shell:2576): Cogl-WARNING **: driver/gl/cogl-attribute-gl.c:182: GL error (1282): Invalid operation
gnome-shell-wayland.desktop[2576]: (gnome-shell:2576): Cogl-WARNING **: driver/gl/cogl-framebuffer-gl.c:1253: GL error (1282): Invalid gnome-shell-wayland.desktoperation
gnome-shell-wayland.desktop[2576]: (gnome-shell:2576): Cogl-WARNING **: driver/gl/cogl-attribute-gl.c:182: GL error (1282): Invalid operation
gnome-shell-wayland.desktop[2576]: (gnome-shell:2576): Cogl-WARNING **: driver/gl/cogl-attribute-gl.c:182: GL error (1282): Invalid operation
gnome-shell-wayland.desktop[2576]: (gnome-shell:2576): Cogl-WARNING **: driver/gl/cogl-framebuffer-gl.c:1253: GL error (1282): Invalid operation

Possibly relevant information:

Mesa 11.0.6-1.20151122.fc23
Linux 4.4.0-0.rc4.git3.2.fc24.x86_64
linux-firmware 20151130-59.gita109a8ff.fc24
Dell XPS 13 Late 2015 - Intel Core i5 6200U - Intel Graphics HD 520
Comment 1 Ian Romanick 2015-12-14 23:57:56 UTC
Can you run this in GDB?  If so, can you set a breakpoint in _mesa_problem (that's the function that logs the "Mesa 11.0.6 implementation error" message)?  When the breakpoint is hit, do "bt -full" and copy-and-paste the output into the bug report.

It looks like there's another GL error triggered before that.  Can you also (separately) set a breakpoint in _mesa_error and provide the same "bt -full" output?

My guess is that there's two separate problems.  One is likely in cogl, and the other is likely in Mesa.  This information should help figure out which is which.

Thanks.
Comment 2 Kenneth Graunke 2016-02-10 02:39:52 UTC
FWIW, Jason and I have both used GNOME/Wayland on a Dell XPS 13 (Skylake) and it worked fine.  I think we were using a newer Mesa, though.  (I no longer have the laptop, so I can't be of help testing, sorry...)
Comment 3 Daniel Miranda 2016-02-10 02:53:07 UTC
Sorry for not following up earlier, but I unfortunately had my XPS break down with motherboard issues and had to wait for it to be fixed. Fedora seems to have moved to Mesa 11.1.0 recently and I'm now running kernel 4.4.0 instead of one of the RCs. I'll test again and report how things go.
Comment 4 Daniel Miranda 2016-02-10 10:55:35 UTC
Created attachment 121642 [details]
GNOME Wayland session logs
Comment 5 Daniel Miranda 2016-02-10 10:58:48 UTC
Seems the same issues are still present with Mesa 11.1. I wonder if there's something particular to my system causing the issues. I don't know what it could be though, as I had not previously dealt with Wayland at all or changed any related packages from Fedora's defaults. Logs follow as an attachment, as they are quite a bit longer this time.

I'll try running through GDB and see if I can get some traces for you guys to evaluate. Are there any tips for the easiest way to do it? Maybe creating a custom session entry and using a GDB initialization script?
Comment 6 Daniel Miranda 2016-02-17 04:25:16 UTC
My attempts to get any debugging information so far have failed, since I don't know how to get GDB to start and set the breakpoints during session startup. Are there any instructions available on how to do it?

Also, I forgot to mention, I own the QHD (3200x1800) version. Kenneth, did you use the FHD (1920x1080) version? Could that explain the bugs?
Comment 7 Daniel Miranda 2016-02-17 05:39:02 UTC
Turned out things were way simpler then I was making them: I can just run gnome-shell manually instead of through gdm. I managed to get the backtrace, which follows as an attachment.
Comment 8 Daniel Miranda 2016-02-17 05:39:30 UTC
Created attachment 121798 [details]
gnome-shell backtrace
Comment 9 Daniel Miranda 2016-02-17 06:33:11 UTC
(Sorry for the spam) It seems I get a completely different error if I start gnome-shell when GDM has never run (booting into non-graphical mode). I tested Weston and it seems to work fine, but gnome-shell segfaults seemly while allocating an offscreen buffer. Enabling debugging for COGL yields some warnings, but they don't seem sufficient to explain the problems.
Comment 10 Daniel Miranda 2016-02-17 06:34:37 UTC
Created attachment 121799 [details]
gnome shell backtrace (2)
Comment 11 Daniel Miranda 2016-03-15 06:11:43 UTC
I still haven't figured out what the issue is, but I discovered that I can't reproduce it in a clean Fedora 23 install. I to find what could be different between my current installation and the clean one, but I'm stumped.

- I had some NVIDIA/Bumblebee leftover configurations, but none seen to have been used in any way. Cleaning them up didn't change anything. No NVIDIA modules or GL libs were loaded/installed, nothing is left.
- None of any packages I could think could be relevant have different versions. All Mesa, GNOME and Wayland packages have the same versions.


Yet the "dirty" install can't even start GNOME's Wayland session at all.

Any ideas at all? Am I left no choice other than reinstalling, without figuring out what the problem is?
Comment 12 Daniel Miranda 2016-03-15 16:45:12 UTC
I found out what the problem was. My versions of lib{GL,EGL,GLES}.so.* were linked to some old copies with hash suffixes in their names. I have no idea where they came from or what package replaced the links. But there was nothing wrong with Mesa.

Sorry for the spam and any wasted time.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.