Bug 424879

Summary: plasmashell aborted shortly after logging in with the error The Wayland connection experienced a fatal error: Invalid argument
Product: [Plasma] plasmashell Reporter: Matt Fagnani <matt.fagnani>
Component: generic-crashAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED DUPLICATE    
Severity: crash CC: bugseforuns, kde, ken20001, matt.fagnani, nate, plasma-bugs, rdieter
Priority: NOR Keywords: drkonqi
Version: 5.19.5   
Target Milestone: 1.0   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: New crash information added by DrKonqi
New crash information added by DrKonqi
New crash information added by DrKonqi

Description Matt Fagnani 2020-07-31 21:40:32 UTC
Application: plasmashell (5.19.4)

Qt Version: 5.14.2
Frameworks Version: 5.72.0
Operating System: Linux 5.8.0-0.rc7.1.fc33.x86_64 x86_64
Windowing system: Wayland
Distribution: Fedora 33 (KDE Plasma Prerelease)

-- Information about the crash:
- What I was doing when the application crashed:

I logged into Plasma 5.19.4 on Wayland from sddm in Fedora Rawhide with KF 5.72.0, Qt 5.14.2. plasmashell aborted shortly after logging in with the error The Wayland connection experienced a fatal error: Invalid argument according to the journal. 

Jul 31 17:03:00 plasmashell[5493]: org.kde.plasmaquick: Couldn't create KWindowShadow for NotificationPopup_QMLTYPE_610_QML_613(0x55cc662a2b20)
Jul 31 17:03:00 plasmashell[5493]: org.kde.plasmaquick: Couldn't create KWindowShadow for NotificationPopup_QMLTYPE_610_QML_613(0x55cc662a2b20)
Jul 31 17:03:00 plasmashell[5493]: org.kde.plasmaquick: Couldn't create KWindowShadow for NotificationPopup_QMLTYPE_610_QML_613(0x55cc662a2b20)
Jul 31 17:03:00 plasmashell[5493]: trying to show an empty dialog
Jul 31 17:03:04 plasmashell[5493]: org.kde.plasmaquick: Couldn't create KWindowShadow for ToolTipDialog(0x55cc6522bad0)
Jul 31 17:03:04 plasmashell[5493]: org.kde.plasmaquick: Couldn't create KWindowShadow for ToolTipDialog(0x55cc6522bad0)
Jul 31 17:03:04 plasmashell[5493]: org.kde.plasmaquick: Couldn't create KWindowShadow for ToolTipDialog(0x55cc6522bad0)
Jul 31 17:03:04 plasmashell[5493]: org.kde.plasmaquick: Couldn't create KWindowShadow for ToolTipDialog(0x55cc6522bad0)
Jul 31 17:03:04 plasmashell[5493]: org.kde.plasmaquick: Couldn't create KWindowShadow for ToolTipDialog(0x55cc6522bad0)
Jul 31 17:03:04 plasmashell[5493]: org.kde.plasmaquick: Couldn't create KWindowShadow for ToolTipDialog(0x55cc6522bad0)
Jul 31 17:03:04 plasmashell[5493]: org.kde.plasmaquick: Couldn't create KWindowShadow for ToolTipDialog(0x55cc6522bad0)
Jul 31 17:03:04 plasmashell[5493]: org.kde.plasmaquick: Couldn't create KWindowShadow for ToolTipDialog(0x55cc6522bad0)
Jul 31 17:03:04 plasmashell[5493]: org.kde.plasmaquick: Couldn't create KWindowShadow for ToolTipDialog(0x55cc6522bad0)
Jul 31 17:03:04 plasmashell[5493]: org.kde.plasmaquick: Couldn't create KWindowShadow for ToolTipDialog(0x55cc6522bad0)
Jul 31 17:03:04 plasmashell[5493]: The Wayland connection experienced a fatal error: Invalid argument
Jul 31 17:03:05 plasmashell[5998]: org.kde.plasmaquick: Applet preload policy set to 1

- Unusual behavior I noticed:
The background went black. plasmashell restarted automatically

The crash can be reproduced sometimes.

-- Backtrace:
Application: Plasma (plasmashell), signal: Aborted

[KCrash Handler]
#4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:49
#5  0x00007f1fb07d08a4 in __GI_abort () at abort.c:79
#6  0x00007f1fb0bf3a7f in qt_message_fatal (message=<synthetic pointer>..., context=...) at global/qlogging.cpp:1914
#7  QMessageLogger::fatal (this=this@entry=0x7ffc97230990, msg=msg@entry=0x7f1f9f338dc8 "The Wayland connection experienced a fatal error: %s") at global/qlogging.cpp:893
#8  0x00007f1f9f2c8640 in QtWaylandClient::QWaylandDisplay::checkError (this=<optimized out>) at /usr/include/qt5/QtCore/qlogging.h:90
#9  0x00007f1f9f2c868e in QtWaylandClient::QWaylandDisplay::flushRequests (this=0x55cc641e0470) at qwaylanddisplay.cpp:209
#10 0x00007f1fb0debfb0 in doActivate<false> (sender=0x55cc641f5100, signal_index=4, argv=0x7ffc97230a70, argv@entry=0x0) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:395
#11 0x00007f1fb0de67f8 in QMetaObject::activate (sender=sender@entry=0x55cc641f5100, m=m@entry=0x7f1fb10748a0 <QAbstractEventDispatcher::staticMetaObject>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x0) at kernel/qobject.cpp:3930
#12 0x00007f1fb0db9af7 in QAbstractEventDispatcher::awake (this=this@entry=0x55cc641f5100) at .moc/moc_qabstracteventdispatcher.cpp:149
#13 0x00007f1fb0e08bac in QEventDispatcherGlib::processEvents (this=0x55cc641f5100, flags=...) at kernel/qeventdispatcher_glib.cpp:430
#14 0x00007f1fb0dbb91b in QEventLoop::exec (this=this@entry=0x7ffc97230b90, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:136
#15 0x00007f1fb0dc35a6 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:118
#16 0x000055cc63509705 in main ()
[Inferior 1 (process 5493) detached]

The reporter indicates this bug may be a duplicate of or related to bug 424719, bug 424009.

Possible duplicates by query: bug 424804, bug 424719, bug 424709, bug 424593, bug 424009.

Reported using DrKonqi
Comment 1 David Edmundson 2020-08-01 15:12:29 UTC
Can you confirm your version of plasma-wayland-protocols please
Comment 2 Matt Fagnani 2020-08-01 16:31:39 UTC
(In reply to David Edmundson from comment #1)
> Can you confirm your version of plasma-wayland-protocols please

plasma-wayland-protocols isn't installed on my system. I'll install plasma-wayland-protocols-1.1.1-1.fc33 from https://koji.fedoraproject.org/koji/buildinfo?buildID=1571963 and see if that makes a difference. Should 
plasma-wayland-protocols be a dependency of another plasma package? Thanks.
Comment 3 Bug Janitor Service 2020-08-16 04:33:09 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 4 Matt Fagnani 2020-08-16 04:47:52 UTC
I installed plasma-wayland-protocols-1.1.1-1.fc33. I have seen other plasmashell crashes since then, but not with this specific error.
Comment 5 Patrick Silva 2020-08-17 14:48:23 UTC
Sometimes I get a plasma crash notification immediately after login to Wayland session on my system too.

Operating System: Arch Linux 
KDE Plasma Version: 5.19.4
KDE Frameworks Version: 5.73.0
Qt Version: 5.15.1
Comment 6 Matt Fagnani 2020-08-19 12:03:44 UTC
Created attachment 131004 [details]
New crash information added by DrKonqi

plasmashell (5.19.4) using Qt 5.14.2

- What I was doing when the application crashed:

I was using Plasma 5.19.4 on Wayland in Fedora 33. I set desktop to use the Application Menu by right-clicking on the button at the bottom left of the screen, selecting Show Alternatives > Application Menu > Switch. I quickly left-clicked to open the Application Menu more than 20 times. The Task Manager at the bottom of the screen disappeared and reappeared automatically. plasmashell aborted with the message The Wayland connection experienced a fatal error: Invalid argument

Aug 19 07:33:06 plasmashell[7233]: qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
Aug 19 07:33:06 plasmashell[7233]: kf.plasma.quick: Couldn't create KWindowShadow for PlasmaQuick::Dialog_QML_183(0x55cfa49ab270, name="popupWindow")
Aug 19 07:33:06 plasmashell[7233]: kf.plasma.quick: Couldn't create KWindowShadow for PlasmaQuick::Dialog_QML_183(0x55cfa49ab270, name="popupWindow")
Aug 19 07:33:06 plasmashell[7233]: kf.plasma.quick: Couldn't create KWindowShadow for PlasmaQuick::Dialog_QML_183(0x55cfa49ab270, name="popupWindow")
Aug 19 07:33:06 plasmashell[7233]: qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
Aug 19 07:33:06 plasmashell[7233]: kf.plasma.quick: Couldn't create KWindowShadow for PlasmaQuick::Dialog_QML_183(0x55cfa49ab270, name="popupWindow")
Aug 19 07:33:06 plasmashell[7233]: kf.plasma.quick: Couldn't create KWindowShadow for PlasmaQuick::Dialog_QML_183(0x55cfa49ab270, name="popupWindow")
Aug 19 07:33:06 plasmashell[7233]: kf.plasma.quick: Couldn't create KWindowShadow for PlasmaQuick::Dialog_QML_183(0x55cfa49ab270, name="popupWindow")
Aug 19 07:33:07 plasmashell[7233]: The Wayland connection experienced a fatal error: Invalid argument

I've seen plasmashell abort 3 times with this error, and plasma-wayland-protocols-1.1.1-1.fc33.x86_64 was installed during the last 2 crashes. plasmashell segmentation faulted when I've quickly left-clicked to open the Application Menu at other times in the last day with traces like those I reported at https://bugs.kde.org/show_bug.cgi?id=414411 and https://bugs.kde.org/show_bug.cgi?id=409021 The crashes might involve a race condition in which the Wayland surface of the Application menu was occasionally freed or corrupted before it was used.

-- Backtrace (Reduced):
#4  __GI_raise (sig=<optimized out>) at ../sysdeps/unix/sysv/linux/raise.c:49
#5  0x00007f47478438a4 in __GI_abort () at abort.c:79
#6  0x00007f4747c65a7f in qt_message_fatal (message=<synthetic pointer>..., context=...) at global/qlogging.cpp:1914
#7  QMessageLogger::fatal (this=this@entry=0x7fffc8df3260, msg=msg@entry=0x7f4736413dc8 "The Wayland connection experienced a fatal error: %s") at global/qlogging.cpp:893
#8  0x00007f47363a3640 in QtWaylandClient::QWaylandDisplay::checkError (this=<optimized out>) at /usr/include/qt5/QtCore/qlogging.h:90
Comment 7 Matt Fagnani 2020-09-05 00:57:58 UTC
Created attachment 131424 [details]
New crash information added by DrKonqi

plasmashell (5.19.5) using Qt 5.14.2

- What I was doing when the application crashed:

I was using Plasma 5.19.5 on Wayland in Fedora 33. I set desktop to use the Application Menu by right-clicking on the button at the bottom left of the screen, selecting Show Alternatives > Application Menu > Switch. I clicked to open the Application Menu. I right clicked on the Kate and Konsole icons at the left side of the Application menu 4 times. The Task Manager at the bottom of the screen disappeared, they background went black, and they reappeared automatically. plasmashell aborted with the message The Wayland connection experienced a fatal error: Invalid argument. The journal at the time of the crash had the following.

Sep 04 20:40:10 plasmashell[7606]: kf.plasma.quick: Couldn't create KWindowShadow for ToolTipDialog(0x55d9c6ecabc0)
Sep 04 20:40:10 plasmashell[7606]: kf.plasma.quick: Couldn't create KWindowShadow for ToolTipDialog(0x55d9c6ecabc0)
Sep 04 20:40:11 plasmashell[7606]: QQmlComponent: Created graphical object was not placed in the graphics scene.
Sep 04 20:40:11 plasmashell[7606]: QQmlComponent: Created graphical object was not placed in the graphics scene.
Sep 04 20:40:11 plasmashell[7606]: QQmlComponent: Created graphical object was not placed in the graphics scene.
Sep 04 20:40:11 plasmashell[7606]: QQmlComponent: Created graphical object was not placed in the graphics scene.
Sep 04 20:40:11 plasmashell[7606]: QQmlComponent: Created graphical object was not placed in the graphics scene.
Sep 04 20:40:11 plasmashell[7606]: QQmlComponent: Created graphical object was not placed in the graphics scene.
Sep 04 20:40:11 plasmashell[7606]: QQmlComponent: Created graphical object was not placed in the graphics scene.
Sep 04 20:40:11 plasmashell[7606]: QQmlComponent: Created graphical object was not placed in the graphics scene.
Sep 04 20:40:11 plasmashell[7606]: QQmlComponent: Created graphical object was not placed in the graphics scene.
Sep 04 20:40:11 plasmashell[7606]: qt.qpa.wayland: setGrabPopup called with a parent, QtWaylandClient::QWaylandXdgSurface(0x55d9c76159f0) which does not match the current topmost grabbing popup, QtWaylandClient::QWaylandXdgSurface(0x55d9c67f81a0) According to the xdg-shell protocol, this is not allowed. The wayland QPA plugin is currently handling it by setting the parent to the topmost grabbing popup. Note, however, that this may cause positioning errors and popups closing unxpectedly because xdg-shell mandate that child popups close before parents
Sep 04 20:40:11 plasmashell[7606]: kf.plasma.quick: Couldn't create KWindowShadow for ToolTipDialog(0x55d9c6ecabc0)
Sep 04 20:40:11 plasmashell[7606]: kf.plasma.quick: Couldn't create KWindowShadow for ToolTipDialog(0x55d9c6ecabc0)
Sep 04 20:40:11 plasmashell[7606]: The Wayland connection experienced a fatal error: Invalid argument
Sep 04 20:40:12 plasmashell[8628]: kf.plasma.quick: Applet preload policy set to 1
Sep 04 20:40:12 plasmashell[8628]: Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)

I've seen this crash at least 4 times when right-clicking repeatedly on the Kate and Kontact icons on the left of the Application menu.

-- Backtrace (Reduced):
#4  __GI_raise (sig=<optimized out>) at ../sysdeps/unix/sysv/linux/raise.c:49
#5  0x00007f6ee512d8a4 in __GI_abort () at abort.c:79
#6  0x00007f6ee554fa7f in qt_message_fatal (message=<synthetic pointer>..., context=...) at global/qlogging.cpp:1914
#7  QMessageLogger::fatal (this=this@entry=0x7ffc433e4ba0, msg=msg@entry=0x7f6ed3d05dc8 "The Wayland connection experienced a fatal error: %s") at global/qlogging.cpp:893
#8  0x00007f6ed3c95640 in QtWaylandClient::QWaylandDisplay::checkError (this=<optimized out>) at /usr/include/qt5/QtCore/qlogging.h:90
Comment 8 Eugene 2020-09-06 22:38:37 UTC
Created attachment 131456 [details]
New crash information added by DrKonqi

plasmashell (5.19.5) using Qt 5.14.2

- What I was doing when the application crashed:

Just switched from Breeze theme to Kubuntu when crash happened.

-- Backtrace (Reduced):
#4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#5  0x00007fa6b8aed859 in __GI_abort () at abort.c:79
#6  0x00007fa6b8f2bba3 in qt_message_fatal (message=<synthetic pointer>..., context=...) at global/qlogging.cpp:1914
#7  QMessageLogger::fatal (this=this@entry=0x7ffe06a40c50, msg=msg@entry=0x7fa6b48a11c0 "The Wayland connection experienced a fatal error: %s") at global/qlogging.cpp:893
#8  0x00007fa6b47ff084 in QtWaylandClient::QWaylandDisplay::checkError (this=<optimized out>) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qlogging.h:90
Comment 9 Nate Graham 2021-02-24 05:36:35 UTC
> #7  QMessageLogger::fatal (this=this@entry=0x7ffe06a40c50, msg=msg@entry=0x7fa6b48a11c0 "The Wayland connection experienced a fatal error: %s") at global/qlogging.cpp:893
This means that kwin_wayland crashed. When it does so, it takes down apps with it, and they die with this error message. So we will need to find out why KWin crashed and debug that. If you still have a backtrace for it, can you attach it? Thanks!

See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports#Retrieving_a_backtrace_using_coredumpctl
Comment 10 Matt Fagnani 2021-02-24 20:19:24 UTC
(In reply to Nate Graham from comment #9)
> > #7  QMessageLogger::fatal (this=this@entry=0x7ffe06a40c50, msg=msg@entry=0x7fa6b48a11c0 "The Wayland connection experienced a fatal error: %s") at global/qlogging.cpp:893
> This means that kwin_wayland crashed. When it does so, it takes down apps
> with it, and they die with this error message. So we will need to find out
> why KWin crashed and debug that. If you still have a backtrace for it, can
> you attach it? Thanks!
> 
> See
> https://community.kde.org/Guidelines_and_HOWTOs/Debugging/
> How_to_create_useful_crash_reports#Retrieving_a_backtrace_using_coredumpctl

kwin_wayland didn't crash at the times of the plasmashell crashes I reported here according to the journals I saved when they happened. I would've mentioned that kwin_wayland crashed if it had. The error was that an invalid argument was passed between plasmashell and kwin_wayland.

I reproduced this plasmashell crash twice in Plasma 5.20.0 on Wayland with KF 5.79 and Qt 5.15.2 by repeatedly clicking to open and close the Application Launcher menu at the bottom left of the screen. The first such crash happened when I clicked several times in 1-2 seconds on the Application Launcher menu button. plasmashell crashed and went black. The window open at the time and the cursor remained responsive. drkonqi didn't appear and core dump wasn't saved probably because plasmashell didn't restart automatically. The journal at the time showed the following.

Feb 24 11:06:31 plasmashell[1219]: qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
Feb 24 11:06:31 plasmashell[1219]: qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
Feb 24 11:06:31 plasmashell[1219]: kf.plasma.quick: Couldn't create KWindowShadow for PlasmaQuick::Dialog_QML_219(0x55df6f0792a0, name="popupWindow")
Feb 24 11:06:31 plasmashell[1219]: kf.plasma.quick: Couldn't create KWindowShadow for PlasmaQuick::Dialog_QML_219(0x55df6f0792a0, name="popupWindow")
Feb 24 11:06:31 plasmashell[1219]: kf.plasma.quick: Couldn't create KWindowShadow for PlasmaQuick::Dialog_QML_219(0x55df6f0792a0, name="popupWindow")
Feb 24 11:06:32 plasmashell[1219]: qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
Feb 24 11:06:32 plasmashell[1219]: kf.plasma.quick: Couldn't create KWindowShadow for PlasmaQuick::Dialog_QML_219(0x55df6f0792a0, name="popupWindow")
Feb 24 11:06:32 plasmashell[1219]: kf.plasma.quick: Couldn't create KWindowShadow for PlasmaQuick::Dialog_QML_219(0x55df6f0792a0, name="popupWindow")
Feb 24 11:06:32 plasmashell[1219]: kf.plasma.quick: Couldn't create KWindowShadow for PlasmaQuick::Dialog_QML_219(0x55df6f0792a0, name="popupWindow")
Feb 24 11:06:32 plasmashell[1219]: qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
Feb 24 11:06:32 plasmashell[1219]: kf.plasma.quick: Couldn't create KWindowShadow for PlasmaQuick::Dialog_QML_219(0x55df6f0792a0, name="popupWindow")
Feb 24 11:06:32 plasmashell[1219]: kf.plasma.quick: Couldn't create KWindowShadow for PlasmaQuick::Dialog_QML_219(0x55df6f0792a0, name="popupWindow")
Feb 24 11:06:32 plasmashell[1219]: kf.plasma.quick: Couldn't create KWindowShadow for PlasmaQuick::Dialog_QML_219(0x55df6f0792a0, name="popupWindow")
Feb 24 11:06:33 plasmashell[1219]: qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
Feb 24 11:06:33 plasmashell[1219]: kf.plasma.quick: Couldn't create KWindowShadow for PlasmaQuick::Dialog_QML_219(0x55df6f0792a0, name="popupWindow")
Feb 24 11:06:33 plasmashell[1219]: kf.plasma.quick: Couldn't create KWindowShadow for PlasmaQuick::Dialog_QML_219(0x55df6f0792a0, name="popupWindow")
Feb 24 11:06:33 plasmashell[1219]: kf.plasma.quick: Couldn't create KWindowShadow for PlasmaQuick::Dialog_QML_219(0x55df6f0792a0, name="popupWindow")
Feb 24 11:06:33 plasmashell[1219]: qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
Feb 24 11:06:33 plasmashell[1219]: kf.plasma.quick: Couldn't create KWindowShadow for PlasmaQuick::Dialog_QML_219(0x55df6f0792a0, name="popupWindow")
Feb 24 11:06:33 plasmashell[1219]: kf.plasma.quick: Couldn't create KWindowShadow for PlasmaQuick::Dialog_QML_219(0x55df6f0792a0, name="popupWindow")
Feb 24 11:06:33 plasmashell[1219]: kf.plasma.quick: Couldn't create KWindowShadow for PlasmaQuick::Dialog_QML_219(0x55df6f0792a0, name="popupWindow")
Feb 24 11:06:34 plasmashell[1219]: KCrash: Application 'plasmashell' crashing...
Feb 24 11:06:34 plasmashell[1219]: KCrash: Attempting to start /usr/libexec/drkonqi
Feb 24 11:06:34 systemd[1090]: plasma-plasmashell.service: Deactivated successfully.
Feb 24 11:06:34 systemd[1090]: plasma-plasmashell.service: Consumed 8.340s CPU time.

I switched to another VT and stopped the session using loginctl terminate-session 2. The second crash happened when I clicked about 20 times to open and close the Application Launcher menu. plasmashell crashed in the same way. konsole and the cursor remained responsive. The errors in the journal were like those around the time of the first plasmashell crash. 

I tried to attach gdb to plasmashell from a VT in a subsequent session, but plasmashell stopped responding when I clicked to open the Application Launcher menu.
Comment 11 Nate Graham 2021-02-25 19:34:44 UTC
I see, thanks.
Comment 12 David Edmundson 2021-10-03 19:52:01 UTC

*** This bug has been marked as a duplicate of bug 439321 ***
Comment 13 Nate Graham 2021-10-04 14:24:31 UTC

*** This bug has been marked as a duplicate of bug 438839 ***