Bug 31617 - Radeon/Compiz: 'failed to attach dri2 front buffer', error case not handled
Summary: Radeon/Compiz: 'failed to attach dri2 front buffer', error case not handled
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/R600 (show other bugs)
Version: 7.9
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact:
Depends on:
Reported: 2010-11-14 04:10 UTC by Daniel Lichtenberger
Modified: 2010-11-14 22:37 UTC (History)
0 users

See Also:
i915 platform:
i915 features:

backtrace (5.89 KB, text/plain)
2010-11-14 04:10 UTC, Daniel Lichtenberger

Description Daniel Lichtenberger 2010-11-14 04:10:14 UTC
Created attachment 40267 [details]

System: Fedora 14, Radeon 4850, x86_64.

Using the system's mesa-dri-drivers package Compiz frequently crashes while resizing windows. The backtrace (attached) and the error message, "failed to attach dri2 front buffer XX", point to radeon_update_renderbuffers in radeon_common_context.c around line 745:

            bo = radeon_bo_open(...);

            if (bo == NULL) {

                fprintf(stderr, "failed to attach %s %d\n",
                    regname, buffers[i].name);


            ret = radeon_bo_get_tiling(bo, &tiling_flags, &pitch);

An error message is printed when 'bo' could not be allocated, but bo is then happily dereferenced in radeon_bo_get_tiling afterwards. Working around the null pointer dereference (e.g. by adding a 'continue' in the "if bo==NULL" block) fixes the crash for me and I haven't seen visual artifacts yet, although the error message is printed from time to time while running Compiz.

The same stacktrace was logged by several people over at https://bugzilla.redhat.com/show_bug.cgi?id=568593.
Comment 1 Alex Deucher 2010-11-14 22:37:36 UTC
Thanks.  Fix pushed to master:
and 7.9:

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.