Re: [wmii] Ruby-IXP freezing with overload patch

From: Suraj N. Kurapati <>
Date: Wed, 27 Sep 2006 18:39:00 -0700

Hash: SHA1

Oliver Heins wrote:
> "Suraj N. Kurapati" <> writes:
>>> I'm sorry to say this, but wmiirc still freezes when I send a
>>> client to another view.
>> You're right. The changes I made did not solve the problem. I
>> thought about it some more and was able to narrow down the
>> problem even further.
>> The assignment of unique tags to requester threads was not
>> synchronized. Thus, more than one requester thread could be
>> assigned the same unique tag. And when the response arrived,
>> only one of the requester threads would be woken up.
>> I fixed this (hopefully! :-) in r69 from SVN; please try it and
>> report back.
> I'm sorry to say this again, but it doesn't.

Well, this was problem #1. There is another problem #2 that also
contributed to the freezing of wmiirc:

I was refactoring the problematic Ruby-IXP code this morning when a
really strange thing happened. Normally, here is how you communicate
with wmii's ixp server using Ruby-IXP:

1. you send the request to wmii

2. you go to sleep (ruby-ixp wakes you up when the response arrives)

3. you do stuff with the response

One time, ruby-ixp woke you up before you even went to sleep. You
just ignored that wake-up call, because you are already awake. Then
you proceeded to go to sleep. Thus, you would sleep forever, waiting
for a response which you had already gotten!

Both problems should now be fixed in r70. Please try that.

> Here's the log:
> I sorted the lines to easily figure out the differences and to
> see whether a key gets registered twice. Surprising for me is
> that the keys seem to get registered asynchronously. But perhaps
> that's due to threading.

Yeah, that is reasonable because it's all handled within ruby-wmii;
in the end, ruby-wmii collects all that registered info and passes
it onto wmii in one big operation (e.g. writing to /def/keys).

Thanks for bearing with me. :-)
Version: GnuPG v1.4.2.2 (GNU/Linux)

Received on Thu Sep 28 2006 - 03:38:31 UTC

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