Bug 219199 - Segmentation fault in radeonGetBufferSize
Segmentation fault in radeonGetBufferSize
Product: Fedora
Classification: Fedora
Component: mesa (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Adam Jackson
Depends On:
  Show dependency treegraph
Reported: 2006-12-11 16:21 EST by Orion Poplawski
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-08-14 11:21:19 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Orion Poplawski 2006-12-11 16:21:31 EST
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);
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,
    driReadPriv=0x92fca00) at radeon_context.c:637
#3  0x029a9791 in driBindContext (dpy=0x8bb8d80, scrn=0, draw=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,
    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           }
637           _mesa_make_current( newCtx->glCtx,
638                               (GLframebuffer *) driDrawPriv->driverPrivate,
639                               (GLframebuffer *) driReadPriv->driverPrivate );
641           if (newCtx->vb.enabled)
(gdb) print newCtx->glCtx
$10 = (GLcontext *) 0x213f340

Version-Release number of selected component (if applicable):

How reproducible:

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 16:42:41 EST
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 11:21:19 EDT
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.