[Intel-gfx] X hang with quirk VT switches
Takashi Iwai
tiwai at suse.de
Wed Dec 3 11:43:11 PST 2014
At Wed, 3 Dec 2014 18:31:45 +0000,
Chris Wilson wrote:
>
> On Wed, Dec 03, 2014 at 03:45:35PM +0100, Takashi Iwai wrote:
> > Hi,
> >
> > while checking the reported bug about VT switch hang on openSUSE 13.2,
> > I also could reproduce a similar issue as reported: namely, X hangs
> > when repeatedly switching VT quickly.
> >
> > For example, running the following on KDE results in the stall of X.
> >
> > % for i in $(seq 1 100); do chvt 1; chvt 7; done
> >
> > Looking at the sysrq-t output, it stalls at drm_read(). And after
> > putting some debug prints at event handling codes, it shows like:
> >
> > drm_queue_vblank_event event_space=4064
> > send_vblank_event event_space=4064
> > drm_poll ENTER event_space=4064
> > drm_poll mask=0x41 event_space=4064
> > drm_poll ENTER event_space=4064
> > drm_poll mask=0x41 event_space=4064
> > drm_read ENTER event_space=4064
> > drm_read total=32 event_space=4096
> > drm_poll ENTER event_space=4096
> > drm_poll mask=0x0 event_space=4096
> > drm_read ENTER event_space=4096
> > drm_read ENTER event_space=4096
> > drm_read ENTER event_space=4096
> >
> > So, after a vblank event, two poll calls succeeded, followed by one
> > drm_read(). After that, there were one poll call without event,
> > followed by three(!) drm_read() calls. The last three drm_read()
> > never exited, thus X stalled. So, this looks like a race or a
> > refcount issue somewhere.
>
> The key question is how did you get 3 calls to drm_read that each didn't
> return?
I asked this to myself, too...
> The only place where we call drm_read without first doing a poll
> is in the WakeupHandler with the drm fd flagged for reads. This is
> broken in ZaphodHeads as the drm fd is not O_NONBLOCK without
>
> commit bd008e5b2953186fc0c6633a885ade95e7043800
> Author: Chris Wilson <chris at chris-wilson.co.uk>
> Date: Tue Oct 7 14:13:51 2014 +0100
>
> drm: Implement O_NONBLOCK support on /dev/dri/cardN
>
> I assume that isn't the case as I expect you would have mentioned using
> ZaphodHeads.
Right, no extra option is used. And, eDP output only.
> Maarten found a very similar issue using radeon:
>
> https://bugs.freedesktop.org/show_bug.cgi?id=77885
>
> where the supposition was that the DRM_MASTER was not being
> relinquished.
Interesting. In the original bug report we've got, the symptom
happened at switching two X sessions, as the bfo entry above.
http://bugzilla.opensuse.org/show_bug.cgi?id=904097
The reporter mentioned there that his issue was fixed with 3.17.x
kernel, so it's likely a different problem from what I've seen.
The bug couldn't be reproduced on my machine, so I tried the simple VT
quick switches, then hits a new bug now.
In anyway, I'll poke a bit more deeply later (maybe on Friday).
But, before that, I'd like to ask: can anyone reproduce this problem
at all...?
thanks,
Takashi
More information about the Intel-gfx
mailing list