Bug 24131 - radeon_bo_legacy.c:207: legacy_is_pending: Assertion `bo_legacy->is_pending <= bo->cref' failed
Summary: radeon_bo_legacy.c:207: legacy_is_pending: Assertion `bo_legacy->is_pending <...
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/R100 (show other bugs)
Version: git
Hardware: All Linux (All)
: medium major
Assignee: Default DRI bug account
QA Contact:
URL: https://bugs.launchpad.net/bugs/446578
Whiteboard:
Keywords: regression
: 24508 24822 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-09-24 03:55 UTC by Jure Repinc
Modified: 2009-11-18 14:52 UTC (History)
10 users (show)

See Also:
i915 platform:
i915 features:


Attachments
xorg.conf (5.31 KB, text/plain)
2009-09-24 03:56 UTC, Jure Repinc
Details
Xorg.0.log (38.98 KB, text/plain)
2009-09-24 03:58 UTC, Jure Repinc
Details
kdm.log (9.46 KB, text/plain)
2009-09-24 03:59 UTC, Jure Repinc
Details

Description Jure Repinc 2009-09-24 03:55:03 UTC
Just recently I updated to Mesa from git master and since I've updated I got some strange crash while using the menus in programs. X often crashed when I use the menus. I can reproduce this crash if I click on a menu like File so that a submenu shows up and then I move the mouse pointer to next menu like Edit so that the previous submenu closes and the new one opens. So if I move the mouse over the menu entries sooner or later X will just crash and exit. i've tried looking in X log file and in dmesg and I couldn't find anything there. What I could find was in /var/log/kdm.log:

*********************************WARN_ONCE*********************************
File radeon_dma.c function radeonReleaseDmaRegions line 348
Leaking dma buffer object!
***************************************************************************
X: radeon_bo_legacy.c:207: legacy_is_pending: Assertion `bo_legacy->is_pending <= bo->cref' failed.

This is on HP Compaq nx6325 with this integrated radeon graphics.
01:05.0 VGA compatible controller: ATI Technologies Inc RS482 [Radeon Xpress 200M]

I'm using KDE 4.3.1 and you have to have desktop effects enabled to trigger the crash.
Comment 1 Jure Repinc 2009-09-24 03:56:44 UTC
Created attachment 29824 [details]
xorg.conf
Comment 2 Jure Repinc 2009-09-24 03:58:34 UTC
Created attachment 29825 [details]
Xorg.0.log
Comment 3 Jure Repinc 2009-09-24 03:59:52 UTC
Created attachment 29826 [details]
kdm.log
Comment 4 Fatih Aşıcı 2009-09-30 22:57:35 UTC
Same problem with HP Compaq nc6400 containing:

01:00.0 VGA compatible controller [0300]: ATI Technologies Inc M52 [Mobility Radeon X1300] [1002:714a]

I have bisected on 7.6 branch. This is the result:

284a7af274bc148f112bd0ebb40583923ee26b49 is first bad commit
commit 284a7af274bc148f112bd0ebb40583923ee26b49
Author: Pauli Nieminen <suokkos@gmail.com>
Date:   Sun Sep 20 22:24:35 2009 +0300

    radeon: Fix legacy bo not to reuse dma buffers before refcount is 1.
····
    This should help detecting possible memory leaks with dma buffers and prevent
    possible visual corruption if data would be overwriten too early.

:040000 040000 2fada933dbda54c97f8c47678f2bb03ff05d09bf 1b9c0f0425df9851994f7fa1e095c9a51e79d2c4 M      src
Comment 5 Michel Dänzer 2009-10-05 05:47:24 UTC
Any ideas Pauli?
Comment 6 Steffen Schloenvoigt 2009-10-06 09:05:51 UTC
Same problem here on Mobility x1400 with latest packages from the openSuse Xorg:X11 repository. Happens for me only when KDE 4 desktop-effects are enabled, though. If I disable them, I can work as usual. Enabling them leads to X crashing within a couple of seconds. Couldn't find the error message in Xorg.0.log but kdm.log catched it as well.
Comment 7 Tormod Volden 2009-10-08 14:16:43 UTC
Does anyone know a way of reproducing this other than installing KDE?
Comment 8 Martin Garbolinski 2009-10-08 14:37:33 UTC
On my radeon x1200 (rs690) the desktop loads but when opening any application window (for example system settings) Xorg crashes and I'm back at kdm login. From this point on changing to terminal ctrl+alt+f1 doesn't work as by doing that I'm left with kdm bitmap and some graphical garbage is produced at the top of the screen.

When compositing is disabled everything is ok, also strangely when booting up the kernel with radeon.modeset=1 and using KMS compositing in kde works as it should and the bug is gone. 
Comment 9 Tormod Volden 2009-10-09 04:52:41 UTC
I confirmed the crash on RV515 on 32-bit by installing kwin and that reverting the commit fixes it.
Comment 10 Modestas Vainius 2009-10-12 02:08:51 UTC
1:00.0 VGA compatible controller: ATI Technologies Inc Radeon Mobility X700 (PCIE)

ii  xserver-xorg-core                    2:1.6.4-2                                  ii  xserver-xorg-video-radeon            1:6.12.3-1                                 
ii  libgl1-mesa-dri                      7.6-1

Xorg crashes with such a backtrace:

Program received signal SIGABRT, Aborted.
0x00007fdcfacafd25 in *__GI_raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
64      ../nptl/sysdeps/unix/sysv/linux/raise.c: Toks failas ar aplankas neegzistuoja.                     
        in ../nptl/sysdeps/unix/sysv/linux/raise.c                                                         
(gdb) bt
#0  0x00007fdcfacafd25 in *__GI_raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x00007fdcfacb2de1 in *__GI_abort () at abort.c:88
#2  0x00007fdcfaca8f99 in *__GI___assert_fail (assertion=0x7fdcee613a28 "bo_legacy->is_pending <= bo->cref",
    file=0x7fdcee6139a0 "radeon_bo_legacy.c", line=207, function=0x7fdcee613ae0 "legacy_is_pending") at assert.c:78
#3  0x00007fdcee4619df in legacy_is_pending (bo=<value optimized out>) at radeon_bo_legacy.c:207
#4  0x00007fdcee461ba4 in legacy_track_pending (bom=0x87eee0, debug=0) at radeon_bo_legacy.c:251
#5  0x00007fdcee461f3a in bo_open (bom=0x87eee0, handle=<value optimized out>, size=<value optimized out>, alignment=<value optimized out>,
    domains=<value optimized out>, flags=<value optimized out>) at radeon_bo_legacy.c:448
#6  0x00007fdcee467f1e in _radeon_bo_open (rmesa=0x15f8370, size=32) at ../radeon/radeon_bo_drm.h:110
#7  radeonRefillCurrentDmaRegion (rmesa=0x15f8370, size=32) at radeon_dma.c:196
#8  0x00007fdcee468243 in radeonAllocDmaRegion (rmesa=0x15f8370, pbo=0x15fb050, poffset=0x15fb058, bytes=32,
    alignment=<value optimized out>) at radeon_dma.c:250
#9  0x00007fdcee44b0fb in r300AllocDmaRegions (ctx=0x1661360, arrays=0x1d973c8, prim=0x1d95a44, nr_prims=1, ib=0x0,
    index_bounds_valid=<value optimized out>, min_index=0, max_index=3) at r300_draw.c:529
#10 r300TryDrawPrims (ctx=0x1661360, arrays=0x1d973c8, prim=0x1d95a44, nr_prims=1, ib=0x0, index_bounds_valid=<value optimized out>,
    min_index=0, max_index=3) at r300_draw.c:653
#11 r300DrawPrims (ctx=0x1661360, arrays=0x1d973c8, prim=0x1d95a44, nr_prims=1, ib=0x0, index_bounds_valid=<value optimized out>,
    min_index=0, max_index=3) at r300_draw.c:706
#12 0x00007fdcee508610 in vbo_exec_vtx_flush (exec=0x1d95800, unmap=1 '\1') at vbo/vbo_exec_draw.c:378
#13 0x00007fdcee5046bd in vbo_exec_FlushVertices_internal (ctx=<value optimized out>, unmap=159 '\237') at vbo/vbo_exec_api.c:759
#14 0x00007fdcee504772 in vbo_exec_FlushVertices (ctx=0xb9f, flags=1) at vbo/vbo_exec_api.c:781
#15 0x00007fdcee4d755e in _mesa_set_scissor (ctx=0x1661360, x=310, y=403, width=2, height=1) at main/scissor.c:75
#16 0x00007fdcf9f83446 in __glXDisp_Render (cl=<value optimized out>, pc=0x21c1a8c "\24") at ../../glx/glxcmds.c:1823
#17 0x00007fdcf9f87572 in __glXDispatch (client=0x1460550) at ../../glx/glxext.c:568
#18 0x000000000044d454 in Dispatch () at ../../dix/dispatch.c:456
#19 0x000000000043337a in main (argc=8, argv=0x7fff3ac45d58, envp=<value optimized out>) at ../../dix/main.c:397
(gdb)
Comment 11 Alex Deucher 2009-10-13 12:22:38 UTC
*** Bug 24508 has been marked as a duplicate of this bug. ***
Comment 12 Modestas Vainius 2009-10-15 07:36:50 UTC
FYI, this bug is screwing many KDE 4 users using their desktop environment with OpenGL effects (enabled by default) on radeon cards. The bug triggers semi-random X session crashes and people lose data and otherwise get annoyed. Moreover, this is a regression from meta 7.5. The origin of the crashes is not very obvious without deep investigation which a typical user is unable to do. Please consider this problem of higher priority.
Comment 13 Michel Dänzer 2009-11-05 03:44:22 UTC
As Pauli seems to be MIA, any better ideas than just reverting the bisected commit?
Comment 14 Julien Cristau 2009-11-08 03:00:40 UTC
*** Bug 24822 has been marked as a duplicate of this bug. ***
Comment 15 Alex Deucher 2009-11-18 08:54:26 UTC
Reverted: 13b5a624b1899c457279907d58046dfb3c95addc
Comment 16 Tormod Volden 2009-11-18 14:52:46 UTC
I wonder if reverting that commit brought all the "radeon_dma.c:210: radeonRefillCurrentDmaRegion: Assertion `dma_bo->bo->cref == 1' failed" reported in https://launchpad.net/bugs/459961 though.


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.