Bug 100189 - segfault at 234 error 4 in i915_dri.so
Summary: segfault at 234 error 4 in i915_dri.so
Status: RESOLVED MOVED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/i915g (show other bugs)
Version: 17.0
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact: Default DRI bug account
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-13 21:34 UTC by Javi Ballester Tomás
Modified: 2019-09-18 19:31 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
output of glxinfo (2.89 KB, text/plain)
2017-03-28 17:25 UTC, Javi Ballester Tomás
Details

Description Javi Ballester Tomás 2017-03-13 21:34:35 UTC
Lubuntu 16.04 4.4.0-38-generic x86_64
17.1~git1703131930

mpv/vo[18230]: segfault at 234 ip 00007ff625ed96e8 sp 00007ff6277fd7b0 error 4 in i915_dri.so[7ff6259f5000+9c8000]
glmark2[26598]: segfault at 234 ip 00007f917ecb36e8 sp 00007ffdf0586e30 error 4 in i915_dri.so[7f917e7cf000+9c8000]
glxgears[27933]: segfault at 234 ip 00007f87f68e66e8 sp 00007fff6da8a110 error 4 in i915_dri.so[7f87f6402000+9c8000]
Comment 1 Javi Ballester Tomás 2017-03-13 22:28:56 UTC
mpv only crashes when fullscreen on start is activated in mpv.conf (fs=yes).

blender crashes also with segfault:

# Blender 2.78 (sub 0), Commit date: 2017-02-24 14:33, Hash e92f2352830

	# backtrace
	/home/javi/Downloads/blender-2.78c-linux-glibc219-x86_64/blender(BLI_system_backtrace+0x1d) [0x19aad1d]
	/home/javi/Downloads/blender-2.78c-linux-glibc219-x86_64/blender() [0x104e2e6]
	/lib/x86_64-linux-gnu/libc.so.6(+0x354b0) [0x7f3f49d924b0]
	/usr/lib/x86_64-linux-gnu/dri/i915_dri.so(+0x4e46e8) [0x7f3f352dc6e8]
	/usr/lib/x86_64-linux-gnu/dri/i915_dri.so(+0x4e4c65) [0x7f3f352dcc65]
	/usr/lib/x86_64-linux-gnu/dri/i915_dri.so(+0x4d68ed) [0x7f3f352ce8ed]
	/usr/lib/x86_64-linux-gnu/dri/i915_dri.so(+0x1df184) [0x7f3f34fd7184]
	/home/javi/Downloads/blender-2.78c-linux-glibc219-x86_64/blender(_ZN13GHOST_Context11initClearGLEv+0x25) [0x19cd185]
	/home/javi/Downloads/blender-2.78c-linux-glibc219-x86_64/blender(_ZN16GHOST_ContextGLX24initializeDrawingContextEv+0x270) [0x19cc490]
	/home/javi/Downloads/blender-2.78c-linux-glibc219-x86_64/blender(_ZN15GHOST_WindowX1117newDrawingContextE25GHOST_TDrawingContextType+0x5d) [0x19cb9cd]
	/home/javi/Downloads/blender-2.78c-linux-glibc219-x86_64/blender(_ZN12GHOST_Window21setDrawingContextTypeE25GHOST_TDrawingContextType+0x8e) [0x19ce33e]
	/home/javi/Downloads/blender-2.78c-linux-glibc219-x86_64/blender(_ZN15GHOST_WindowX11C1EP15GHOST_SystemX11P9_XDisplayRK10STR_Stringiijj18GHOST_TWindowStatei25GHOST_TDrawingContextTypebbbtb+0x5b3) [0x19cadb3]
	/home/javi/Downloads/blender-2.78c-linux-glibc219-x86_64/blender(_ZN15GHOST_SystemX1112createWindowERK10STR_Stringiijj18GHOST_TWindowState25GHOST_TDrawingContextType16GHOST_GLSettingsbi+0xb1) [0x19c8d71]
	/home/javi/Downloads/blender-2.78c-linux-glibc219-x86_64/blender(GHOST_CreateWindow+0x62) [0x19c40b2]
	/home/javi/Downloads/blender-2.78c-linux-glibc219-x86_64/blender(wm_window_ghostwindows_ensure+0x1e1) [0x106dbf1]
	/home/javi/Downloads/blender-2.78c-linux-glibc219-x86_64/blender(WM_check+0x41) [0x104eb31]
	/home/javi/Downloads/blender-2.78c-linux-glibc219-x86_64/blender(wm_homefile_read+0x12c) [0x105b4fc]
	/home/javi/Downloads/blender-2.78c-linux-glibc219-x86_64/blender(WM_init+0xff) [0x105d48f]
	/home/javi/Downloads/blender-2.78c-linux-glibc219-x86_64/blender(main+0x264) [0xfed4a4]
	/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7f3f49d7d830]
	/home/javi/Downloads/blender-2.78c-linux-glibc219-x86_64/blender() [0x104b278]
Comment 2 Emil Velikov 2017-03-14 00:41:14 UTC
Hi Javi, I don't think we have many devs looking at the i915 driver.

If you can track down the commit that introduced the regression (considering it is one) or write a simple test program that will be appreciated.
Comment 3 Javi Ballester Tomás 2017-03-14 13:58:07 UTC
Hi Emil.
The upgrade that initiated the problem was (17.0~git1701100730.17eac3~gd~x, 17.1~git1702040730.106a51~gd~x), something happened between 170110 and 170204.

About the test program or tracking the exact commit, not shure how to do it. Can you point me to info on how to?

Thanks.
Comment 4 Javi Ballester Tomás 2017-03-14 18:40:09 UTC
"LIBGL_ALWAYS_SOFTWARE=1 blender" works. Blender runs without errors. Also Mpv, glmark2 and glxgears.
Comment 5 Emil Velikov 2017-03-14 20:02:14 UTC
(In reply to Javi Ballester Tomás from comment #3)
> Hi Emil.
> The upgrade that initiated the problem was (17.0~git1701100730.17eac3~gd~x,
> 17.1~git1702040730.106a51~gd~x), something happened between 170110 and
> 170204.
> 
Perfect - what you're looking for is "how to use git bisect". There's dozens of sources out there - from `git help bisect' (in the command line) to the Wine example [1]. In case you're wondering - Mesa source tree is located at [2]

Note that you will need to rebuild and test mesa ~10 times. Make sure to use exact same build (configure) flags as your distro.

[1] https://wiki.winehq.org/Regression_Testing#Running_the_bisection
[2] https://cgit.freedesktop.org/mesa/mesa

(In reply to Javi Ballester Tomás from comment #4)
> "LIBGL_ALWAYS_SOFTWARE=1 blender" works. Blender runs without errors. Also
> Mpv, glmark2 and glxgears.

This is very good step - it tells us that the software rasteriser is working fine.
I.e. the variable 'disables' the GPU driver and makes the CPU do all the heavy lifting.
Comment 6 Emil Velikov 2017-03-14 20:05:36 UTC
Almost forgot - if you don't want to overwrite your system mesa simply do
$ git bisect...
$ configure ...
$ make
$ export LIBGL_DRIVERS_PATH=`pwd`/lib
$ export LIBGL_DEBUG=verbose
$ ... app to test ... 
# ensure that the i915_dri.so from the above location is used
Comment 7 Javi Ballester Tomás 2017-03-28 16:33:41 UTC
The result of 'git bisect':

e027935a795ecf546f3e4abcc25655766f9615ac is the first bad commit
commit e027935a795ecf546f3e4abcc25655766f9615ac
Author: Marek Olšák <marek.olsak@amd.com>
Date:   Wed Feb 22 19:59:27 2017 +0100

    st/mesa: don't update unrelated states in non-draw calls such as Clear
    
    If a VAO isn't bound and u_vbuf isn't enabled because of the Core profile,
    we'll get user vertex buffers in drivers if we update vertex buffers
    in glClear. So don't do that.
    
    This fixes a regression since disabling u_vbuf for Core profiles.
    
    Reviewed-by: Brian Paul <brianp@vmware.com>

:040000 040000 7843bc274cb97b72ebd0ba00906ba3baeecf0658 97a362bcd14da53ec9cfa940b3612d77e54be72d M      src
Comment 8 Marek Olšák 2017-03-28 17:12:43 UTC
Is this the gallium driver?
Comment 9 Javi Ballester Tomás 2017-03-28 17:25:54 UTC
Created attachment 130508 [details]
output of glxinfo
Comment 10 Javi Ballester Tomás 2017-03-28 17:26:56 UTC
The "Gallium 0.4 on i915 (chipset: Pineview M)" is the one giving the segfault. 
The "Mesa DRI Intel(R) Pineview M" works.

Additional info, not related to this bug, I think:

The two works with some glitches in Blender. Gallium, the working ones, with black windows or past state window, specially when rendering, that disappears when some action is done in the part of the application that shows this behavior. DRI with colorful semitransparent triangles in the corners of blender windows, these doesn't disappears, but changes when scrolling.

No glitches in any of the two with "LIBGL_ALWAYS_SOFTWARE=1".

I attach the output of "glxinfo | grep OpenGL" for both, some errors in the gallium one.
Comment 11 Javi Ballester Tomás 2017-03-28 17:32:58 UTC
(In reply to Marek Olšák from comment #8)
> Is this the gallium driver?

Yes.
Comment 12 Marek Olšák 2017-03-28 19:21:06 UTC
The i915 gallium driver is unmaintained and not even supported by its manufacturer. This bug report starts its deprecation period. If the driver remains in a broken state for a while, it will be removed from Mesa. Feel free to ignore this bug. Cheers. :)
Comment 13 Emil Velikov 2017-03-29 00:55:49 UTC
Nicely spotted Marek. Changing the component to gallium/i915g so that Stéphane can find if a bit easier.
Comment 14 Indie 2017-07-11 11:28:25 UTC
I also have a problem with these Gallium drivers. Is there a way to fix them, or find an old unbroken version?
Comment 15 Indie 2017-07-11 15:12:16 UTC
I actually need this.
Comment 16 Francesco Turco 2018-08-09 19:43:07 UTC
I did a git bisect too, and I get the same bad commit as in comment 7.

I'm trying to build Mesa with Gallium for Intel/i915. But recent versions of Mesa make my web browser Falkon crash at startup.
Comment 17 GitLab Migration User 2019-09-18 19:31:08 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/669.


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.