Segmentation Fault in nv50_screen_fence_update

Bug #955410 reported by Brian J. Murrell
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mesa
Fix Released
Medium
mesa (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Per the upstream bug report (https://bugs.freedesktop.org/show_bug.cgi?id=47306), I am getting a segfault in mesa:

#0 nouveau_fence_update (screen=0x0, flushed=1 '\001') at nouveau_fence.c:141
        fence = <optimized out>
        next = 0x0
        sequence = <optimized out>
#1 0xaae1ec77 in nv50_default_flush_notify (chan=0x8f29af0) at
nv50_context.c:68
        nv50 = 0xa8248c68
#2 0xad19ff50 in nouveau_pushbuf_flush () from
/usr/lib/i386-linux-gnu/libdrm_nouveau.so.1
No symbol table info available.
#3 0xaae1ec0e in FIRE_RING (chan=<optimized out>) at
/usr/include/nouveau/nouveau_pushbuf.h:101
No locals.
#4 nv50_flush (pipe=0x8f53028, fence=0x0) at nv50_context.c:46
        screen = 0x8f29810
#5 0xaa974561 in st_flush (st=0x9001c60, fence=0x0) at
state_tracker/st_cb_flush.c:92
No locals.
#6 0xaa9745a0 in st_glFlush (ctx=0x8fc0678) at state_tracker/st_cb_flush.c:126
        st = 0x9001c60
#7 0xaabb34b0 in _mesa_flush (ctx=0x8fc0678) at main/context.c:1656
No locals.
#8 0xaabb3bce in _mesa_Flush () at main/context.c:1688
        ctx = 0x8fc0678
#9 0xb6af9899 in MythRenderOpenGL::Flush(bool) () from
/usr/lib/libmythui-0.25.so.0
No symbol table info available.
#10 0xb6b01d1a in MythRenderOpenGL::CreateTexture(QSize, bool, unsigned int,
unsigned int, unsigned int, unsigned int, unsigned int, unsigned int) () from
/usr/lib/libmythui-0.25.so.0
No symbol table info available.
#11 0xb6af78f3 in MythOpenGLPainter::GetTextureFromCache(MythImage*) () from
/usr/lib/libmythui-0.25.so.0
No symbol table info available.
#12 0xb6af7da8 in MythOpenGLPainter::DrawImage(QRect const&, MythImage*, QRect
const&, int) () from /usr/lib/libmythui-0.25.so.0
No symbol table info available.
#13 0xb6a03a6f in MythUIImage::DrawSelf(MythPainter*, int, int, int, QRect) ()
from /usr/lib/libmythui-0.25.so.0
No symbol table info available.
#14 0xb69fd0e4 in MythUIType::Draw(MythPainter*, int, int, int, QRect) () from
/usr/lib/libmythui-0.25.so.0
No symbol table info available.
#15 0xb69fd180 in MythUIType::Draw(MythPainter*, int, int, int, QRect) () from
/usr/lib/libmythui-0.25.so.0
No symbol table info available.
#16 0xb69bb068 in MythMainWindow::draw() () from /usr/lib/libmythui-0.25.so.0
No symbol table info available.
#17 0xb69bb6f8 in MythMainWindow::drawScreen() () from
/usr/lib/libmythui-0.25.so.0
No symbol table info available.
#18 0xb69bb8bb in ?? () from /usr/lib/libmythui-0.25.so.0
No symbol table info available.
#19 0xb5b1cf6e in QWidget::event(QEvent*) () from
/usr/lib/i386-linux-gnu/libQtGui.so.4
No symbol table info available.
#20 0xb235dfe2 in QGLWidget::event(QEvent*) () from
/usr/lib/i386-linux-gnu/libQtOpenGL.so.4
No symbol table info available.
#21 0xb5ac2d84 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from
/usr/lib/i386-linux-gnu/libQtGui.so.4
No symbol table info available.
#22 0xb5ac81d8 in QApplication::notify(QObject*, QEvent*) () from
/usr/lib/i386-linux-gnu/libQtGui.so.4
No symbol table info available.
#23 0xb56f319e in QCoreApplication::notifyInternal(QObject*, QEvent*) () from
/usr/lib/i386-linux-gnu/libQtCore.so.4
No symbol table info available.
#24 0xb5b19e1b in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&,
QPoint const&, int, QPainter*, QWidgetBackingStore*) () from
/usr/lib/i386-linux-gnu/libQtGui.so.4
No symbol table info available.
#25 0xb5cfe39e in QWidgetPrivate::repaint_sys(QRegion const&) () from
/usr/lib/i386-linux-gnu/libQtGui.so.4
No symbol table info available.
#26 0xb5b0f6a0 in QWidgetPrivate::syncBackingStore() () from
/usr/lib/i386-linux-gnu/libQtGui.so.4
No symbol table info available.
#27 0xb5b1d8ff in QWidget::event(QEvent*) () from
/usr/lib/i386-linux-gnu/libQtGui.so.4
No symbol table info available.
#28 0xb235dfe2 in QGLWidget::event(QEvent*) () from
/usr/lib/i386-linux-gnu/libQtOpenGL.so.4
No symbol table info available.
#29 0xb5ac2d84 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from
/usr/lib/i386-linux-gnu/libQtGui.so.4
No symbol table info available.
#30 0xb5ac81d8 in QApplication::notify(QObject*, QEvent*) () from
/usr/lib/i386-linux-gnu/libQtGui.so.4
No symbol table info available.
#31 0xb56f319e in QCoreApplication::notifyInternal(QObject*, QEvent*) () from
/usr/lib/i386-linux-gnu/libQtCore.so.4
No symbol table info available.
#32 0xb56f6f93 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int,
QThreadData*) () from /usr/lib/i386-linux-gnu/libQtCore.so.4
No symbol table info available.
#33 0xb56f70ec in QCoreApplication::sendPostedEvents(QObject*, int) () from
/usr/lib/i386-linux-gnu/libQtCore.so.4
No symbol table info available.
#34 0xb57216a4 in ?? () from /usr/lib/i386-linux-gnu/libQtCore.so.4
No symbol table info available.
#35 0xb219725f in g_main_dispatch (context=0x8db7e70) at
/build/buildd/glib2.0-2.30.0/./glib/gmain.c:2441
        dispatch = 0xb5721670
        was_in_call = 0
        user_data = 0x0
        callback = 0
        cb_funcs = 0x0
        cb_data = 0x0
        current_source_link = {data = 0x8db7f00, next = 0x0}
        need_destroy = <optimized out>
        source = 0x8db7f00
        current = 0x8db7410
        i = <optimized out>
#36 g_main_context_dispatch (context=0x8db7e70) at
/build/buildd/glib2.0-2.30.0/./glib/gmain.c:3011
No locals.
#37 0xb2197990 in g_main_context_iterate (context=0x8db7e70, block=-1306893536,
dispatch=1, self=<optimized out>) at
/build/buildd/glib2.0-2.30.0/./glib/gmain.c:3089
        max_priority = 0
        timeout = 0
        some_ready = 1
        nfds = <optimized out>
        allocated_nfds = <optimized out>
        fds = 0xa8247fc8
#38 0xb2197c2a in g_main_context_iteration (context=0x8db7e70, may_block=0) at
/build/buildd/glib2.0-2.30.0/./glib/gmain.c:3152
        retval = <optimized out>
#39 0xb5721ada in
QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
from /usr/lib/i386-linux-gnu/libQtCore.so.4
No symbol table info available.
#40 0xb5b7ae7a in ?? () from /usr/lib/i386-linux-gnu/libQtGui.so.4
No symbol table info available.
#41 0xb56f7383 in
QCoreApplication::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from
/usr/lib/i386-linux-gnu/libQtCore.so.4
No symbol table info available.
#42 0xb6c0c1c8 in MythSystem::Wait(long) () from /usr/lib/libmythbase-0.25.so.0
No symbol table info available.
#43 0xb6c113b9 in myth_system(QString const&, unsigned int, unsigned int) ()
from /usr/lib/libmythbase-0.25.so.0
No symbol table info available.
#44 0xb6c67561 in ping(QString const&, int) () from
/usr/lib/libmythbase-0.25.so.0
No symbol table info available.
#45 0xb6c706bc in setHttpProxy() () from /usr/lib/libmythbase-0.25.so.0
No symbol table info available.
#46 0x0806d527 in ?? ()
No symbol table info available.
#47 0xb531f113 in __libc_start_main (main=0x806c160, argc=1, ubp_av=0xbfec5314,
init=0x829c060, fini=0x829c0d0, rtld_fini=0xb77deba0, stack_end=0xbfec530c) at
libc-start.c:226
        result = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {-1253572620, 0, 0, 0,
632443622, -1627982093}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x1,
0x806fe74}, data = {prev = 0x0, cleanup = 0x0, canceltype = 1}}}
        not_first_call = <optimized out>
#48 0x0806fe95 in ?? ()
No symbol table info available.
Backtrace stopped: Not enough registers or memory available to unwind further

This is fixed in https://bugs.freedesktop.org/show_bug.cgi?id=43428. Can we have this patch applied for Oneiric please.

ProblemType: Bug
DistroRelease: LinuxMint 12
Package: libgl1-mesa-glx 7.11-0ubuntu3
ProcVersionSignature: Ubuntu 3.0.0-16.28-generic-pae 3.0.17
Uname: Linux 3.0.0-16-generic-pae i686
.tmp.unity.support.test.0:

ApportVersion: 1.23-0ubuntu4
Architecture: i386
CompizPlugins: [core,bailer,detection,composite,opengl,compiztoolbox,decor,grid,imgpng,gnomecompat,vpswitch,snap,mousepoll,unitymtgrabhandles,move,place,regex,resize,animation,expo,wall,session,ezoom,workarounds,fade,scale,unityshell]
CompositorRunning: None
Date: Wed Mar 14 15:51:19 2012
DistUpgraded: Starting
DistroCodename: lisa
DistroVariant: ubuntu
ExtraDebuggingInterest: Yes, whatever it takes to get this fixed in Ubuntu
GraphicsCard:
 nVidia Corporation G98 [GeForce 8400 GS] [10de:06e4] (rev a1) (prog-if 00 [VGA controller])
   Subsystem: ASUSTeK Computer Inc. Device [1043:8266]
MachineType: System manufacturer System Product Name
ProcEnviron:
 PATH=(custom, user)
 LANG=en_CA.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.0.0-16-generic-pae root=/dev/mapper/rootvol-ubuntu_root ro console=ttyS0,115200 console=tty0 crashkernel=384M-2G:64M,2G-:128M vt.handoff=7
SourcePackage: mesa
UpgradeStatus: Upgraded to lisa on 2007-04-05 (1805 days ago)
dmi.bios.date: 03/26/2008
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 0503
dmi.board.asset.tag: To Be Filled By O.E.M.
dmi.board.name: M2N-MX SE Plus
dmi.board.vendor: ASUSTeK Computer INC.
dmi.board.version: Rev x.xx
dmi.chassis.asset.tag: Asset-1234567890
dmi.chassis.type: 3
dmi.chassis.vendor: Chassis Manufacture
dmi.chassis.version: Chassis Version
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr0503:bd03/26/2008:svnSystemmanufacturer:pnSystemProductName:pvrSystemVersion:rvnASUSTeKComputerINC.:rnM2N-MXSEPlus:rvrRevx.xx:cvnChassisManufacture:ct3:cvrChassisVersion:
dmi.product.name: System Product Name
dmi.product.version: System Version
dmi.sys.vendor: System manufacturer
version.compiz: compiz 1:0.9.6+bzr20110929-0ubuntu6.1
version.libdrm2: libdrm2 2.4.26-1ubuntu1
version.libgl1-mesa-dri: libgl1-mesa-dri 7.11-0ubuntu3
version.libgl1-mesa-dri-experimental: libgl1-mesa-dri-experimental N/A
version.libgl1-mesa-glx: libgl1-mesa-glx 7.11-0ubuntu3
version.xserver-xorg: xserver-xorg 1:7.6+7ubuntu7.1
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev 1:2.6.0-1ubuntu13
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:6.14.99~git20110811.g93fc084-0ubuntu1
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.15.901-1ubuntu2.1
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:0.0.16+git20110411+8378443-1

Revision history for this message
In , Philipp-dev (philipp-dev) wrote :

Created attachment 54024
backtrace of the crash

Nouveau in the combination with the egl_dri2 driver crashes in the aforementioned function. The egl_gallium driver seems to work fine (tested with Mesa 7.11.2), but this driver is unfortunately not shipped with fedora.

As the bug vanishes if I use the latest Mesa 7.12-devel (git-ccd4d43), I would suggest that some of the patches that substitute the function nv50_screen_fence_update are ported back to 7.11.

Thanks a lot.

For completeness: I'm using a nvidia NVS 3100M and the fedora 2.6.41 kernel.

Revision history for this message
In , Marcin Slusarz (marcin-slusarz) wrote :

Created attachment 54088
simple fix

Cherry-picking 3069a7eaa5d83e7f41616347ba244c0dc0d944ae (and 27e77cb902b4f7f5e127dcd78951e3167f13d59c) to 7.11 should fix it.

Alternatively we could apply attached patch.

Can you verify both patches fix your crash?

Revision history for this message
In , Philipp-dev (philipp-dev) wrote :

The attached patch as well as the commit 3069a7eaa5d83e7f41616347ba244c0dc0d944ae fix the bug. The commit 3069a7ea seems to be sufficient, what also explains why it even worked with mesa master before you commited 27e77cb902b4f7f5e127dcd78951e3167f13d59c. Thanks a lot :)

Revision history for this message
In , Marcin Slusarz (marcin-slusarz) wrote :

Commited to 7.11. Thanks.

Revision history for this message
Brian J. Murrell (brian-interlinx) wrote :
description: updated
Changed in mesa:
importance: Unknown → Medium
status: Unknown → Fix Released
Revision history for this message
Vibhav Pant (vibhavp) wrote :

Attached Patch

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

This is fixed in precise, which has mesa 8.0.2. Backporting fixes like this is less of a priority though, since the release of 12.04 is so close.

Changed in mesa (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.