From owner-freebsd-x11@FreeBSD.ORG Sat Apr 25 20:37:42 2009 Return-Path: Delivered-To: freebsd-x11@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D08851065677; Sat, 25 Apr 2009 20:37:42 +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 93A358FC1B; Sat, 25 Apr 2009 20:37:42 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from [192.168.1.156] (adsl-156-31-216.bna.bellsouth.net [70.156.31.216]) (authenticated bits=0) by gizmo.2hip.net (8.14.3/8.14.3) with ESMTP id n3PKbadE097057 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 25 Apr 2009 16:37:36 -0400 (EDT) (envelope-from rnoland@FreeBSD.org) From: Robert Noland To: Artem Kim In-Reply-To: <200904260018.36884.artem_kim@inbox.ru> References: <200904030223.27059.artem_kim@inbox.ru> <200904252037.13795.artem_kim@inbox.ru> <1240679716.1946.26.camel@balrog.2hip.net> <200904260018.36884.artem_kim@inbox.ru> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-vaoOQBetxcdGl63g70oD" Organization: FreeBSD Date: Sat, 25 Apr 2009 15:37:21 -0500 Message-Id: <1240691841.1946.37.camel@balrog.2hip.net> Mime-Version: 1.0 X-Mailer: Evolution 2.26.0 FreeBSD GNOME Team Port X-Spam-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,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-x11@freebsd.org, freebsd-stable@freebsd.org Subject: Re: 7.2-PRERELEASE X-server hang in "drmwtq" X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2009 20:37:43 -0000 --=-vaoOQBetxcdGl63g70oD Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Sun, 2009-04-26 at 00:18 +0400, Artem Kim wrote: > On Saturday 25 April 2009 21:15:16 you wrote: > > Ok, so my test is under gnome with metacity in composite mode. Using > > zsh (I think bash can do this also) > > > > balrog% for ((i=3D0 ; i < 5 ; i++ )) do firefox &;done > > > > So, I've launched 5 firefox and 10 xterms... Neither produce the hang. > > Sitting in drmwtq means that you are waiting on the rendering engine to > > catch up and send you an interrupt. Probably the best debugging that w= e > > are going to get is by: > > > > booting the system without starting X, kldload radeon and then set > > sysctl hw.dri.0.debug=3D1 and start X/KDE... trigger the lockup and sen= d > > me the output of the debugging from /var/log/messages. > > > > robert. >=20 > I used the following script: >=20 > #!/bin/sh >=20 > TRY =3D 5 >=20 > while [$ (TRY)-gt 0]; do >=20 > # Konqueror & > okteta & > kcalc & > kwrite & >=20 > TRY =3D `expr $ (TRY) - 1` >=20 > done >=20 > sleep 30 > killall konqueror > killall okteta > killall kcalc > killall kwrite >=20 >=20 > If I set "hw.dri.0.debug =3D 1" the problem is not reproducing, even at v= ery big=20 > values of ${TRY}. > However if hw.dri.0.debug =3D 0 one pass reproduces the problem. >=20 >=20 > If I set "hw.dri.0.debug=3D1" _after_ the server hang, I see the message: >=20 > Apr 25 23:44:04 test kernel: [drm: pid782: drm_ioctl] pid =3D 782, cmd = =3D=20 > 0x80046457, nr =3D 0x57, dev 0xffffff0001556d00, auth =3D 1 > Apr 25 23:44:04 test kernel: [drm: pid782: drm_ioctl] returning 4 Ok, so what this is saying is that pid 782 is waiting on the rendering engine to catch up. The "returning 4" part says that we were interrupted while we were waiting. libdrm retries the wait, which should return immediately if the engine has caught up now. It never appears to catch up, so either the counter is getting corrupted or we failed to get the commands submitted to the card like we thought, or we have locked up the GPU. What does it take to recover from this? Do you have to reboot, or is killing the process that initiated the wait sufficient? robert. > Apr 25 23:44:04 test kernel: [drm: pid782: drm_ioctl] pid =3D 782, cmd = =3D=20 > 0x80046457, nr =3D 0x57, dev 0xffffff0001556d00, auth =3D 1 > Apr 25 23:44:04 test kernel: [drm: pid782: drm_ioctl] returning 4 > Apr 25 23:44:04 test kernel: [drm: pid782: drm_ioctl] pid =3D 782, cmd = =3D=20 > 0x80046457, nr =3D 0x57, dev 0xffffff0001556d00, auth =3D 1 > Apr 25 23:44:04 test kernel: [drm: pid782: drm_ioctl] returning 4 > Apr 25 23:44:04 test kernel: [drm: pid782: drm_ioctl] pid =3D 782, cmd = =3D=20 > 0x80046457, nr =3D 0x57, dev 0xffffff0001556d00, auth =3D 1 > Apr 25 23:44:04 test kernel: [drm: pid782: drm_ioctl] returning 4 > Apr 25 23:44:04 test kernel: [drm: pid782: drm_ioctl] pid =3D 782, cmd = =3D=20 > 0x80046457, nr =3D 0x57, dev 0xffffff0001556d00, auth =3D 1 > Apr 25 23:44:04 test kernel: [drm: pid782: drm_ioctl] returning 4 >=20 > I try to apply this patch: > http://people.freebsd.org/ ~ rnoland/drm_radeon-copyin-fix-try2.patch >=20 > In my case the problem remains. >=20 --=20 Robert Noland FreeBSD --=-vaoOQBetxcdGl63g70oD 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) iEYEABECAAYFAknzdIEACgkQM4TrQ4qfROMJQQCfaRt6NtjYhyJMekVZMj4d2NBx amEAnAg5JMmeDmFkQ0Yv5j0sWwC6ZOQz =TYki -----END PGP SIGNATURE----- --=-vaoOQBetxcdGl63g70oD--