Bug 356843 - Plasmashell segfault after use Alt+F2 and putting any letter in edit box
Summary: Plasmashell segfault after use Alt+F2 and putting any letter in edit box
Status: RESOLVED NOT A BUG
Alias: None
Product: plasmashell
Classification: Plasma
Component: general (show other bugs)
Version: 5.5.1
Platform: Mageia RPMs Linux
: NOR normal
Target Milestone: 1.0
Assignee: David Edmundson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-17 16:59 UTC by Piotr Mierzwinski
Modified: 2015-12-19 22:25 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Xorg log (22.19 KB, text/x-log)
2015-12-17 17:00 UTC, Piotr Mierzwinski
Details
glxinfo output (24.08 KB, text/plain)
2015-12-17 17:01 UTC, Piotr Mierzwinski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Mierzwinski 2015-12-17 16:59:30 UTC
Windows compositor is turned on. I change wallpaper to different than default. I press Alt+F2 and put any letter in edit box, for example "k" and I can see like desktop is sliding left and I get again default wallpaper. This is not happen when Windows compositor is turned off.
Additionally it makes that plasmoids/widgets newly added to the desktop (here: cpu stat and network stat) are disappearing.


Reproducible: Always

Steps to Reproduce:
1. turn on compositor (with setting like described in Additional Information)
2. change wallpaper
3. use Alt+F2 and put any letter in edit box

Actual Results:  
Newly chose wallpaper is replaced with default one.
Additionally it makes that plasmoids/widgets (cpu stat and network stat) added to the desktop disappearing.

Expected Results:  
Newly selected wallpaper should not be replaced.
Plasmoids/Widgets should not be disappear.

Compositor settings:
- Scale method: Accurate
- Rendering backend: OpenGL 2.0
- OpenGL interface: GLX
- Tearing prevention: Automatic
- Keep windows thumbnails: Only for shown windows
unchecked: Suspend compositor for full screen windows
unchecked: Enable color correction

My hardware platform is following Intel Core i7 Skylake. I'm using only integrated HD 530 graphics.
Output from lspci:
00:02.0 VGA compatible controller: Intel Corporation Sky Lake Integrated Graphics (rev 06) (prog-if 00 [VGA controller])
        DeviceName:  Onboard IGD
        Subsystem: ASUSTeK Computer Inc. Device 8694
        Flags: bus master, fast devsel, latency 0, IRQ 122
        Memory at de000000 (64-bit, non-prefetchable) [size=16M]
        Memory at c0000000 (64-bit, prefetchable) [size=256M]
        I/O ports at f000 [size=64]
        Expansion ROM at <unassigned> [disabled]
        Capabilities: [40] Vendor Specific Information: Len=0c <?>
        Capabilities: [70] Express Root Complex Integrated Endpoint, MSI 00
        Capabilities: [ac] MSI: Enable+ Count=1/1 Maskable- 64bit-
        Capabilities: [d0] Power Management version 2
        Capabilities: [100] #1b
        Capabilities: [200] Address Translation Service (ATS)
        Capabilities: [300] #13
        Kernel driver in use: i915
        Kernel modules: i915

lshw output:
        *-display
             description: VGA compatible controller
             product: Sky Lake Integrated Graphics
             vendor: Intel Corporation
             physical id: 2
             bus info: pci@0000:00:02.0
             version: 06
             width: 64 bits
             clock: 33MHz
             capabilities: pciexpress msi pm vga_controller bus_master cap_list rom
             configuration: driver=i915 latency=0
             resources: irq:122 memory:de000000-deffffff memory:c0000000-cfffffff ioport:f000(size=64)

lsmod output:
# lsmod | grep i9
i915                 1122304  18
video                  36864  2 i915,asus_wmi
button                 16384  1 i915
i2c_algo_bit           16384  1 i915
drm_kms_helper        126976  1 i915
drm                   352256  12 i915,drm_kms_helper

Parameters set for i915
Module: i915
Parameter: disable_display --> N
Parameter: disable_power_well --> 1
Parameter: disable_vtd_wa --> N
Parameter: edp_vswing --> 0
Parameter: enable_cmd_parser --> 1
Parameter: enable_execlists --> 1
Parameter: enable_fbc --> -1
Parameter: enable_guc_submission --> N
Parameter: enable_hangcheck --> Y
Parameter: enable_ips --> 1
Parameter: enable_ppgtt --> 2
Parameter: enable_psr --> 0
Parameter: enable_rc6 --> 1
Parameter: fastboot --> N
Parameter: guc_log_level --> -1
Parameter: invert_brightness --> 0
Parameter: load_detect_test --> N
Parameter: lvds_channel_mode --> 0
Parameter: lvds_use_ssc --> -1
Parameter: mmio_debug --> 0
Parameter: modeset --> -1
Parameter: panel_ignore_lid --> 1
Parameter: prefault_disable --> N
Parameter: preliminary_hw_support --> 0
Parameter: reset --> Y
Parameter: semaphores --> -1
Parameter: use_mmio_flip --> 0
Parameter: vbt_sdvo_panel_type --> -1
Parameter: verbose_state_checks --> Y

dmesg output:
# dmesg | grep i9
[    1.562538] [drm] Initialized i915 1.6.0 20150731 for 0000:00:02.0 on minor 0
[    1.641839] i915 0000:00:02.0: fb0: inteldrmfb frame buffer device
[    4.019392] snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])

Xorg version is 1.18 (x11-server-xorg-1.18.0-10.mga6). Attached Xorg log.

Kernel version is 4.3.2 (kernel-desktop-4.3.2-2.mga6-1-1.mga6). Including the latest firmware (kernel-firmware-nonfree-20151120-1.mga6.nonfree).
I also installed additional firmware provided by Intel. I mean: skl_dmc_ver1_23.bin and skl_guc_ver4_3.bin
# uname -a
Linux SkyLake-i7 4.3.2-desktop-2.mga6 #1 SMP Sat Dec 12 22:47:32 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Installed mesa library:
lib64mesaglesv2_2-11.1.0-1.mga6
mesa-11.1.0-1.mga6
lib64mesaglu1-devel-9.0.0-5.mga5
lib64mesagl1-devel-11.1.0-1.mga6
lib64mesaegl1-11.1.0-1.mga6
lib64mesaglu1-9.0.0-5.mga5
lib64mesagl1-11.1.0-1.mga6
lib64mesaegl1-devel-11.1.0-1.mga6

glxinfo output attached.

Plasma 5.5.1. KFrameworks 5.17.0. Qt-5.5.1
All packages are coming from Mageia 6 Cauldron.
kwin_x11 is running.
Searching on desktop is turning on ("Enable File Search" option is checked).
Comment 1 Piotr Mierzwinski 2015-12-17 17:00:50 UTC
Created attachment 96145 [details]
Xorg log
Comment 2 Piotr Mierzwinski 2015-12-17 17:01:21 UTC
Created attachment 96146 [details]
glxinfo output
Comment 3 Thomas Lübking 2015-12-17 17:05:17 UTC
does maybe the "plasmashell" process crash/restart?
what happens if you suspend the compositor after such incident? old wp remains or new (and plasmoids) back?
Comment 4 Piotr Mierzwinski 2015-12-17 17:31:53 UTC
Maybe "plasmashell" process crash/restart but I can't see any window message only desktop is sliding 
When I have turned off compositor and I change wallpaper then it remains. The same with plasmoids. When I again turn on compositor (Alt+Shift+F12) then all is fine - nothing like described above is not happens.
I had checked ("Enable compositor on starup") and then it happened when I changed wallpaper and added plasmoids.
I try to log off and log in again with working (on startup) compositor.
Comment 5 Piotr Mierzwinski 2015-12-17 17:43:22 UTC
After relogin. Again I get default wallpaper and plasmoids disappeared. And when I invoked Alt+F2 and put k letter desktop again was slidding in the left side, but already has default wallpaper so it not changed :/.
And one more curiosity. When I invoked "Plasma Widget Explorer" and found previously added plasmoids then I saw them with status "added". I mean I saw number 1 which was displayed in left top corner.
Please note I have write permission for configuration directories (~/.config and ~/.local).
Are you able to reproduce it?
Comment 6 Thomas Lübking 2015-12-17 18:25:01 UTC
> When I have turned off compositor and I change wallpaper then it remains. 

What I wanted you to check is to
- enable the compositor
- change wallpaper
- show krunner
- make the desktop slide/old wallpaper appears/yaddayaddayadda happen
- suspend the compositor (SHIFT+Alt+F12)
-> what do you see now?

I want to know whether this is something that happens only visually in the compositor or actually some odd behavior in the desktop process and no - I can obviously not reproduce whatever you see there. Otherwise i'd not ask but fix it.
Comment 7 Piotr Mierzwinski 2015-12-18 01:24:20 UTC
Replying to your question. There is no change. I can see on desktop only default empty wallpaper.

I checked the list of processes after that - using Ctrl+Esc looking for plasmashell.
After desktop was sliding to the right side (and as I got default wallpaper) I noticed that in the list of process I have two plasmashell processes. First one, looking on top (primary I guess), takes ~120MB (in other simplest test had 105MB) and in "Window Title" "Plazma" value. Second one (slipping I guess) has state "stopped" in "CPU" column and empty value in "Window Title". I think the numbers here not matter only saying that primary process takes more memory and is working.

After that I was looking for the simplest test to reproduce this issue and I found one :).
1. Compositor must be on (I have it "on" from default, so I don't need to change nothing in configuration). Here I have default configuration (you can find in top post). Therefore my test I started from the second point.
2. Being on login screen switch to any text terminal and...
    Remove or rename cache and configuration directories
    rm .cashe .kde .kde4
    mv .config .config.bak
    mv .local .local.bak
3. Log in to Plasma and set two virtual desktops
4. Change wallpaper (no matter which one, might be even first one)
    Note. Wallpaper window has default settings as following: Desktop, Picture, Scaled 
    (sorry if the names doesn't match accurately I translate them from my local language)
    I have also installed couple additional wallpapers, but I'm not sure is it important here.
5. Invoke Alt+F2, and put "k" letter in edit box

Result:
wallpaper sliding including plasmoids if any there are placed on the desktop
Using in this moment SHIFT+Alt+F12 nothing change. Even second "stopped" plasmashell process still exists on the processes list. Ah. OK. Only (bottom) panel a bit changes (there is no artefacts only it changes a bit its look).
Comment 8 Piotr Mierzwinski 2015-12-18 01:41:40 UTC
And one more thing. When I killed both plasmashell procesess (first one was "stopped" one and after that nothing happened) and started again plasmashell (from konsole) then I got my changed desktop including wallpaper and plasmoids.
Comment 9 Piotr Mierzwinski 2015-12-18 01:46:03 UTC
Minor fix to my instruction. Of course should be:
rm -rf .cache .kde .kde4
Comment 10 Thomas Lübking 2015-12-18 09:28:02 UTC
That means plasmashell crashes.
It will be necessary to obtain a backtrace on the stopped plasmashell process

echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
gdb --pid <pid of stopped plasmashell here> 2>&1 | tee plasmashell.gdb

in gdb enter
thread apply all bt

and hit enter until you reach the end of the output. Paste the contents of plasmashell.gdb into the bug.
Comment 11 Piotr Mierzwinski 2015-12-19 03:34:47 UTC
OK. Today I installed couple of debuginfo packages referring to plasma5 and tried to catch stopped plasmshell process, but when desktop was sliding (after doing test case described above) in the list of processes I wasn't able to find "stopped" plasmashell. There was only primary process :-(. Even when I removed debuginfo packages I wasn't able get "stopped" plasmashell process. Strangely.

I don't know how much imported is ptrace_scope, but I'm not able to execute following command:
echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
Probably because kernel what I use (4.3.2) has not set parameter: CONFIG_SECURITY_YAMA. I suppose like that because I get error "no such file" when I try to check this file.
Comment 12 Piotr Mierzwinski 2015-12-19 03:49:15 UTC
[UPDATE to test case] Two virtual desktops are not required to reproduce this bug.
Comment 13 Thomas Lübking 2015-12-19 09:12:37 UTC
(In reply to Piotr Mierzwinski from comment #11)
> Probably because kernel what I use (4.3.2) has not set parameter:
> CONFIG_SECURITY_YAMA. I suppose like that because I get error "no such file"
> when I try to check this file.

Yes, it's just meanwhile usually enabled and you cannot attach to random process when it's set.

Just attach to the running process:
    gdb --pid 123456 2>&1 | tee plasmashell.gdb # proper pid please ;-)
then
    continue

then cause the crash, gdb should not the segfault, then finally run (in gdb)
   thread apply all bt
Comment 14 Piotr Mierzwinski 2015-12-19 22:25:42 UTC
I did some investigate to find out what is the problem. And I found some errors in plasmashell logs (I restarted it being logged in plasma). First one referred to missing sqlite driver and second one referred to "activity manager daemon". I checked installed packages and turned out that they are missing :(. So partially this is fault of developers preparing packages for my distribution :/. And more precisely missing dependencies in plasma package. Anyway I installed missing packages and I'm not able reproduce above problem. I installed additionally qt-5.6.0-beta1, but I suppose that missing packages caused this issue with sliding desktop. My fault was that I didn't checked logs on begin. Therefore I'm sorry I took your time :/.

Anyway I have installed a couple of debuginfo packages so I will able to send detailed bug report in the future, if I will meet some crash.