Bug 221540 - segmentation fault in radeonInitStateFuncs (ctx=0x9cb3da0) at radeon_state.c:2389
Summary: segmentation fault in radeonInitStateFuncs (ctx=0x9cb3da0) at radeon_state.c:...
Alias: None
Product: Fedora
Classification: Fedora
Component: mesa
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Adam Jackson
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2007-01-04 23:46 UTC by Orion Poplawski
Modified: 2018-04-11 11:21 UTC (History)
2 users (show)

Clone Of:
Last Closed: 2007-10-17 20:33:54 UTC

Attachments (Terms of Use)
xorg.conf (637 bytes, text/plain)
2007-01-08 21:17 UTC, Orion Poplawski
no flags Details
X log with config file (64.56 KB, text/plain)
2007-01-08 21:18 UTC, Orion Poplawski
no flags Details
X log without config file (65.14 KB, text/plain)
2007-01-08 21:22 UTC, Orion Poplawski
no flags Details

Description Orion Poplawski 2007-01-04 23:46:16 UTC
Description of problem:

IDL gets a segmentation fault when plotting.  I'm pretty sure this used to work
on FC6.  I'll try to verify that and see what update causes a problem.

(gdb) bt
#0  0x00ecf2b4 in radeonInitStateFuncs (ctx=0x9cb3da0) at radeon_state.c:2389
#1  0x00ec9573 in radeonCreateContext (glVisual=0x9ca7778, driContextPriv=0x9ca7198,
    sharedContextPrivate=0x0) at radeon_context.c:428
#2  0x00ec4fe3 in driCreateNewContext (dpy=0x9c9b610, modes=0x9ca7778,
    sharedPrivate=0x0, pctx=0x9ca99c8) at ../common/dri_util.c:798
#3  0x00c8c850 in CreateContext (dpy=0x9c9b610, vis=0x9ca9508, fbconfig=0x0,
    shareList=0x0, allowDirect=1, contextID=0, use_glx_1_3=0, renderType=0)
    at glxcmds.c:353
#4  0x00c8cc78 in glXCreateContext (dpy=0x9c9b610, vis=0x9ca9508, shareList=0x0,
    allowDirect=1) at glxcmds.c:430
#5  0x00bd2101 in _IDL_XGLAllocContext ()
   from /opt/local/rsi/idl_6.3/bin/bin.linux.x86/gl_driver.so
#6  0x00507d39 in X_AllocRenderContext ()
   from /opt/local/rsi/idl_6.3/bin/bin.linux.x86/libidl.so.6.3
#7  0x0050769a in _IDL_X_EstablishConnectionGLRes ()
   from /opt/local/rsi/idl_6.3/bin/bin.linux.x86/libidl.so.6.3
#8  0x005079bb in _IDL_X_EstablishConnection ()
   from /opt/local/rsi/idl_6.3/bin/bin.linux.x86/libidl.so.6.3
#9  0x00506e5a in _IDL_X_GetConnectionWithColors ()
   from /opt/local/rsi/idl_6.3/bin/bin.linux.x86/libidl.so.6.3
#10 0x003b7632 in _IDL_x_init ()
   from /opt/local/rsi/idl_6.3/bin/bin.linux.x86/libidl.so.6.3
#11 0x003b9aa5 in x_window ()
   from /opt/local/rsi/idl_6.3/bin/bin.linux.x86/libidl.so.6.3
#12 0x001ed583 in _IDL_ensure_window ()
   from /opt/local/rsi/idl_6.3/bin/bin.linux.x86/libidl.so.6.3
#13 0x003cb3ce in _IDL_init_plot_vars ()
   from /opt/local/rsi/idl_6.3/bin/bin.linux.x86/libidl.so.6.3
#14 0x003c8821 in plot_it () from
#15 0x003c8575 in IDL_plot ()
   from /opt/local/rsi/idl_6.3/bin/bin.linux.x86/libidl.so.6.3
#16 0x00396721 in _IDL_interpreter ()
   from /opt/local/rsi/idl_6.3/bin/bin.linux.x86/libidl.so.6.3
#17 0x001de094 in IDL_Executive ()
   from /opt/local/rsi/idl_6.3/bin/bin.linux.x86/libidl.so.6.3
#18 0x00575d5b in IDL_Main ()
   from /opt/local/rsi/idl_6.3/bin/bin.linux.x86/libidl.so.6.3
#19 0x08051cb9 in main ()
(gdb) list 2389
2384       ctx->Driver.StencilFuncSeparate      = radeonStencilFuncSeparate;
2385       ctx->Driver.StencilMaskSeparate      = radeonStencilMaskSeparate;
2386       ctx->Driver.StencilOpSeparate        = radeonStencilOpSeparate;
2387       ctx->Driver.Viewport                 = radeonViewport;
2389       TNL_CONTEXT(ctx)->Driver.NotifyMaterialChange = radeonUpdateMaterial;
2390       TNL_CONTEXT(ctx)->Driver.RunPipeline = radeonWrapRunPipeline;
2391    }
(gdb) print (TNLcontext *)((ctx)->swtnl_context)
$4 = (struct {...} *) 0x0

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

How reproducible:
every time

This is on a radeon laptop.  Also seeing segfault on a i810 and another radeon

Comment 1 Orion Poplawski 2007-01-05 18:17:02 UTC
Well, just tested with a "bare" un-updated FC6 install and mga driver with dri
enabled and it segfaults too.  So it looks like it's been there since day one.

It also says:

libGL warning: 3D driver claims to not support visual 0x4b

but not sure if that's a problem or not.

Comment 2 Matěj Cepl 2007-01-08 20:59:07 UTC
Thanks for the bug report. I mean, really, but we still need some information to
know. Please attach your X server config file (/etc/X11/xorg.conf) and X server
log file (/var/log/Xorg.*.log) to the bug report as individual uncompressed file
attachments using the bugzilla file attachment link below.

Could you please also try to run without any /etc/X11/xorg.conf whatsoever and
let X11 autodetect your display and video card? Attach to this bug
/var/log/Xorg.0.log from this attempt as well, please.

We will review this issue again once you've had a chance to attach this information.

Thanks in advance.

Comment 3 Orion Poplawski 2007-01-08 21:17:17 UTC
Created attachment 145105 [details]

This is the config file from my machine set to 16-bit so DRI is enabled.  This
also happens on a i810 machine and a mga machine.

Comment 4 Orion Poplawski 2007-01-08 21:18:39 UTC
Created attachment 145106 [details]
X log with config file

There is no difference in the log from before I run IDL and after it segfaults.

Comment 5 Orion Poplawski 2007-01-08 21:22:18 UTC
Created attachment 145107 [details]
X log without config file

Without the config file, DRI is disabled so it kind of blows the test.

Comment 6 Adam Jackson 2007-01-24 20:07:51 UTC
radeon_state.c:2389 is:
   TNL_CONTEXT(ctx)->Driver.NotifyMaterialChange = radeonUpdateMaterial;

We know ctx is a valid pointer, since it shows up valid in the traceback and we
deref through it earlier in the function.  But:

#define TNL_CONTEXT(ctx) ((TNLcontext *)((ctx)->swtnl_context))

swtnl_context is probably null.  Hm.

Comment 7 Orion Poplawski 2007-05-09 16:21:29 UTC
FYI - It appears that ITT (IDL's producer) is now aware of the problem and the
upcoming release of IDL 6.4 will be linked against an updated GL library to fix
this issue.

Comment 8 Orion Poplawski 2007-10-17 20:33:54 UTC
New IDL fixed the issue for us.

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