Bug 56543 - [bug] segfault in wayland using virtual keyboard in EFL
Summary: [bug] segfault in wayland using virtual keyboard in EFL
Status: VERIFIED FIXED
Alias: None
Product: Wayland
Classification: Unclassified
Component: wayland (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Jan Arne Petersen
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-29 20:37 UTC by Brian Lovin
Modified: 2013-07-31 17:48 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
GDB backtrace (9.46 KB, text/plain)
2012-10-29 20:37 UTC, Brian Lovin
Details
Valgrind log during reproduction (7.11 KB, text/plain)
2012-10-29 20:38 UTC, Brian Lovin
Details
GDB Backtrace New (11.64 KB, text/plain)
2012-11-29 20:23 UTC, Brian Lovin
Details

Description Brian Lovin 2012-10-29 20:37:59 UTC
Created attachment 69254 [details]
GDB backtrace

System Environment:
--------------------------
Distro: Ubuntu 12.04
Arch: x86_64
cairo master e43f53bf7f3d371116f31f22ab9754b08b5abe7f
dri2proto master 4eeacce4c4a300b938b7e3fb78a8e443c491780b
drm master bc494b310d76f701798aee0f2b0b472d608cbfaf
glproto master ec1eec4355ee4a6c5134f2178192f10b6d28a87a
kbproto master 391a1f6de6315fc0196d407d800597488315cccb
libX11 master f2a8def423a46d52e834cf7ea49fa0079427663a
libxkbcommon master a35d3223224fe6a24df0a16d599761aea70ac2dc
macros master 0890e4003aacfa7113ab3f4e3ad7c5636f8e922a
mesa master eee1ff423c6a0c9c776b4e76b79bb5ed5480d83c
pixman master 2e17b6dd4ee7c32684fb7ffc70d3ad3ebf7cb2ef
wayland master 1f521a4f7760df73e1d1d8a6791d1c7bf536584e
weston master 00fbbe6b6038553068cd9d903d96c7ba441a01c6

Detailed Description:
-----------------------------
I filed this as a wayland bug because the segfault happens in wayland-util.c (which is in the wayland git)

Special notes:
 * Run ALL the programs in "Steps to Reproduce"
 * This is only reproducible with Weston running under X
 * I can only reproduce this when an EFL program is running

Steps to Reproduce:
----------------------------
1. Download/Install Wayland, Weston, and EFL
2. Download/Install the VKB code from openismus (here: https://github.com/openismus/ecore-imf-wayland)
3. Execute the following:
 ---Terminal 1----
 $ ./weston
 ---Terminal 2----
 $ ./clients/keyboard &
 $ ELM_ENGINE=wayland_shm ECORE_IMF_MODULE=wayland ./bin/elementary_test
4. Click outside of the Weston window in X (say to your terminal) and allow Weston to go to sleep.
5. Click back inside the Weston window (avoiding the unlock button) and then click back outside to your terminal.
6. You should now see the segfault.

I have tried to reproduce this bug with just the keyboard (doesn't happen), just EFL (doesn't happen), and using they keyboard on the editor client (doesn't happen). I cannot reproduce this bug in DRM mode. It's caused by some strange interaction between all the components (EFL, virtual keyboard, and Wayland/Weston in X mode)

I asked around on #wayland and it was decided to bug this on fd.o.

I am going to attach a GDB backtrace and a valgrind log.

Good luck.
Comment 1 Brian Lovin 2012-10-29 20:38:46 UTC
Created attachment 69255 [details]
Valgrind log during reproduction
Comment 2 Jan Arne Petersen 2012-11-07 14:34:24 UTC
Patch can be found at:

http://lists.freedesktop.org/archives/wayland-devel/2012-November/006140.html
Comment 3 Kristian Høgsberg 2012-11-08 16:44:38 UTC
commit cf18a32a394344254315df98342049a6f228148b
Author: Jan Arne Petersen <jpetersen@openismus.com>
Date:   Wed Nov 7 15:32:54 2012 +0100

    shell: Do not insert input panel layer when locked
    
    Do not try to insert the input panel layer in the layer list when the
    shell is locked in show_input_panels(). The layer will already be
    insrted in resume_desktop() anyways.
    
    https://bugs.freedesktop.org/show_bug.cgi?id=56543
    
    Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
Comment 4 Brian Lovin 2012-11-29 20:22:24 UTC
I'm still seeing this segfault, even on commitid:
weston (master) 0ea7333392c3afdbcd8f9194d51cee1e3f55178c
wayland (master) 92ca1a0e800cf85e42699774b141ac5204d0f7c8

To reproduce use the same steps above. I will attach a new GDB BT but it says the same thing (wl_list_remove issue).
Comment 5 Brian Lovin 2012-11-29 20:23:03 UTC
Created attachment 70802 [details]
GDB Backtrace New
Comment 6 Kristian Høgsberg 2012-12-06 20:54:26 UTC
Pushed this to weston master:

commit 82ec909b07654d7d2f2f93e1f025dbbc4e4b7ac8
Author: Jan Arne Petersen <jpetersen@openismus.com>
Date:   Mon Dec 3 15:36:02 2012 +0100

    shell: Do not remove input panel layer when locked
    
    Do not remove the input panel layer from the layer list when the
    shell is locked in hide_input_panels().
    
    https://bugs.freedesktop.org/show_bug.cgi?id=56543
    
    Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
Comment 7 Brian Lovin 2013-01-24 17:45:24 UTC
I couldn't get the ecore-imf-wayland module to work again, I got it to compile and install but couldn't launch the elementary_test application using the module.

Sent a detailed e-mail to Michael and Jan at openismus to fix the issue, it's happened because there have been large changed to the EFL tree and the ecore-imf-wayland repository needs to be updated.
Comment 8 Kristian Høgsberg 2013-02-15 02:40:51 UTC
Committed this fix from Jan:

commit d1a5cd0088d4735f8633d021ac157a3c1d367321
Author: Jan Arne Petersen <jpetersen@openismus.com>
Date:   Mon Feb 11 15:10:11 2013 +0100

    shell: Fix bug when input panel is shown twice
    
    Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>

I haven't had time to try to reproduce this issue so I'm not sure if this fixes this bug.
Comment 9 Kristian Høgsberg 2013-02-16 00:48:39 UTC
I also now merged Jans remaining input method patches with a few more input-panel fixes.  I'll close this now as resolved, re-open if verification fails.
Comment 10 Brian Lovin 2013-07-31 17:48:28 UTC
Changing status to verified as fixed.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.