Bug 74993

Summary: Firefox 'exit' on i915 ...
Product: Mesa Reporter: Michael Meeks <michael.meeks>
Component: Drivers/DRI/i965Assignee: Ian Romanick <idr>
Status: RESOLVED INVALID QA Contact: Intel 3D Bugs Mailing List <intel-3d-bugs>
Severity: critical    
Priority: medium    
Version: 9.2   
Hardware: Other   
OS: All   
i915 platform: i915 features:
Attachments: Xorg log

Description Michael Meeks 2014-02-14 17:03:34 UTC
My firefox 'exits' - when I'm visiting / scrolling / rendering some pages inside Mesa. It's great fun to catch; of course - there is one odd thing about my system: openSUSE 13.1 - with a self-built intel X driver from git master; but - nevertheless, an 'exit' seems a bit strong (?) :-)

readAsync/<@resource://gre/modules/XPIProvider.jsm -> jar:file:///home/michael/.mozilla/firefox/usd4v21q.default/extensions/jid0-3GUEt1r69sQNSrca5p8kx9Ezc3U@jetpack.xpi!/bootstrap.js -> resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/net/url.js:49

ATTENTION: default value of option force_s3tc_enable overridden by environment.
OpenGL version detected: 210
OpenGL version detected: 210
intel_do_flush_locked failed: Input/output error

(gdb) bt
#0  __GI_exit (status=status@entry=1) at exit.c:103
#1  0x9d81bfe5 in do_flush_locked (brw=0x9bf23018) at intel_batchbuffer.c:223
#2  _intel_batchbuffer_flush (brw=0x9bf23018, file=file@entry=0x9d8d8b2c "intel_context.c", line=365) at intel_batchbuffer.c:265
#3  0x9d81c35f in _intel_batchbuffer_flush (brw=<optimized out>, brw@entry=0x9bf23018, file=file@entry=0x9d8d8b2c "intel_context.c", 
    line=line@entry=365) at intel_batchbuffer.c:236
#4  0x9d82039a in _intel_flush (line=365, file=0x9d8d8b2c "intel_context.c", ctx=0x9bf23018) at intel_context.c:357
#5  intel_glFlush (ctx=0x9bf23018) at intel_context.c:365
#6  0x8e27b855 in _mesa_flush (ctx=ctx@entry=0x9bf23018) at ../../../src/mesa/main/context.c:1643
#7  0x8e27b923 in _mesa_make_current (newCtx=newCtx@entry=0x0, drawBuffer=drawBuffer@entry=0x0, readBuffer=readBuffer@entry=0x0)
    at ../../../src/mesa/main/context.c:1455
#8  0x9d82146b in intelUnbindContext (driContextPriv=0x9e290d80) at intel_context.c:668
#9  0x9d8d5c34 in driUnbindContext (pcp=0x9e290d80) at dri_util.c:421
#10 0xb333b049 in dri2_unbind_context (context=0xad41a040, new=0x0) at dri2_glx.c:195
#11 0xb3315aad in MakeContextCurrent (dpy=dpy@entry=0xb71a1000, draw=draw@entry=0, read=read@entry=0, gc_user=gc_user@entry=0x0)
    at glxcurrent.c:255
#12 0xb3315b93 in glXMakeCurrent (dpy=0xb71a1000, draw=0, gc=0x0) at glxcurrent.c:303
#13 0xb594371f in mozilla::gl::GLXLibrary::xMakeCurrent (this=0xb6fa885c <mozilla::gl::sGLXLibrary>, display=0xb71a1000, 
    drawable=drawable@entry=0, context=context@entry=0x0) at /usr/src/debug/mozilla/gfx/gl/GLContextProviderGLX.cpp:538
#14 0xb59442da in mozilla::gl::GLContextGLX::~GLContextGLX (this=0x88dda800, __in_chrg=<optimized out>)
    at /usr/src/debug/mozilla/gfx/gl/GLContextProviderGLX.cpp:848
#15 0xb5944360 in mozilla::gl::GLContextGLX::~GLContextGLX (this=0x88dda800, __in_chrg=<optimized out>)
    at /usr/src/debug/mozilla/gfx/gl/GLContextProviderGLX.cpp:857
#16 0xb5943388 in mozilla::detail::GenericRefCounted<(mozilla::detail::RefCountAtomicity)0>::Release (this=0x88dda800)
    at ../../dist/include/mozilla/GenericRefCounted.h:66
#17 0xb4d982c7 in nsRefPtr<mozilla::gl::GLContext>::assign_assuming_AddRef (this=this@entry=0xb26dfc7c, newPtr=newPtr@entry=0x0)
    at ../../../dist/include/nsAutoPtr.h:875
#18 0xb4d990cf in assign_with_AddRef (rawPtr=0x0, this=0xb26dfc7c) at ../../../dist/include/nsAutoPtr.h:859
#19 operator= (rhs=0x0, this=0xb26dfc7c) at ../../../dist/include/nsAutoPtr.h:943
#20 mozilla::WebGLContext::DestroyResourcesAndContext (this=this@entry=0xb26dfc30)
    at /usr/src/debug/mozilla/content/canvas/src/WebGLContext.cpp:283
#21 0xb4d9911a in mozilla::WebGLContext::~WebGLContext (this=0xb26dfc30, __in_chrg=<optimized out>)
    at /usr/src/debug/mozilla/content/canvas/src/WebGLContext.cpp:214
#22 0xb4d95c4e in mozilla::WebGL1Context::~WebGL1Context (this=0xb26dfc30, __in_chrg=<optimized out>)
    at /usr/src/debug/mozilla/content/canvas/src/WebGL1Context.cpp:25
#23 0xb4d964a9 in mozilla::WebGLContext::DeleteCycleCollectable (this=0xb26dfc30)
    at /usr/src/debug/mozilla/content/canvas/src/WebGLContext.cpp:1369
#24 0xb4d96443 in mozilla::WebGLContext::cycleCollection::DeleteCycleCollectable (
    this=0xb6f2fea8 <mozilla::WebGLContext::_cycleCollectorGlobal>, p=0xb26dfc30) at /usr/src/debug/mozilla/content/canvas/src/WebGLContext.h:150
#25 0xb588930e in SnowWhiteKiller::~SnowWhiteKiller (this=0xbfb5b3ac, __in_chrg=<optimized out>)
    at /usr/src/debug/mozilla/xpcom/base/nsCycleCollector.cpp:1988
#26 0xb58893af in nsCycleCollector::FreeSnowWhite (this=0xb2668000, aUntilNoSWInPurpleBuffer=aUntilNoSWInPurpleBuffer@entry=false)
    at /usr/src/debug/mozilla/xpcom/base/nsCycleCollector.cpp:2097
---Type <return> to continue, or q <return> to quit---q
(gdb) up
#1  0x9d81bfe5 in do_flush_locked (brw=0x9bf23018) at intel_batchbuffer.c:223
223	      exit(1);
(gdb) l
218	   if (unlikely(INTEL_DEBUG & DEBUG_BATCH))
219	      do_batch_dump(brw);
221	   if (ret != 0) {
222	      fprintf(stderr, "intel_do_flush_locked failed: %s\n", strerror(-ret));
223	      exit(1);
224	   }
225	   brw->vtbl.new_batch(brw);
227	   return ret;
(gdb) p ret
$1 = <optimized out>

32562 1392397099.376759 madvise(0x8f27f000, 16384, MADV_DONTNEED) = 0
32562 1392397099.376881 ioctl(95, 0x4020645d, 0xbff653a0) = 0
32562 1392397099.376995 ioctl(95, 0x4020645d, 0xbff653a0) = 0
32562 1392397099.377082 ioctl(95, 0x40406469, 0xbff65370) = -1 EIO (Input/output error)
32562 1392397099.377998 write(2, "intel_do_flush_locked failed: Input/output error\n", 49) = 49
32562 1392397099.378158 unlink("/home/michael/.mozilla/firefox/usd4v21q.default/lock") = 0

Hope it's helpful to someone I have:


Linux linux-tc27.site 3.11.10-7-desktop #1 SMP PREEMPT Mon Feb 3 09:41:24 UTC 2014 (750023e) i686 i686 i386 GNU/Linux
Comment 1 Michael Meeks 2014-02-14 17:06:08 UTC
My Xorg.0.log has even more fun in it:

[ 72182.015] (EE) intel(0): Detected a hung GPU, disabling acceleration.
[ 72182.015] (EE) intel(0): When reporting this, please include /sys/kernel/debug/dri/0/i915_error_state and the full dmesg.

and so on - and several traces which is more fun; I attach that for good measure. I'm using code from:

commit 2425f03432de9bedeeda14ddbc5742cf7ce22874
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue Jan 28 19:17:14 2014 +0000

    sna: Check for a hang after a spurious error return from set-domain-ioctl

which has at least stopped the server crashing ;-)
Comment 2 Michael Meeks 2014-02-14 17:06:29 UTC
Created attachment 94084 [details]
Xorg log
Comment 3 Michael Meeks 2014-02-14 17:07:44 UTC
Created attachment 94085 [details]
Comment 4 Michael Meeks 2014-02-14 17:08:49 UTC
Kernel log is unfortunately fully packed with thousands of duplicate:

2014-02-14T17:07:37.191457+00:00 linux-tc27 kernel: [180704.701169] hub 1-0:1.0: connect-debounce failed, port 3 disabled

a rather old problem, making it difficult to dig any sense out of it, even if it is helpful.

Comment 5 Chris Wilson 2014-02-14 18:49:24 UTC
The hang is fixed by

commit d70620d9789da1cf983dac318d9ca9149f11ff20
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Jan 29 13:39:20 2014 +0000

    sna: We can only retire a bo if is not referenced by the current batch
    Fixes regression from
    commit 8b0ebebcab21647348f769c25ca0c1d81d169e75
    Author: Chris Wilson <chris@chris-wilson.co.uk>
    Date:   Tue Jan 28 16:30:47 2014 +0000
        sna: Be a little more assertive in retiring after set-domain
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74176
    Reported-by: Jan Alexander Steffens <jan.steffens@gmail.com>
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

Not sure if you want to press for mesa to be robust against hangs.
Comment 6 Ian Romanick 2014-02-14 22:53:33 UTC
From the Xorg log, this is GM45:

    [ 69247.692] (--) intel(0): Integrated Graphics Chipset: Intel(R) GM45
    [ 69247.686] (--) PCI:*(0:0:2:0) 8086:2a42:17aa:2114 rev 7, Mem @ 0xf4400000/4194304, 0xd0000000/268435456, I/O @ 0x00001800/8
    [ 69247.686] (--) PCI: (0:0:2:1) 8086:2a43:17aa:2114 rev 7, Mem @ 0xf4200000/1048576

so I'm going to change the component.

Mesa 9.2 is quite old at this point, and there have been a lot of hang-related changes.  Can you still reproduce this issue with 10.0.3 (with or without Chirs's fix in SNA)?
Comment 7 Annie 2017-02-10 22:38:37 UTC
Dear Reporter,

This Mesa bug has been in the "NEEDINFO" status for over 60 days. I am closing this bug based on lack of response but feel free to reopen if resolution is still needed. Please ensure you're supplying the correct information as requested.

Thank you.

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.