From owner-freebsd-stable@FreeBSD.ORG Fri May 8 22:31:31 2009 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3721A106564A for ; Fri, 8 May 2009 22:31:31 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from gizmo.2hip.net (gizmo.2hip.net [64.74.207.195]) by mx1.freebsd.org (Postfix) with ESMTP id EB5C18FC1A for ; Fri, 8 May 2009 22:31:30 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from [192.168.1.4] (adsl-154-182-184.bna.bellsouth.net [68.154.182.184]) (authenticated bits=0) by gizmo.2hip.net (8.14.3/8.14.3) with ESMTP id n48MVPAa094625 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 8 May 2009 18:31:25 -0400 (EDT) (envelope-from rnoland@FreeBSD.org) From: Robert Noland To: David Johnson In-Reply-To: <200905081458.53651.david@usermode.org> References: <200905042015.29394.david@usermode.org> <200905072229.17798.david@usermode.org> <1241793345.1733.5.camel@balrog.2hip.net> <200905081458.53651.david@usermode.org> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-D0bQcSOzGXYMt3hJuZLW" Organization: FreeBSD Date: Fri, 08 May 2009 17:31:04 -0500 Message-Id: <1241821864.1733.51.camel@balrog.2hip.net> Mime-Version: 1.0 X-Mailer: Evolution 2.26.1.1 FreeBSD GNOME Team Port X-Spam-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_PBL, RCVD_IN_SORBS_DUL,RDNS_DYNAMIC autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on gizmo.2hip.net Cc: freebsd-stable@freebsd.org Subject: Re: Xorg hangs with drmwtq in 7.2-RELEASE X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 May 2009 22:31:31 -0000 --=-D0bQcSOzGXYMt3hJuZLW Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Fri, 2009-05-08 at 14:58 -0700, David Johnson wrote: > On Friday 08 May 2009 07:35:45 am Robert Noland wrote: > > I still can't reproduce this... I updated the Xserver, libGL and dri > > ports yesterday, all of which could be related to locking up the GPU an= d > > worth a shot. Failing that, I need you to enabled drm debugging. Start > > the system without X, kldload radeon.ko, set sysctl hw.dri.0.debug=3D1 > > then startx. >=20 > I've got all the updated ports as of last night, so that wasn't it. >=20 > I turned AIGLX back on, and it promptly locked up again. This time, howev= er, > the screen went black instead of freezing, but otherwise the same as alwa= ys. > I then turned on hw.dri.0.debug, and messages quickly filled up with the > following repeated message: >=20 > [drm:pid1195:drm_ioctl] returning 4 > [drm:pid1195:drm_ioctl] pid=3D1195, cmd=3D0x80046457, nr=3D0x57, dev 0xc6= 15fa00, auth=3D1 >=20 This is too late to really see anything... This still just suggests that the GPU is locked up. What is happening below is that we have emitted an "irq" to the card and we are waiting on it to parse that. The return value 4 is EINTR which says that we were interrupted while we were waiting. When we return EINTR, libdrm just performs the ioctl over again. We first read the register from the card to see if it has parsed at least up to what we are looking for, if so we just return success and don't sleep. If the register says that we haven't parsed the command, then we sleep for a max of 3 seconds waiting on the card to catch up. In your case, the card is never catching up, which suggests that the card is hung and not processing the command stream anymore.=20 static int radeon_wait_irq(struct drm_device * dev, int swi_nr) { drm_radeon_private_t *dev_priv =3D (drm_radeon_private_t *) dev->dev_private; int ret =3D 0; =20 if (RADEON_READ(RADEON_LAST_SWI_REG) >=3D swi_nr) return 0; dev_priv->stats.boxes |=3D RADEON_BOX_WAIT_IDLE; =20 DRM_WAIT_ON(ret, dev_priv->swi_queue, 3 * DRM_HZ, RADEON_READ(RADEON_LAST_SWI_REG) >=3D swi_nr); if (ret =3D=3D -ERESTART) DRM_DEBUG("restarting syscall"); return ret; } In order to guess what might be causing this, drm debugging needs to be enabled before the hang, so that we can hopefully figure out what leads up to the hung GPU. robert. --=20 Robert Noland FreeBSD --=-D0bQcSOzGXYMt3hJuZLW Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (FreeBSD) iEYEABECAAYFAkoEsqgACgkQM4TrQ4qfROOaRQCcCJnWOQUp5M/COKSDS0g4Th8j qjsAnRBC7vRUfaHLh8UqLNcoKxLBD4gI =NtzA -----END PGP SIGNATURE----- --=-D0bQcSOzGXYMt3hJuZLW--