http://bugs.freedesktop.org/show_bug.cgi?id=21509

           Summary: libdrm's drmOpenOnce() fd cache stale on X server
                    restart
           Product: DRI
           Version: unspecified
          Platform: x86 (IA32)
        OS/Version: Linux (All)
            Status: NEW
          Severity: normal
          Priority: low
         Component: libdrm
        AssignedTo: dri-devel@lists.sourceforge.net
        ReportedBy: camaro...@gmail.com


Created an attachment (id=25341)
 --> (http://bugs.freedesktop.org/attachment.cgi?id=25341)
patch to xf86drm.c for drmOpenOnce()

Xorg version - custom compiled Xorg 7.4
libdrm version - 2.4.5 (although the problem looks like it's in 2.4.9)

The company I work for runs Xorg in a rather non-standard fashion in that we
don't run a window manager.  Recently I was testing a version of Xorg 7.4 that
I have compiled.  I was noticing that I could run fgl_glxgears just fine with
one invocation.  But every subsequent invocation failed with the X server
printing out:
(EE) AIGLX error: drmGetMagic failed
(EE) AIGLX: reverting to software rendering

fgl_glxgears was the only process that I was running under the X server.

After strace-ing the X server, I found that the drmGetMagic ioctl was
complaining abut an invalid file descriptor.

Looking deeper I found that the drmOpenOnce function was "re-cycling" file
descriptors from the previous server initialization.  After applying the
attached patch, things work much better.

I'm not convinced this patch is a good solution.  It would probably be better
to have some sort of callback to libdrm for when the server is about to
re-load.  When the server does reload it can then purge libdrm's fd cache.  How
one would do that I'm not sure.  :)

It is completely possible that since I'm using the ATI provided libraries that
they're really the problem here, and they should be cleaning up their used file
descriptors on server exit.  My setup would be difficult to convert back to the
mesa provided libraries, I can't test that theory.  I'm using the ATI 9.3
driver and libs(can't use 9.4, they deprecated X600 support!).

If anyone needs more information on this report I'm happy to provide it.  I'm
not a subscriber to the dri-devel list, so please email me directly - camaronut
at gmail.

Thanks!
Chris Fester


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to