Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Apr 2009 15:37:21 -0500
From:      Robert Noland <rnoland@FreeBSD.org>
To:        Artem Kim <artem_kim@inbox.ru>
Cc:        freebsd-x11@freebsd.org, freebsd-stable@freebsd.org
Subject:   Re: 7.2-PRERELEASE X-server hang in "drmwtq"
Message-ID:  <1240691841.1946.37.camel@balrog.2hip.net>
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>

next in thread | previous in thread | raw e-mail | index | archive | help

--=-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 <rnoland@FreeBSD.org>
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--




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1240691841.1946.37.camel>