From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 14 15:28:40 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28F0D106566B for ; Tue, 14 Apr 2009 15:28:40 +0000 (UTC) (envelope-from tijl@ulyssis.org) Received: from mailrelay012.isp.belgacom.be (mailrelay012.isp.belgacom.be [195.238.6.179]) by mx1.freebsd.org (Postfix) with ESMTP id B6A778FC08 for ; Tue, 14 Apr 2009 15:28:39 +0000 (UTC) (envelope-from tijl@ulyssis.org) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvIEALtG5ElR9Sl+/2dsb2JhbACBUs8gg3wG Received: from 126.41-245-81.adsl-dyn.isp.belgacom.be (HELO kalimero.kotnet.org) ([81.245.41.126]) by relay.skynet.be with ESMTP; 14 Apr 2009 17:28:37 +0200 Received: from kalimero.kotnet.org (kalimero.kotnet.org [127.0.0.1]) by kalimero.kotnet.org (8.14.3/8.14.3) with ESMTP id n3EFSaDK004304; Tue, 14 Apr 2009 17:28:36 +0200 (CEST) (envelope-from tijl@ulyssis.org) From: Tijl Coosemans To: freebsd-hackers@freebsd.org, Robert Noland Date: Tue, 14 Apr 2009 17:28:34 +0200 User-Agent: KMail/1.9.10 References: <20090410132354.GA20721@logik.internal.network> <20090410175922.GA50520@logik.internal.network> <1239388293.1922.80.camel@balrog.2hip.net> In-Reply-To: <1239388293.1922.80.camel@balrog.2hip.net> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_kuK5JYWDptkZsu3" Message-Id: <200904141728.36178.tijl@ulyssis.org> Cc: xorquewasp@googlemail.com Subject: Re: diagnosing freezes (DRI?) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Apr 2009 15:28:40 -0000 --Boundary-00=_kuK5JYWDptkZsu3 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline On Friday 10 April 2009 20:31:33 Robert Noland wrote: > On Fri, 2009-04-10 at 18:59 +0100, xorquewasp@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. --Boundary-00=_kuK5JYWDptkZsu3 Content-Type: text/plain; charset="iso-8859-15"; name="patch-drm" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="patch-drm" --- 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; --Boundary-00=_kuK5JYWDptkZsu3--