Re: [wmii] wmii-3.1 bug (fix): libixp overload

From: Suraj N. Kurapati <skurapat_AT_ucsc.edu>
Date: Wed, 20 Sep 2006 02:24:53 -0700

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Suraj N. Kurapati wrote:
> In wmii-3.1, it is possible to overload libixp with lots of 9P
> traffic, maintained _continuously_ for about a minute, such that it
> freezes.

Okay, I've finally managed to figure it out. :-)

There is one major difference between how wmii-3.1 and wmii-4 handle
a read of /event:

wmii-4 simply returns the next event and closes the read request.

wmii-3.1 returns the next event, closes the read request, and
continues to send new events as they occur (even though the request
was already closed).

Now, because wmii-4 does not continually stream events to you (even
after the read request was finished), there is a possibility that
you may miss out on events. That is, when you (1) read an event, (2)
process it, and (3) read another event, you may have missed new
events that occurred while you were processing the old one.

But maybe that isn't such a big deal (humans cannot generate
key-presses fast enough to cause events to be missed).

So, please see the attached patch, which simply emulates wmii-4's
behavior of providing only _one_ event per read request. I tested
this, for 45 minutes, with the procedure outlined in the bug report
and wmii had not frozen! :-)

Cheers.

P.S. Ruby-IXP 1.0.3 has special code to handle wmii-3.1's odd
behavior of sending responses (for a read of /event) even after the
initial request had been completed. This will be removed in the
subsequent release (simplifies the code too :-).
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFFEQjlmV9O7RYnKMcRAi5SAJ9tmRGTTl4uYJSyTgeWUUM9PpHWgQCferIf
LCGja+FwdFLyS15Waj0q9+c=
=cK+j
-----END PGP SIGNATURE-----

Received on Wed Sep 20 2006 - 11:24:55 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 16:14:13 UTC