diagnosing freezes (DRI?)

Tijl Coosemans tijl at ulyssis.org
Tue Apr 14 15:28:40 UTC 2009


On Friday 10 April 2009 20:31:33 Robert Noland wrote:
> On Fri, 2009-04-10 at 18:59 +0100, xorquewasp at googlemail.com wrote:
>> The system doesn't seem to have frozen since DRI/DRM was disabled.
>> 
>> I did have one crash/reboot whilst building a large number of
>> packages with tinderbox. I've currently got both tinderbox and a
>> make -j 16 buildworld going on a loop in the hope that I can trigger
>> it again.
>> 
>> Being the idiot I am, I had encrypted swap enabled and so savecore
>> didn't save anything. Won't make that mistake twice.
>> 
>> I'm currently using a world compiled WITH_DEBUG but is there
>> anything else I can do?
> 
> If it is locking the whole system, then a core is really our best
> shot. If you can extract anything useful from xorg.log or setting
> hw.dri.0.debug that also might be of use.
> 
> I'm running on 2 cores, but it is possible that some locking issue
> exists.  All of the driver specific ioctls are run under a lock
> though.

I have the same problem with a Radeon Mobility 9700 (r300) on 7-STABLE.
The entire system freezes, but it happens very rarely. I took a quick
look at the drm code for locking issues and found one thing that seems
suspicious. Patch attached. I'm not familiar with the code, so I don't
know if it's correct or even related this problem.
-------------- next part --------------
--- sys/dev/drm/drm_bufs.c.orig	2009-04-11 15:10:56.000000000 +0200
+++ sys/dev/drm/drm_bufs.c	2009-04-11 15:11:33.000000000 +0200
@@ -173,7 +173,6 @@
 			/* Prevent a 2nd X Server from creating a 2nd lock */
 			DRM_LOCK();
 			if (dev->lock.hw_lock != NULL) {
-				DRM_UNLOCK();
 				free(map->handle, DRM_MEM_MAPS);
 				free(map, DRM_MEM_MAPS);
 				return EBUSY;


More information about the freebsd-hackers mailing list