Re: NEWS on 1.6.0, crash fix... semi-fix (if you create and quickly delete a window sawfish will segfault)



Teika Kazura said:     (by the date of Sat, 03 Oct 2009 15:12:15 +0900 (JST))

> > Maybe (just maybe..) I will sit down this sunday to fix that 
> > 
> >   http://sawfish.wikia.com/wiki/Proposed_Goals#Crash_fix
> Hmm, I'm not C / C++ guy. And I may be asleep already. Japan is +0900

I have found the bug. Exact place.

Problem is that in a very short piece of code sawfish does not expect
a newly created window to disappear. If it does - then sawfish will
crash.

The segfaults were usually more frequent under high system load,
because sawfish was running slower and the critical section took
longer time to execute.

But it is in fact a race condition. I don't see a _perfect_ way to
fix this. Unless we employ some serious multithreaded locks to talk
between X and wm. Or find a way to lock X for a very short period of
time. Maybe there is a way to do that, which I'm unaware of.

So I have created a patch which is not perfect. But works most of the
time. I didn't manage to crash sawfish any more when using it, but in
theory it is still possible. We are left with hope that more frequent
checks if a window was deleted will result in less frequent sawfish
crashes. Please review the patch here:

  http://sawfish.wikia.com/wiki/Create_and_quickly_destroy_a_window_-_a_patch_to_almost_fix_the_sawfish_segfault

Sorry for the long patch name. I felt that it is necessary to name it
in such a descriptive way...

-- 
Janek Kozicki                                                         |


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]