Bug 219199 - Segmentation fault in radeonGetBufferSize
Summary: Segmentation fault in radeonGetBufferSize
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: mesa
Version: 6
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Adam Jackson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-12-11 21:21 UTC by Orion Poplawski
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-08-14 15:21:19 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Orion Poplawski 2006-12-11 21:21:31 UTC
Description of problem:

Trying to run paraview (from FE) on a machine with a Radeon video card and am
getting segmentation faults.  I'm the packager of paraview, but I'm afraid I
have limited knowledge of GL programming.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208183072 (LWP 10186)]
radeonGetBufferSize (buffer=0x92fca68, width=0xbfc3c354, height=0xbfc3c358)
    at radeon_context.c:89
89         radeonContextPtr rmesa = RADEON_CONTEXT(ctx);
Current language:  auto; currently c
(gdb) list
84       */
85      static void radeonGetBufferSize( GLframebuffer *buffer,
86                                       GLuint *width, GLuint *height )
87      {
88         GET_CURRENT_CONTEXT(ctx);
89         radeonContextPtr rmesa = RADEON_CONTEXT(ctx);
90
91         LOCK_HARDWARE( rmesa );
92         *width  = rmesa->dri.drawable->w;
93         *height = rmesa->dri.drawable->h;

The context is returning as null:

(gdb) print _glapi_get_context()
$4 = (void *) 0x0

more backtrace:

#0  radeonGetBufferSize (buffer=0x92fca68, width=0xbfc3c354, height=0xbfc3c358)
    at radeon_context.c:89
#1  0x020e8fc4 in _mesa_make_current () from /usr/lib/libOSMesa.so.6
#2  0x029aca6a in radeonMakeCurrent (driContextPriv=0x917d860,
driDrawPriv=0x91c8001,
    driReadPriv=0x92fca00) at radeon_context.c:637
#3  0x029a9791 in driBindContext (dpy=0x8bb8d80, scrn=0, draw=52429205,
read=52429205,
    ctx=0x917f040) at ../common/dri_util.c:343
#4  0x4a2cfd3c in BindContextWrapper (dpy=0x0, gc=0x92fca68,
    draw=<value optimized out>, read=52429205) at glxext.c:1542
#5  0x4a2d1f1f in MakeContextCurrent (dpy=0x8bb8d80, draw=52429205, read=52429205,
    gc=0x917ef90) at glxext.c:1630
#6  0x4a2d21c3 in glXMakeCurrent (dpy=0x8bb8d80, draw=52429205, gc=0x917ef90)
    at glxext.c:1792

#2  0x029aca6a in radeonMakeCurrent (driContextPriv=0x917d860,
driDrawPriv=0x91c8001,
    driReadPriv=0x92fca00) at radeon_context.c:637
637           _mesa_make_current( newCtx->glCtx,
(gdb) list
632              newCtx->dri.drawable = driDrawPriv;
633              radeonUpdateWindow( newCtx->glCtx );
634              radeonUpdateViewportOffset( newCtx->glCtx );
635           }
636
637           _mesa_make_current( newCtx->glCtx,
638                               (GLframebuffer *) driDrawPriv->driverPrivate,
639                               (GLframebuffer *) driReadPriv->driverPrivate );
640
641           if (newCtx->vb.enabled)
(gdb) print newCtx->glCtx
$10 = (GLcontext *) 0x213f340

Version-Release number of selected component (if applicable):
6.5.1-8.fc6

How reproducible:
Everytime

Looks like for some reason debug information for libOSMesa.so.6 is not
available.  paraview is compiled with OSMesa to provided support for off-screen
rendering when needed.

Comment 1 Orion Poplawski 2006-12-14 21:42:41 UTC
When paraview is compiled without OSMesa support it starts fine, so the issue
does appear to be related to the OSMesa configuration.

Comment 2 Adam Jackson 2007-08-14 15:21:19 UTC
Yes, this is a bug with how Mesa was built prior to 6.5.2-5, such that if you
link both OSMesa and a DRI driver into the same process, the DRI driver ends up
calling symbols from OSMesa, and going boom.  This bug should be resolved in FC7
and later.


Note You need to log in before you can comment on or make changes to this bug.