Application: kwin_x11 (5.14.1) Qt Version: 5.11.1 Frameworks Version: 5.51.0 Operating System: Linux 4.18.0-15.1-liquorix-amd64 x86_64 Distribution: Ubuntu 18.10 -- Information about the crash: - What I was doing when the application crashed: I was switching desktops with the Slide virtual desktop effect by pressing a global shortcut for Desktop 2. Before the Slide animation finished I pressed Alt+F2 to run a command. - Effect: KWin crashed and restarted. -- Backtrace: Application: KWin (kwin_x11), signal: Aborted Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [Current thread is 1 (Thread 0x7f3127d01840 (LWP 4285))] Thread 6 (Thread 0x7f311ffff700 (LWP 7264)): #0 0x00007f31322f37d6 in __GI_ppoll (fds=0x7f3114001138, nfds=1, timeout=<optimized out>, sigmask=0x0) at ../sysdeps/unix/sysv/linux/ppoll.c:39 #1 0x00007f3130eb7141 in qt_safe_poll(pollfd*, unsigned long, timespec const*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #2 0x00007f3130eb85b9 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #3 0x00007f3130e6816b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #4 0x00007f3130cb70b6 in QThread::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #5 0x00007f3130cc0c87 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #6 0x00007f312fac4164 in start_thread (arg=<optimized out>) at pthread_create.c:486 #7 0x00007f31322ffdef in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 Thread 5 (Thread 0x7f311ca39700 (LWP 4481)): #0 futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x7f31308a7fb8) at ../sysdeps/unix/sysv/linux/futex-internal.h:88 #1 __pthread_cond_wait_common (abstime=0x0, mutex=0x7f31308a7f68, cond=0x7f31308a7f90) at pthread_cond_wait.c:502 #2 __pthread_cond_wait (cond=0x7f31308a7f90, mutex=0x7f31308a7f68) at pthread_cond_wait.c:655 #3 0x00007f31307b0e2a in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Script.so.5 #4 0x00007f31307b0e49 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Script.so.5 #5 0x00007f312fac4164 in start_thread (arg=<optimized out>) at pthread_create.c:486 #6 0x00007f31322ffdef in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 Thread 4 (Thread 0x7f311f7fe700 (LWP 4453)): #0 0x00007f31322f37d6 in __GI_ppoll (fds=0x7f310c000d28, nfds=1, timeout=<optimized out>, sigmask=0x0) at ../sysdeps/unix/sysv/linux/ppoll.c:39 #1 0x00007f3130eb7141 in qt_safe_poll(pollfd*, unsigned long, timespec const*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #2 0x00007f3130eb85b9 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #3 0x00007f3130e6816b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #4 0x00007f3130cb70b6 in QThread::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #5 0x00007f312f2f41f5 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5 #6 0x00007f3130cc0c87 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #7 0x00007f312fac4164 in start_thread (arg=<optimized out>) at pthread_create.c:486 #8 0x00007f31322ffdef in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 Thread 3 (Thread 0x7f3125baa700 (LWP 4317)): #0 0x00007f31322f37d6 in __GI_ppoll (fds=0x7f311800e818, nfds=1, timeout=<optimized out>, sigmask=0x0) at ../sysdeps/unix/sysv/linux/ppoll.c:39 #1 0x00007f3130eb7141 in qt_safe_poll(pollfd*, unsigned long, timespec const*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #2 0x00007f3130eb85b9 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #3 0x00007f3130e6816b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #4 0x00007f3130cb70b6 in QThread::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #5 0x00007f312edd8545 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5 #6 0x00007f3130cc0c87 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #7 0x00007f312fac4164 in start_thread (arg=<optimized out>) at pthread_create.c:486 #8 0x00007f31322ffdef in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 Thread 2 (Thread 0x7f3126ed0700 (LWP 4309)): #0 0x00007f31322f36d9 in __GI___poll (fds=0x7f3126ecfc78, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29 #1 0x00007f3130be0917 in ?? () from /usr/lib/x86_64-linux-gnu/libxcb.so.1 #2 0x00007f3130be253a in xcb_wait_for_event () from /usr/lib/x86_64-linux-gnu/libxcb.so.1 #3 0x00007f31273b2159 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5 #4 0x00007f3130cc0c87 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #5 0x00007f312fac4164 in start_thread (arg=<optimized out>) at pthread_create.c:486 #6 0x00007f31322ffdef in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 Thread 1 (Thread 0x7f3127d01840 (LWP 4285)): [KCrash Handler] #6 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #7 0x00007f3132207535 in __GI_abort () at abort.c:79 #8 0x00007f313220740f in __assert_fail_base (fmt=0x7f312442327a "%s%s%s:%u: %s%sWarunek zapewnienia `%s' nie zosta\305\202 spe\305\202niony.\n%n", assertion=0x7f313214ab4c "delete_refcount == 0", file=0x7f313214ab98 "/build/kwin-kmm6El/kwin-5.14.1/deleted.cpp", line=56, function=<optimized out>) at assert.c:92 #9 0x00007f3132217142 in __GI___assert_fail (assertion=0x7f313214ab4c "delete_refcount == 0", file=0x7f313214ab98 "/build/kwin-kmm6El/kwin-5.14.1/deleted.cpp", line=56, function=0x7f313214ac40 "virtual KWin::Deleted::~Deleted()") at assert.c:101 #10 0x00007f3132065d72 in KWin::Deleted::~Deleted() () from /usr/lib/x86_64-linux-gnu/libkwin.so.5 #11 0x00007f3132065ee9 in KWin::Deleted::~Deleted() () from /usr/lib/x86_64-linux-gnu/libkwin.so.5 #12 0x00007f3130e92fb0 in QObject::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #13 0x00007f313182a4a1 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #14 0x00007f3131831ae0 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #15 0x00007f3130e69499 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #16 0x00007f3130e6c48b in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #17 0x00007f3130eb842b in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #18 0x00007f31274440ed in ?? () from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5 #19 0x00007f3130e6816b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #20 0x00007f3130e702e2 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #21 0x00007f31323d947b in kdemain () from /usr/lib/x86_64-linux-gnu/libkdeinit5_kwin_x11.so #22 0x00007f313220909b in __libc_start_main (main=0x560ed61b2050, argc=1, argv=0x7ffcd0699378, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffcd0699368) at ../csu/libc-start.c:308 #23 0x0000560ed61b208a in _start () [Inferior 1 (process 4285) detached] Possible duplicates by query: bug 399644, bug 399344, bug 396830, bug 386263, bug 385142. Reported using DrKonqi
Interesting, it looks like when Deleted is about to go away, its refcount is not equal to 0. Can you please attach output of qdbus org.kde.KWin /KWin supportInformation
@Vlad Zagorodniy > qdbus org.kde.KWin /KWin supportInformation ========================== Version ======= KWin version: 5.14.2 Qt Version: 5.11.1 Qt compile version: 5.11.1 XCB compile version: 1.13.1 Operation Mode: X11 only Build Options ============= KWIN_BUILD_DECORATIONS: yes KWIN_BUILD_TABBOX: yes KWIN_BUILD_ACTIVITIES: yes HAVE_DRM: yes HAVE_GBM: yes HAVE_X11_XCB: yes HAVE_EPOXY_GLX: yes HAVE_WAYLAND_EGL: yes X11 === Vendor: The X.Org Foundation Vendor Release: 12001000 Protocol Version/Revision: 11/0 SHAPE: yes; Version: 0x11 RANDR: yes; Version: 0x14 DAMAGE: yes; Version: 0x11 Composite: yes; Version: 0x4 RENDER: yes; Version: 0xb XFIXES: yes; Version: 0x50 SYNC: yes; Version: 0x31 GLX: yes; Version: 0x0 Decoration ========== Plugin: org.kde.breeze Theme: Blur: 0 onAllDesktopsAvailable: true alphaChannelSupported: true closeOnDoubleClickOnMenu: false decorationButtonsLeft: 0, 9, 8, 2 decorationButtonsRight: 7, 3, 4, 5 borderSize: 0 gridUnit: 10 font: Ubuntu,10,-1,5,75,0,0,0,0,0,Bold smallSpacing: 2 largeSpacing: 10 Platform ========== Name: KWin::X11StandalonePlatform Options ======= focusPolicy: 0 nextFocusPrefersMouse: false clickRaise: true autoRaise: false autoRaiseInterval: 0 delayFocusInterval: 0 shadeHover: false shadeHoverInterval: 250 separateScreenFocus: false placement: 4 focusPolicyIsReasonable: true borderSnapZone: 10 windowSnapZone: 10 centerSnapZone: 0 snapOnlyWhenOverlapping: false rollOverDesktops: false focusStealingPreventionLevel: 1 legacyFullscreenSupport: false operationTitlebarDblClick: 5000 operationMaxButtonLeftClick: 5000 operationMaxButtonMiddleClick: 5015 operationMaxButtonRightClick: 5014 commandActiveTitlebar1: 0 commandActiveTitlebar2: 30 commandActiveTitlebar3: 2 commandInactiveTitlebar1: 4 commandInactiveTitlebar2: 30 commandInactiveTitlebar3: 2 commandWindow1: 7 commandWindow2: 8 commandWindow3: 8 commandWindowWheel: 31 commandAll1: 10 commandAll2: 3 commandAll3: 14 keyCmdAllModKey: 16777251 showGeometryTip: false condensedTitle: false electricBorderMaximize: true electricBorderTiling: true electricBorderCornerRatio: 0.25 borderlessMaximizedWindows: false killPingTimeout: 5000 hideUtilityWindowsForInactive: true inactiveTabsSkipTaskbar: false autogroupSimilarWindows: false autogroupInForeground: true compositingMode: 1 useCompositing: true compositingInitialized: true hiddenPreviews: 1 glSmoothScale: 2 xrenderSmoothScale: false maxFpsInterval: 16666666 refreshRate: 0 vBlankTime: 6000000 glStrictBinding: false glStrictBindingFollowsDriver: true glCoreProfile: false glPreferBufferSwap: 0 glPlatformInterface: 1 windowsBlockCompositing: true Screen Edges ============ desktopSwitching: false desktopSwitchingMovingClients: false cursorPushBackDistance: 1x1 timeThreshold: 150 reActivateThreshold: 350 actionTopLeft: 0 actionTop: 0 actionTopRight: 0 actionRight: 0 actionBottomRight: 0 actionBottom: 0 actionBottomLeft: 0 actionLeft: 0 Screens ======= Multi-Head: no Active screen follows mouse: no Number of Screens: 1 Screen 0: --------- Name: DVI-D-0 Geometry: 0,0,1920x1080 Scale: 1 Refresh Rate: 59.9339 Compositing =========== Compositing is active Compositing Type: OpenGL OpenGL vendor string: NVIDIA Corporation OpenGL renderer string: GeForce GTX 970/PCIe/SSE2 OpenGL version string: 4.6.0 NVIDIA 390.87 OpenGL platform interface: GLX OpenGL shading language version string: 4.60 NVIDIA Driver: NVIDIA Driver version: 390.87 GPU class: Unknown OpenGL version: 4.6 GLSL version: 4.60 X server version: 1.20.1 Linux kernel version: 4.18 Direct rendering: Requires strict binding: no GLSL shaders: yes Texture NPOT support: yes Virtual Machine: no OpenGL 2 Shaders are used Painting blocks for vertical retrace: no Loaded Effects: --------------- zoom kwin4_effect_frozenapp kwin4_effect_fade kwin4_effect_translucency kwin4_effect_logout kwin4_effect_maximize kwin4_effect_morphingpopups kwin4_effect_dialogparent slidingpopups slideback slide screenshot magiclamp glide flipswitch desktopgrid coverswitch colorpicker wobblywindows presentwindows highlightwindow blur startupfeedback screenedge kscreen Currently Active Effects: ------------------------- blur Effect Settings: ---------------- zoom: zoomFactor: 1.2 mousePointer: 0 mouseTracking: 0 enableFocusTracking: false followFocus: true focusDelay: 350 moveFactor: 20 targetZoom: 1 kwin4_effect_frozenapp: kwin4_effect_fade: kwin4_effect_translucency: kwin4_effect_logout: kwin4_effect_maximize: kwin4_effect_morphingpopups: kwin4_effect_dialogparent: slidingpopups: slideInDuration: 150 slideOutDuration: 250 slideback: slide: duration: 150 horizontalGap: 0 verticalGap: 0 slideDocks: false slideBackground: false screenshot: magiclamp: glide: duration: 160 inRotationEdge: 0 inRotationAngle: 0 inDistance: 200 inOpacity: 0.4 outRotationEdge: 2 outRotationAngle: 0 outDistance: 200 outOpacity: 0 flipswitch: tabBox: false tabBoxAlternative: false duration: 200 angle: 30 xPosition: 0.33000001311302185 yPosition: 1 windowTitle: true desktopgrid: zoomDuration: 150 border: 0 desktopNameAlignment: 0 layoutMode: 0 customLayoutRows: 3 usePresentWindows: true coverswitch: animationDuration: 200 animateSwitch: true animateStart: true animateStop: true reflection: true windowTitle: true zPosition: 900 primaryTabBox: true secondaryTabBox: false colorpicker: wobblywindows: stiffness: 0.15 drag: 0.8 moveFactor: 0.1 xTesselation: 20 yTesselation: 20 minVelocity: 0 maxVelocity: 1000 stopVelocity: 0.5 minAcceleration: 0 maxAcceleration: 1000 stopAcceleration: 0.5 moveEffectEnabled: true openEffectEnabled: false closeEffectEnabled: false moveWobble: true resizeWobble: true presentwindows: layoutMode: 0 showCaptions: true showIcons: true doNotCloseWindows: false ignoreMinimized: false accuracy: 20 fillGaps: true fadeDuration: 150 showPanel: false leftButtonWindow: 1 rightButtonWindow: 2 middleButtonWindow: 0 leftButtonDesktop: 2 middleButtonDesktop: 0 rightButtonDesktop: 0 highlightwindow: blur: startupfeedback: type: 0 screenedge: kscreen:
I updated KWin from 5.14.1 to 5.14.2, and I can no longer reproduce this issue. If it happens again, I will report it here.
Ok, please reopen if you do.
Created attachment 116032 [details] New crash information added by DrKonqi kwin_x11 (5.14.2) using Qt 5.11.1 - What I was doing when the application crashed: Pressing shortcuts for switching virtual desktops (1,2,3,4) and Alt+F2 for running a command fast. -- Backtrace (Reduced): #6 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #7 0x00007f01e18a0535 in __GI_abort () at abort.c:79 #8 0x00007f01e18a040f in __assert_fail_base (fmt=0x7f01d44cc27a "%s%s%s:%u: %s%sWarunek zapewnienia `%s' nie zosta\305\202 spe\305\202niony.\n%n", assertion=0x7f01e17e3b4c "delete_refcount == 0", file=0x7f01e17e3b98 "/build/kwin-dKqRUG/kwin-5.14.2/deleted.cpp", line=56, function=<optimized out>) at assert.c:92 #9 0x00007f01e18b0142 in __GI___assert_fail (assertion=0x7f01e17e3b4c "delete_refcount == 0", file=0x7f01e17e3b98 "/build/kwin-dKqRUG/kwin-5.14.2/deleted.cpp", line=56, function=0x7f01e17e3c40 "virtual KWin::Deleted::~Deleted()") at assert.c:101 #10 0x00007f01e16fed92 in KWin::Deleted::~Deleted() () from /usr/lib/x86_64-linux-gnu/libkwin.so.5
Still reproducible in KWin 5.14.2. Reopening.
Can you please give us more information about what you were doing when the crash happened? What windows were open? Did you close a window before switching virtual desktops? How often KWin crashes? etc.
Also, if you disable Fade and Glide effect, can you reproduce this bug?
Happens only with Glide effect. Could not reproduce with Fade or no effect. No windows need to be present on any virtual desktop. Press Alt+1, Alt+2, Alt+F2 fast randomly. (I use reassigned shortcuts for desktops from Ctrl+Fn to Alt+n, that's probably why it was easy for me to trigger this by accident)
(In reply to ultr from comment #9) > Happens only with Glide effect. Csn you reproduce this bug if you enable the Scale effect? (make sure that the Glide effect is disabled)
> Happens only with Glide effect. > Could not reproduce with Fade or no effect. I meant: > Happens only with "Slide" effect. > Could not reproduce with "Fade Desktop" or no [desktop switching] effect. As for "Glide", "Fade" and "Scale" window effects: The issue is reproducible always no matter of the combination of these three. (depends only on the state of the desktop switching "Slide" effect)
Thanks, that's pretty useful information.
Hmm, can't reproduce. Could you please run kwin as follows: QT_LOGGING_RULES="*.debug=true" kwin_x11 --replace &> log.txt reproduce the bug and then submit log.txt here?
I have a feeling that it might be caused by the Sliding Popups effect (maybe it unref windows that haven't been ref'ed). If you disable the Sliding Popups effect, can you reproduce this bug?
Yep, can reproduce.
Git commit ad28da84e78c7eb7ff1e608c4819707b2142daea by Vlad Zagorodniy. Committed on 07/11/2018 at 17:22. Pushed by vladz into branch 'Plasma/5.14'. [effects/slidingpopups] Don't crash when sliding virtual desktops Summary: If you switch virtual desktops while krunner is sliding in, then depending on whether your distro strips assert statements away, KWin can crash. The reason why it crashes is the sliding popups effect tries to unref deleted windows that it hasn't referenced before (if there is an active full screen effect, then popups won't be slided out, which in its turn means that we won't reference deleted windows). So, in the end, the refcount of those windows can be -1. That triggers an assert statement in the destructor of the Deleted class, which checks whether the refcount is equal to 0. Popups are not slided while there is an active full screen effect because we don't know what the full screen effect does. This patch adjusts the sliding popups effect so it stops all active animations when user switches virtual desktops or when a full screen effect kicks in. We need to do that so the effect won't try to unreference windows in postPaintWindow. Visually, it doesn't look quite nice, but for now that's good enough. A proper fix would be more complex: we would need to make sure that full screen effects ignore sliding popups (and also maybe docks) and perform some input redirection. FIXED-IN: 5.14.4 Test Plan: I'm not able anymore to reproduce bug 400170. Reviewers: #kwin, graesslin Reviewed By: #kwin, graesslin Subscribers: davidedmundson, graesslin, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D16731 M +22 -0 effects/slidingpopups/slidingpopups.cpp M +3 -3 effects/slidingpopups/slidingpopups.h https://commits.kde.org/kwin/ad28da84e78c7eb7ff1e608c4819707b2142daea