Bug 385628

Summary: [Wayland] Kate crash on close.
Product: [Frameworks and Libraries] kwayland Reporter: Tony <jodr666>
Component: generalAssignee: David Edmundson <kde>
Status: RESOLVED DUPLICATE    
Severity: crash CC: aleixpol, christoph, jagannathante, kde, L.Bonnaud, mail, mvourlakos, notuxius
Priority: NOR Keywords: drkonqi, wayland
Version: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=372597
https://bugs.kde.org/show_bug.cgi?id=390151
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: New crash information added by DrKonqi
New crash information added by DrKonqi

Description Tony 2017-10-11 19:58:44 UTC
Application: kate (17.11.70)

Qt Version: 5.9.2
Frameworks Version: 5.39.0
Operating System: Linux 4.13.5-1-default x86_64
Distribution: "openSUSE Tumbleweed"

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

I had open /etc/resolv.conf and a back up of it, i made no changes to either file. I did not run kate as root.
Crash pop as soon as i close kate.

The crash can be reproduced sometimes.

-- Backtrace:
Application: Kate (kate), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f0d63604900 (LWP 7217))]

Thread 2 (Thread 0x7f0d4b832700 (LWP 7218)):
#0  0x00007f0d5df14808 in read () from /lib64/libc.so.6
#1  0x00007f0d5815d3c0 in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x00007f0d58118c2b in g_main_context_check () from /usr/lib64/libglib-2.0.so.0
#3  0x00007f0d581190f0 in ?? () from /usr/lib64/libglib-2.0.so.0
#4  0x00007f0d5811925c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#5  0x00007f0d5e84825b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#6  0x00007f0d5e7f073a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#7  0x00007f0d5e6201fa in QThread::exec() () from /usr/lib64/libQt5Core.so.5
#8  0x00007f0d5eccaa45 in QDBusConnectionManager::run() () from /usr/lib64/libQt5DBus.so.5
#9  0x00007f0d5e624c0e in QThreadPrivate::start(void*) () from /usr/lib64/libQt5Core.so.5
#10 0x00007f0d59c42558 in start_thread () from /lib64/libpthread.so.0
#11 0x00007f0d5df2345f in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f0d63604900 (LWP 7217)):
[KCrash Handler]
#6  0x00007f0d509c5099 in wl_map_insert_at (map=<optimized out>, flags=flags@entry=0, i=<optimized out>, data=<optimized out>) at src/wayland-util.c:249
#7  0x00007f0d509c11ae in proxy_destroy (proxy=0x5558b92b2670) at src/wayland-client.c:411
#8  wl_proxy_destroy (proxy=0x5558b92b2670) at src/wayland-client.c:442
#9  0x00007f0d4ef7f6a7 in org_kde_plasma_window_destroy (org_kde_plasma_window=0x5558b92b2670) at /usr/src/debug/kwayland-5.39.0git.20171010T183056~daec657/build/src/client/wayland-plasma-window-management-client-protocol.h:634
#10 KWayland::Client::WaylandPointer<org_kde_plasma_window, org_kde_plasma_window_destroy>::release (this=0x5558b91b5090, this=0x5558b91b5090) at /usr/src/debug/kwayland-5.39.0git.20171010T183056~daec657/src/client/wayland_pointer_p.h:53
#11 KWayland::Client::PlasmaWindow::release (this=this@entry=0x5558b88b0980) at /usr/src/debug/kwayland-5.39.0git.20171010T183056~daec657/src/client/plasmawindowmanagement.cpp:745
#12 0x00007f0d4ef7f6ca in KWayland::Client::PlasmaWindow::~PlasmaWindow (this=0x5558b88b0980, __in_chrg=<optimized out>) at /usr/src/debug/kwayland-5.39.0git.20171010T183056~daec657/src/client/plasmawindowmanagement.cpp:735
#13 0x00007f0d4ef7f7c9 in KWayland::Client::PlasmaWindow::~PlasmaWindow (this=0x5558b88b0980, __in_chrg=<optimized out>) at /usr/src/debug/kwayland-5.39.0git.20171010T183056~daec657/src/client/plasmawindowmanagement.cpp:736
#14 0x00007f0d5e81d40b in QObjectPrivate::deleteChildren() () from /usr/lib64/libQt5Core.so.5
#15 0x00007f0d5e82676b in QObject::~QObject() () from /usr/lib64/libQt5Core.so.5
#16 0x00007f0d4ef7fd99 in KWayland::Client::PlasmaWindowManagement::~PlasmaWindowManagement (this=0x5558b91809c0, __in_chrg=<optimized out>) at /usr/src/debug/kwayland-5.39.0git.20171010T183056~daec657/src/client/plasmawindowmanagement.cpp:252
#17 0x00007f0d5e81d40b in QObjectPrivate::deleteChildren() () from /usr/lib64/libQt5Core.so.5
#18 0x00007f0d5e82676b in QObject::~QObject() () from /usr/lib64/libQt5Core.so.5
#19 0x00007f0d419e8a93 in WaylandIntegration::~WaylandIntegration (this=<optimized out>, __in_chrg=<optimized out>) at /usr/src/debug/kwayland-integration-5.11.90git.20170914T114718~1d8054b/src/windowsystem/waylandintegration.cpp:54
#20 WaylandIntegrationSingleton::~WaylandIntegrationSingleton (this=<optimized out>, __in_chrg=<optimized out>) at /usr/src/debug/kwayland-integration-5.11.90git.20170914T114718~1d8054b/src/windowsystem/waylandintegration.cpp:40
#21 (anonymous namespace)::Q_QGS_privateWaylandIntegrationSelf::Holder::~Holder (this=<optimized out>, __in_chrg=<optimized out>) at /usr/src/debug/kwayland-integration-5.11.90git.20170914T114718~1d8054b/src/windowsystem/waylandintegration.cpp:46
#22 0x00007f0d5de63ce8 in __run_exit_handlers () from /lib64/libc.so.6
#23 0x00007f0d5de63d3a in exit () from /lib64/libc.so.6
#24 0x00007f0d5de4bf51 in __libc_start_main () from /lib64/libc.so.6
#25 0x00005558b669925a in _start ()

Possible duplicates by query: bug 379728, bug 377962.

Reported using DrKonqi
Comment 1 Aleix Pol 2017-10-16 10:51:52 UTC
I also have this issue sometimes.
Comment 2 Christoph Feck 2017-10-17 19:50:16 UTC
Same crash as in bug 385633.
Comment 3 Christoph Feck 2017-10-17 20:52:24 UTC
Lets resolve it the other way around; bug 385628 was reported first, and already confirmed.
Comment 4 Christoph Feck 2017-10-17 20:52:56 UTC
Reverting status.
Comment 5 Christoph Feck 2017-11-29 17:28:11 UTC
*** Bug 387103 has been marked as a duplicate of this bug. ***
Comment 6 Elias Probst 2018-01-22 09:45:47 UTC
Created attachment 110043 [details]
New crash information added by DrKonqi

konsole (18.03.70) using Qt 5.10.0

- What I was doing when the application crashed:

- Open Konsole
- Start an SSH session
- Close the Konsole window, while the SSH session is still running
- Select "Close Current Tab" from dialog
- Konsole crashes

-- Backtrace (Reduced):
#6  0x00007f2e4d404bc9 in wl_map_insert_at (map=<optimized out>, flags=flags@entry=0, i=<optimized out>, data=<optimized out>) at /var/tmp/portage/dev-libs/wayland-1.13.0/work/wayland-1.13.0/src/wayland-util.c:249
#7  0x00007f2e4d400ebe in proxy_destroy (proxy=0x55a522cf9760) at /var/tmp/portage/dev-libs/wayland-1.13.0/work/wayland-1.13.0/src/wayland-client.c:411
#8  wl_proxy_destroy (proxy=proxy@entry=0x55a522cf9760) at /var/tmp/portage/dev-libs/wayland-1.13.0/work/wayland-1.13.0/src/wayland-client.c:442
#9  0x00007f2e4c014267 in org_kde_plasma_window_destroy (org_kde_plasma_window=0x55a522cf9760) at /var/tmp/portage/kde-frameworks/kwayland-9999/work/kwayland-9999_build/src/client/wayland-plasma-window-management-client-protocol.h:634
#10 KWayland::Client::WaylandPointer<org_kde_plasma_window, org_kde_plasma_window_destroy>::release (this=0x55a522cf2d40, this=0x55a522cf2d40) at /var/tmp/portage/kde-frameworks/kwayland-9999/work/kwayland-9999/src/client/wayland_pointer_p.h:53
Comment 7 Jagannathan Tiruvallur Eachambadi 2018-02-13 18:59:06 UTC
Created attachment 110625 [details]
New crash information added by DrKonqi

konsole (17.12.2) using Qt 5.10.0

- What I was doing when the application crashed:
I closed two windows of konsole and crash handler reported konsole had not exited cleanely.

- Custom settings of the application:
I have "Run all konsole windows in a single process" checked. So this crash is triggered when I close the last konsole window.

-- Backtrace (Reduced):
#6  0x00007fc9444af7e7 in wl_proxy_destroy () from /usr/lib/libwayland-client.so.0
#7  0x00007fc942e042e9 in KWayland::Client::PlasmaWindow::release() () from /usr/lib/libKF5WaylandClient.so.5
#8  0x00007fc942e0430b in KWayland::Client::PlasmaWindow::~PlasmaWindow() () from /usr/lib/libKF5WaylandClient.so.5
#9  0x00007fc942e0440a in KWayland::Client::PlasmaWindow::~PlasmaWindow() () from /usr/lib/libKF5WaylandClient.so.5
#10 0x00007fc952232bbd in QObjectPrivate::deleteChildren() () from /usr/lib/libQt5Core.so.5
Comment 8 Michail Vourlakos 2018-02-28 23:02:44 UTC
I get the same crash whenever I close Latte under wayland, do we know if this is the app fault or kwayland one?

Application: Latte Dock (latte-dock), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f99891988c0 (LWP 7943))]

Thread 1 (Thread 0x7f99891988c0 (LWP 7943)):
[KCrash Handler]
#4  0x00007f998096e5b9 in ?? () from /usr/lib/x86_64-linux-gnu/libwayland-client.so.0
#5  0x00007f998096a7be in wl_proxy_destroy () from /usr/lib/x86_64-linux-gnu/libwayland-client.so.0
#6  0x00007f99882ddbd7 in KWayland::Client::PlasmaWindow::release() () from /usr/lib/x86_64-linux-gnu/libKF5WaylandClient.so.5
#7  0x00007f99882ddbfa in KWayland::Client::PlasmaWindow::~PlasmaWindow() () from /usr/lib/x86_64-linux-gnu/libKF5WaylandClient.so.5
#8  0x00007f99882ddce9 in KWayland::Client::PlasmaWindow::~PlasmaWindow() () from /usr/lib/x86_64-linux-gnu/libKF5WaylandClient.so.5
#9  0x00007f998397df73 in QObjectPrivate::deleteChildren() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#10 0x00007f9983987e94 in QObject::~QObject() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#11 0x00007f99882de289 in KWayland::Client::PlasmaWindowManagement::~PlasmaWindowManagement() () from /usr/lib/x86_64-linux-gnu/libKF5WaylandClient.so.5
#12 0x00007f998397df73 in QObjectPrivate::deleteChildren() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#13 0x00007f9983987e94 in QObject::~QObject() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#14 0x00007f99642126a3 in ?? () from /usr/lib/x86_64-linux-gnu/qt5/plugins/kf5/org.kde.kwindowsystem.platforms/KF5WindowSystemKWaylandPlugin.so
#15 0x00007f9982a96ff8 in __run_exit_handlers (status=0, listp=0x7f9982e215f8 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true) at exit.c:82
#16 0x00007f9982a97045 in __GI_exit (status=<optimized out>) at exit.c:104
#17 0x00007f9982a7d837 in __libc_start_main (main=0x43cdd0 <main>, argc=2, argv=0x7ffe94c6fdb8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffe94c6fda8) at ../csu/libc-start.c:325
#18 0x000000000043ece9 in _start ()
Comment 9 Aleix Pol 2018-02-28 23:27:54 UTC
It's Qt & Wayland (somewhere in the stack). It's a lottery whether the application is going to crash. :(
Comment 10 Michail Vourlakos 2018-02-28 23:29:02 UTC
> It's Qt & Wayland (somewhere in the stack). It's a lottery whether the application is going to crash. :(

for Latte is happening always on exit... :(
Comment 11 Michail Vourlakos 2018-03-01 19:17:37 UTC
> It's Qt & Wayland (somewhere in the stack). It's a lottery whether the application is going to crash. :(

I tracked that down for Latte and also the Activity Pager. For Latte has nothing to do with Qt & Wayland. It is a faulty use of PlasmaWindowManagement.
infos can be found here: https://bugs.kde.org/show_bug.cgi?id=391263

I dont know of course if this is also the case for kate, does kate internally use PlasmaWindowManagement somehow?
Comment 12 Aleix Pol 2018-03-01 23:36:47 UTC
Discussing it with David (few months ago) suggested the issue to be in QtWayland, which all applications use.

Kate for example doesn't use any of this KWayland::Client and also gets the crash.
Comment 13 Michail Vourlakos 2018-03-02 08:00:56 UTC
> Discussing it with David (few months ago) suggested the issue to be in QtWayland, which all applications use.

I see... It might be of different origin, btw for Latte I fixed the mentioned crash when exiting the application.
Comment 14 Michail Vourlakos 2018-03-03 16:45:15 UTC
This crash is produced always with konsole when konsole has 2 or more tabs open and the user closes that window.
Comment 15 Christoph Cullmann 2018-07-14 14:32:52 UTC
Hmm, I don't see this as an Kate issue.
Somebody else must decide if KWayland, the integration or Qt, I am not familiar enough with that stuff.
Comment 16 Christoph Feck 2018-12-21 22:38:14 UTC

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