direct rendering freeze

garrone pgarrone at optusnet.com.au
Fri Dec 12 00:47:39 PST 2008


On Thu, Dec 11, 2008 at 08:13:12PM +1000, Dave Airlie wrote:
> On Thu, Dec 11, 2008 at 4:56 PM, garrone <pgarrone at optusnet.com.au> wrote:
> >
> > Hi,
> >  I am getting freezes in direct rendering. Sometimes glxgears works,
> > but eventually the freeze occurs at program exit, or upon xrandr operation.
> >
> > The freeze occurs
> > because the kernel function drm_lock continually returns -EINTR
> > because the hardware lock variable master->lock.hw_lock is NULL,
> > and the function drmIoctl (in user space drm) continually invokes the ioctl
> > while it returns -EINTR.
> 
> I need to look at this some more, but I can't figure out how the shm
> can find a matching map
> if there was a map created already, it should have gotten a lock
> allocated in it.
> 
> I'll try and take a look asap.
> 
> Dave.
>
Hi. The problem, on my system anyway, appears to be that the
"dev->maplist" map is not cleared upon file close. These map containers
accumulate, and when a new "master" is created from the same dynamic
memory as a previously freed element, then a prior unused container is
found because the master's inadvertently coincide.

The function "drm_rmmap" I imagine is supposed to delete these maps, but
it is never invoked. There is an ioctl which could be invoked from user
space, but it isn't, and these elements shouldnt hang around when their
id element has been freed.

The accumulation of these elements which are never freed represents a memory leak.

Peter



More information about the xorg mailing list