[compiz] compiz segmentation fault and synchronization
Danny Baumann
dannybaumann at web.de
Sat Dec 27 01:41:14 PST 2008
Hi,
> I got a segmentation fault in compiz and after some analysis have a
> question about synchronization in core compiz functions.
>
> From time to time when I switch my laptop between users I see
> corrupted picture on the display. Also I see the following lines in
> logs:
>
> Dec 22 22:05:34 note kernel: [44316.540242] compiz.real[6401]:
> segfault at 48 ip 08055c8c sp bfd492b0 error 4 in
> compiz.real[8048000+34000]
> Dec 22 22:05:53 note kernel: [44332.984062] metacity[6340]: segfault
> at 0 ip 080abab3 sp bfdeb8b0 error 4 in metacity[8048000+7a000]
>
> I looked into compiz code and found that segmentation fault happens in
> src/display.c in the doPoll() function. Strict place is when w =
> w->next is executed in the cycle. Also I found that WatchFds used in
> doPoll() can be added and removed through compAddWatchFd() and
> compRemoveWatchFd() calls. Last functions are called from different
> plugins. I suppose that possible issue cause is lack of
> synchronization between threads that use these functions.
>
> Should the WatchFd usages be synchronized?
No, they don't need to be - compiz is a single threaded application.
> I use Ubuntu 8.10 and compiz 0.7.8 from Ubuntu repository.
All backtraces that end up in doPoll() I've seen so far are from Ubuntu
users. I strongly suspect that one of the patches in the Ubuntu packages
is fishy - although I don't know which one.
The only explanation I have for those backtraces (with a watchFd being
0x1) is stack corruption.
Regards,
Danny
More information about the compiz
mailing list