Bug 13078 - Xephyr 1.4 crash in find_mesa_visual when running KDE4
Summary: Xephyr 1.4 crash in find_mesa_visual when running KDE4
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/DDX/Xephyr (show other bugs)
Version: 7.3 (2007.09)
Hardware: Other All
: medium normal
Assignee: Dodji Seketeli
QA Contact: Xorg Project Team
URL: http://bugs.debian.org/cgi-bin/bugrep...
Whiteboard:
Keywords:
Depends on:
Blocks: xorg-server-1.4.1
  Show dependency treegraph
 
Reported: 2007-11-04 06:08 UTC by Brice Goglin
Modified: 2007-11-12 12:33 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Brice Goglin 2007-11-04 06:08:28 UTC
Bug reported by Harri Pitkänen in the Debian BTS today.

He's trying to run a KDE4 development snapshot *within* Xephyr 1.4. It causes a crash with the following backtrace. The bug couldn't be reproduced with a stable KDE or Gnome. It's probably related to some Compositing stuff that KDE4 enables and I guess Xephyr does not support all of them yet...

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x2ba8310e7d30 (LWP 2510)]
0x000000000053080d in find_mesa_visual (screen=0xbf2350, vid=58) at ../../../GL/glx/glxglcore.c:290
290         return (modes != NULL) ? mesaScreen->xm_vis[i] : NULL;
(gdb) bt full
#0  0x000000000053080d in find_mesa_visual (screen=0xbd82e0, vid=58) at ../../../GL/glx/glxglcore.c:290
        mesaScreen = (__GLXMESAscreen *) 0xbd82e0
        modes = (const __GLcontextModes *) 0xd907f0
        i = 0
#1  0x000000000053066a in __glXMesaScreenCreateContext (screen=0xbd82e0, modes=0xd907f0, baseShareContext=0x0) at ../../../GL/glx/glxglcore.c:237
        context = (__GLXMESAcontext *) 0xda0350
        shareContext = (__GLXMESAcontext *) 0x0
        xm_vis = (XMesaVisual) 0x3a00000000
        xm_share = (XMesaContext) 0xd907f0
#2  0x000000000054f883 in DoCreateContext (cl=0xd90730, gcId=12582918, shareList=0, visual=58, screen=0, isDirect=0 '\0') at ../../../GL/glx/glxcmds.c:206
        client = (ClientPtr) 0xd92870
        pVisual = (VisualPtr) 0xbed018
        pScreen = (ScreenPtr) 0xd59f90
        glxc = (__GLXcontext *) 0x8a4f60
        shareglxc = (__GLXcontext *) 0x0
        modes = (__GLcontextModes *) 0xd907f0
        pGlxScreen = (__GLXscreen *) 0xbd82e0
        i = 1
#3  0x000000000054f9c4 in __glXDisp_CreateContext (cl=0xd90730, pc=0xd9ff70 "\225\003\006") at ../../../GL/glx/glxcmds.c:249
        req = (xGLXCreateContextReq *) 0xd9ff70
#4  0x0000000000530276 in __glXDispatch (client=0xd92870) at ../../../GL/glx/glxext.c:561
        rendering = 0 '\0'
        stuff = (xGLXSingleReq *) 0xd9ff70
        opcode = 3 '\003'
        proc = (__GLXdispatchSingleProcPtr) 0x54f96d <__glXDisp_CreateContext>
        cl = (__GLXclientState *) 0xd90730
        retval = 0
#5  0x00000000004fabf5 in XaceCatchExtProc (client=0xd92870) at ../../Xext/xace.c:299
        stuff = (xReq *) 0x0
        major = 149
        ext = (ExtensionEntry *) 0xbf21c0
#6  0x000000000046600f in Dispatch () at ../../dix/dispatch.c:502
        clientReady = (int *) 0x7fff4168a710
        result = 24
        client = (ClientPtr) 0xd92870
        nready = 0
        icheck = (HWEventQueuePtr *) 0xbc1df0
        start_tick = 2140
#7  0x000000000044a09f in main (argc=2, argv=0x7fff4168aca8, envp=0x7fff4168acc0) at ../../dix/main.c:452
        i = 1
        j = 2
        k = 2
        error = 1768139776
        xauthfile = 0x0
        alwaysCheckForInput = {0, 1}


In case it matters, here are the latest KDE messages before the crash:
  kdeinit4: Got EXEC_NEW 'kwin' from launcher.
  kdeinit4: preparing to launch /home/kde/kde/bin/kwin
  klauncher(3750)/kio (KLauncher) KLauncher::processRequestReturn: "kwin" (pid 3764) up and running.
  kwin(3764) KWin::Extensions::init: Extensions: shape: 0x "11"  composite: 0x "4"  render: 0x "a"  fixes: 0x "40"
  kwin(3764) KWin::CompositingPrefs::detect: glx version is  1 . 2
Comment 1 Dodji Seketeli 2007-11-12 12:28:17 UTC
Okay, this is due to the fact that Xephyr actually does not provide any OpenGL renderer in 1.4.x.
But as it was compiled with --enable-glx, the GLX extension was enabled, accepting GL requests. Those request could not be handled properly by the software GL renderer (mesa) because it was not initiliased. So Xephyr crashes.

A proper possible solution is to disable the GLX extension for now. Xephyr in master will provide an accelerated GL renderer.

So a I have pushed the fix 007e2239cf65535c4df3486e7b2cc42a4e86eb56 to fix the crach.


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.