Bug 509 - Xorg and matchbox-window will SegFault when there are too many windows
Summary: Xorg and matchbox-window will SegFault when there are too many windows
Status: RESOLVED FIXED
Alias: None
Product: Meta-yocto
Classification: Build System, Metadata & Runtime
Component: meta-yocto (show other bugs)
Version: 1.0
Hardware: All Multiple
: Medium normal
Target Milestone: 1.0 M2
Assignee: Edwin Zhai
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2010-10-25 05:28 UTC by Dexuan Cui
Modified: 2016-01-07 16:29 UTC (History)
12 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: Regression (Found by QA test)
Verified: Program Management
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dexuan Cui 2010-10-25 05:28:21 UTC
Using sato image, after booting into X, 
1) click the Keyboard program for 3 times and we can see the whole screen is covered;
2) chick the Connetion Manager's  About menu, we can see Xorg crashes at once -- however, the network is still ok and we can still ssh into target and by "cat /var/log/Xorg.0.log", we see 

[3813746.641] (II) UnloadModule: "kbd"
[3813746.850] (II) Qemu Tablet: Close
[3813746.851] (II) UnloadModule: "evdev"
[3813746.865]
Backtrace:
[3813746.874] 0: /usr/bin/Xorg (xorg_backtrace+0x30) [0x80dbab0]
[3813746.878] Segmentation fault at address 0x19
[3813746.879]
Fatal server error:
[3813746.879] Caught signal 11 (Segmentation fault). Server aborting
[3813746.880]
[3813746.880]
Please consult the The X.Org Foundation support
         at http://wiki.x.org
 for help.

dmesg shows:
matchbox-window[1606]: segfault at 0 ip 49095af8 sp bf9dabc8 error 6 in libc-2.12.so[49024000+13d000]


BTW, the issue also happens to the emenlow image.
Comment 1 Dexuan Cui 2010-10-25 05:46:48 UTC
(In reply to comment #0)
> Using sato image, after booting into X, 
> 1) click the Keyboard program for 3 times and we can see the whole screen is
> covered;
> 2) chick the Connetion Manager's  About menu, we can see Xorg crashes at once
> -- however, the network is still ok and we can still ssh into target and by
> "cat /var/log/Xorg.0.log", we see 
> [3813746.641] (II) UnloadModule: "kbd"
> [3813746.850] (II) Qemu Tablet: Close
> [3813746.851] (II) UnloadModule: "evdev"
> [3813746.865]
> Backtrace:
> [3813746.874] 0: /usr/bin/Xorg (xorg_backtrace+0x30) [0x80dbab0]
> [3813746.878] Segmentation fault at address 0x19
> [3813746.879]
> Fatal server error:
> [3813746.879] Caught signal 11 (Segmentation fault). Server aborting
> [3813746.880]
> [3813746.880]
> Please consult the The X.Org Foundation support
>          at http://wiki.x.org
>  for help.
> dmesg shows:
> matchbox-window[1606]: segfault at 0 ip 49095af8 sp bf9dabc8 error 6 in
> libc-2.12.so[49024000+13d000]
> BTW, the issue also happens to the emenlow image.

BTW: after the bug happens, we have to reboot the qemu via ssh, and many icons will become red crosses.
Comment 2 Dexuan Cui 2010-12-16 18:18:52 UTC
From Edwin:
"root cause is  the wrong behavior of matchbox-keyboard, will fix it soon."
Comment 3 Edwin Zhai 2010-12-19 04:22:33 UTC
Matchbox-keyboard is an on screen 'virtual' or 'software' keyboard, so there should be one instance at one time. If starting multiple instances of matchbox-keyboard, they will occupy the whole screen and make X window unhappy.

To get the right behavior of matchbox-keyboard, there are 2 options:
1. Make matchbox-keyboard singleton, that is, only one instance can be running at one time. It requires changing source code and compete for some global "lock". I think dbus provides something like it. Unfortunately, matchbox-keyboard is low-level application that rely on only xlib and libfakekey, so depending on dbus is not a good idea.


2. REAME says "There is an applet and experiemental GTK-IM module included in the source for launching the keyboard. The IM module allows for the keyboard to automatically mapped / unmapped on 'demand'." So we can try this way to force end user to use it in specified way.
Comment 4 Edwin Zhai 2010-12-22 19:08:24 UTC
(In reply to comment #3)
> 2. REAME says "There is an applet and experiemental GTK-IM module included in
> the source for launching the keyboard. The IM module allows for the keyboard to
> automatically mapped / unmapped on 'demand'." So we can try this way to force
> end user to use it in specified way.

Further investigation showed SCIM is required for this, and even worse, only gtk based application can use it. So I switch to "singleton" inside matchbox-desktop, who support only one instance of an application and refuse to start another if it claim so.

Patch has already been out.
Comment 5 Edwin Zhai 2010-12-26 21:24:46 UTC
Got fixed in poky/master @ 4efbda84392e00829b9619ba4d8c49bdc5128606
Comment 6 Dexuan Cui 2010-12-29 18:01:48 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > 2. REAME says "There is an applet and experiemental GTK-IM module included in
> > the source for launching the keyboard. The IM module allows for the keyboard to
> > automatically mapped / unmapped on 'demand'." So we can try this way to force
> > end user to use it in specified way.
> Further investigation showed SCIM is required for this, and even worse, only
> gtk based application can use it. So I switch to "singleton" inside
> matchbox-desktop, who support only one instance of an application and refuse to
> start another if it claim so.
> Patch has already been out.

(In reply to comment #5)
> Got fixed in poky/master @ 4efbda84392e00829b9619ba4d8c49bdc5128606

Now I can only run 1 Keyboard program, so the bug doesn't exist now. Let me VERIFY the bug.
Comment 7 Maxin B. John 2016-01-07 11:09:50 UTC
[YOCTO #3093]

"
Bogdan Alexandru Voiculescu 2016-01-07 09:36:54 UTC

Created attachment 2921 [details]
keyboard screenshot

Actually it seems you can open any number of keyboards.
I have not found any way of closing them.
"

https://bugzilla.yoctoproject.org/attachment.cgi?id=2921
Comment 8 Ross Burton 2016-01-07 16:29:47 UTC
Pretty sure this was reopened by accident, closing.