[pulseaudio-discuss] [PATCH] mainloop: Map POLLNVAL to PA_IO_EVENT_ERROR.
Tanu Kaskinen
tanuk at iki.fi
Sat Jan 21 10:07:24 PST 2012
On Wed, 2011-12-28 at 14:29 +0200, Tanu Kaskinen wrote:
> I don't see any reason why POLLNVAL should be ignored like
> it is now without this patch. PA_IO_EVENT_ERROR seems to be
> the best choice for reporting the IO event type, because
> POLLNVAL is an error condition and adding a new IO event
> type just for POLLNVAL probably wouldn't add any value.
>
> This patch seems to have made one hard to reproduce bug
> impossible to reproduce. The problem was that a certain
> client application (involving GStreamer) occasionally
> started to consume 100% of CPU. Based on some stack traces
> it was speculated that the threaded mainloop of libpulse
> was spinning on POLLNVAL, because some user of the mainloop
> (maybe GStreamer) kept the IO event active when the IO
> event was triggered with zero flags. But that's just
> speculation - there's no direct evidence of POLLNVAL being
> triggered at all, only that with this patch the application
> has been behaving nicely so far.
The bug mentioned above had nothing to do with POLLNVAL. I think it
still would make sense to report POLLNVAL, but this patch is inadequate
for that. I don't see myself writing a better patch in the near future,
so I've filed a bug: https://bugs.freedesktop.org/show_bug.cgi?id=45044
--
Tanu
More information about the pulseaudio-discuss
mailing list