Bug 378708 - [Wayland] Konversation blocks the GUI thread causing Wayland socket buffer fill up
Summary: [Wayland] Konversation blocks the GUI thread causing Wayland socket buffer fi...
Status: RESOLVED FIXED
Alias: None
Product: konversation
Classification: Applications
Component: general (show other bugs)
Version: 1.7.4
Platform: Other Linux
: NOR crash
Target Milestone: ---
Assignee: Konversation Developers
URL:
Keywords: wayland
: 418730 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-04-12 17:37 UTC by Germano Massullo
Modified: 2020-12-02 09:35 UTC (History)
6 users (show)

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


Attachments
WAYLAND_DEBUG=1 konversation |& tee output.out (130.03 KB, application/x-xz)
2017-04-12 18:10 UTC, Germano Massullo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Germano Massullo 2017-04-12 17:37:50 UTC
Konversation 1.6.2 crashes on Wayland.
Video driver: amdgpu
 

$ gdb konversation
GNU gdb (GDB) Fedora 7.12.1-47.fc25
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from konversation...Reading symbols from /usr/lib/debug/usr/bin/konversation.debug...done.
done.
(gdb) run
Starting program: /usr/bin/konversation 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
QObject::connect: invalid null parameter
[New Thread 0x7fffdaabc700 (LWP 23080)]
[New Thread 0x7fffd96a5700 (LWP 23081)]
[New Thread 0x7fffd1216700 (LWP 23083)]
[New Thread 0x7fffd0810700 (LWP 23084)]
[New Thread 0x7fffc947c700 (LWP 23085)]
[New Thread 0x7fffc8c7b700 (LWP 23086)]
[New Thread 0x7fffc847a700 (LWP 23087)]
[New Thread 0x7fffc45a9700 (LWP 23088)]
[New Thread 0x7fffc3b59700 (LWP 23089)]
[New Thread 0x7fffc3356700 (LWP 23090)]
[New Thread 0x7fffc2b55700 (LWP 23091)]
[New Thread 0x7fffc2354700 (LWP 23092)]


[Thread 0x7fffc3356700 (LWP 23090) exited]
[Thread 0x7fffc2354700 (LWP 23092) exited]
[Thread 0x7fffc3b59700 (LWP 23089) exited]
[Thread 0x7fffc45a9700 (LWP 23088) exited]
[Thread 0x7fffc2b55700 (LWP 23091) exited]
sonnet.core: No language dictionaries for the language: "it"
The Wayland connection broke. Did the Wayland compositor die?

Thread 2 "QDBusConnection" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffdaabc700 (LWP 23080)]
0x00007ffff1b79f8d in QObject::disconnect (sender=0x7fffcc004ed0, signal=signal@entry=0x0, receiver=receiver@entry=0x7fffd4011cc0, method=method@entry=0x0) at kernel/qobject.cpp:2956
2956        const QMetaObject *smeta = sender->metaObject();
(gdb) thread apply all backtrace

Thread 8 (Thread 0x7fffc847a700 (LWP 23087)):
#0  0x00007fffef984460 in pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007fffd26d4c5b in cnd_wait (mtx=0x55555607aa78, cond=0x55555607aaa0) at ../../../include/c11/threads_posix.h:159
#2  0x00007fffd26d4c5b in util_queue_thread_func (input=input@entry=0x555555f620b0) at util/u_queue.c:76
#3  0x00007fffd26d4ab7 in impl_thrd_routine (p=<optimized out>) at ../../../include/c11/threads_posix.h:87
#4  0x00007fffef97e6ca in start_thread (arg=0x7fffc847a700) at pthread_create.c:333
#5  0x00007ffff0da0f7f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:105

Thread 7 (Thread 0x7fffc8c7b700 (LWP 23086)):
#0  0x00007fffef984460 in pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007fffd26d4c5b in cnd_wait (mtx=0x55555607aa78, cond=0x55555607aaa0) at ../../../include/c11/threads_posix.h:159
#2  0x00007fffd26d4c5b in util_queue_thread_func (input=input@entry=0x555555f620b0) at util/u_queue.c:76
#3  0x00007fffd26d4ab7 in impl_thrd_routine (p=<optimized out>) at ../../../include/c11/threads_posix.h:87
#4  0x00007fffef97e6ca in start_thread (arg=0x7fffc8c7b700) at pthread_create.c:333
#5  0x00007ffff0da0f7f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:105

Thread 6 (Thread 0x7fffc947c700 (LWP 23085)):
#0  0x00007fffef984460 in pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007fffd26d4c5b in cnd_wait (mtx=0x55555607aa78, cond=0x55555607aaa0) at ../../../include/c11/threads_posix.h:159
#2  0x00007fffd26d4c5b in util_queue_thread_func (input=input@entry=0x555555f620b0) at util/u_queue.c:76
#3  0x00007fffd26d4ab7 in impl_thrd_routine (p=<optimized out>) at ../../../include/c11/threads_posix.h:87
#4  0x00007fffef97e6ca in start_thread (arg=0x7fffc947c700) at pthread_create.c:333
#5  0x00007ffff0da0f7f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:105

Thread 5 (Thread 0x7fffd0810700 (LWP 23084)):
#0  0x00007fffef984460 in pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007fffd26d4c5b in cnd_wait (mtx=0x55555607aa78, cond=0x55555607aaa0) at ../../../include/c11/threads_posix.h:159
---Type <return> to continue, or q <return> to quit---
#2  0x00007fffd26d4c5b in util_queue_thread_func (input=input@entry=0x555555f620b0) at util/u_queue.c:76
#3  0x00007fffd26d4ab7 in impl_thrd_routine (p=<optimized out>) at ../../../include/c11/threads_posix.h:87
#4  0x00007fffef97e6ca in start_thread (arg=0x7fffd0810700) at pthread_create.c:333
#5  0x00007ffff0da0f7f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:105

Thread 4 (Thread 0x7fffd1216700 (LWP 23083)):
#0  0x00007fffef984460 in pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007fffd26d4c5b in cnd_wait (mtx=0x5555560795d8, cond=0x555556079600) at ../../../include/c11/threads_posix.h:159
#2  0x00007fffd26d4c5b in util_queue_thread_func (input=input@entry=0x555555f4ddc0) at util/u_queue.c:76
#3  0x00007fffd26d4ab7 in impl_thrd_routine (p=<optimized out>) at ../../../include/c11/threads_posix.h:87
#4  0x00007fffef97e6ca in start_thread (arg=0x7fffd1216700) at pthread_create.c:333
#5  0x00007ffff0da0f7f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:105

Thread 3 (Thread 0x7fffd96a5700 (LWP 23081)):
#0  0x00007ffff0d9501d in poll () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007fffea3df166 in g_main_context_poll (priority=<optimized out>, n_fds=1, fds=0x7fffcc003070, timeout=<optimized out>, context=0x7fffcc000990) at gmain.c:4228
#2  0x00007fffea3df166 in g_main_context_iterate (context=context@entry=0x7fffcc000990, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3924
#3  0x00007fffea3df27c in g_main_context_iteration (context=0x7fffcc000990, may_block=may_block@entry=1) at gmain.c:3990
#4  0x00007ffff1b9d6cf in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7fffcc0008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#5  0x00007ffff1b4e68a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7fffd96a4c80, flags=..., flags@entry=...) at kernel/qeventloop.cpp:212
#6  0x00007ffff19ab5e3 in QThread::exec() (this=<optimized out>) at thread/qthread.cpp:507
#7  0x00007ffff19af9ca in QThreadPrivate::start(void*) (arg=0x555555fa05e0) at thread/qthread_unix.cpp:368
#8  0x00007fffef97e6ca in start_thread (arg=0x7fffd96a5700) at pthread_create.c:333
#9  0x00007ffff0da0f7f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:105

Thread 2 (Thread 0x7fffdaabc700 (LWP 23080)):
#0  0x00007ffff1b79f8d in QObject::disconnect(QObject const*, char const*, QObject const*, char const*) (sender=0x7fffcc004ed0, signal=signal@entry=0x0, receiver=receiver@entry=0x7fffd4011cc0, method=method@entry=0x0) at kernel/qobject.cpp:2956
---Type <return> to continue, or q <return> to quit---
#1  0x00007ffff1dbbfb0 in QObject::disconnect(QObject const*, char const*) const (member=0x0, receiver=0x7fffd4011cc0, this=<optimized out>) at ../../src/corelib/kernel/qobject.h:336
#2  0x00007ffff1dbbfb0 in QDBusConnectionPrivate::closeConnection() (this=this@entry=0x7fffd4011cc0) at qdbusintegrator.cpp:1145
#3  0x00007ffff1da8852 in QDBusConnectionManager::run() (this=0x7ffff1e1e060 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at qdbusconnection.cpp:188
#4  0x00007ffff19af9ca in QThreadPrivate::start(void*) (arg=0x7ffff1e1e060 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread_unix.cpp:368
#5  0x00007fffef97e6ca in start_thread (arg=0x7fffdaabc700) at pthread_create.c:333
#6  0x00007ffff0da0f7f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:105

Thread 1 (Thread 0x7fffe5127e00 (LWP 23076)):
#0  0x00007fffef984460 in pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007ffff19b004a in QWaitConditionPrivate::wait(unsigned long) (time=18446744073709551615, this=0x555555fa12b0) at thread/qwaitcondition_unix.cpp:143
#2  0x00007ffff19b004a in QWaitCondition::wait(QMutex*, unsigned long) (this=this@entry=0x555555fa1290, mutex=mutex@entry=0x555555fa1270, time=time@entry=18446744073709551615)
    at thread/qwaitcondition_unix.cpp:215
#3  0x00007ffff19af5ce in QThread::wait(unsigned long) (this=this@entry=0x7ffff1e1e060 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>, time=time@entry=18446744073709551615) at thread/qthread_unix.cpp:698
#4  0x00007ffff1da85a6 in QDBusConnectionManager::~QDBusConnectionManager() (this=0x7ffff1e1e060 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>, __in_chrg=<optimized out>) at qdbusconnection.cpp:157
#5  0x00007ffff1da8639 in (anonymous namespace)::Q_QGS__q_manager::Holder::~Holder() (this=<optimized out>, __in_chrg=<optimized out>) at qdbusconnection.cpp:76
#6  0x00007ffff0cd3410 in __run_exit_handlers (status=status@entry=1, listp=0x7ffff10595b8 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true, run_dtors=run_dtors@entry=true)
    at exit.c:83
#7  0x00007ffff0cd346a in __GI_exit (status=status@entry=1) at exit.c:105
#8  0x00007fffde59194e in QtWaylandClient::QWaylandDisplay::exitWithError() (this=this@entry=0x555555f294b0) at qwaylanddisplay.cpp:200
#9  0x00007fffde5919a6 in QtWaylandClient::QWaylandDisplay::flushRequests() (this=0x555555f294b0) at qwaylanddisplay.cpp:183
#10 0x00007ffff1b76721 in QMetaObject::activate(QObject*, int, int, void**) (sender=sender@entry=0x555555fcb080, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x0) at kernel/qobject.cpp:3740
#11 0x00007ffff1b76fc7 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (sender=sender@entry=0x555555fcb080, m=m@entry=0x7ffff1d8b9a0 <QAbstractEventDispatcher::staticMetaObject>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x0) at kernel/qobject.cpp:3602
#12 0x00007ffff1be5f33 in QAbstractEventDispatcher::awake() (this=this@entry=0x555555fcb080) at .moc/moc_qabstracteventdispatcher.cpp:143
#13 0x00007ffff1b9d70e in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x555555fcb080, flags=...) at kernel/qeventdispatcher_glib.cpp:430
---Type <return> to continue, or q <return> to quit---
#14 0x00007ffff1b4e68a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7fffffffdb80, flags=..., flags@entry=...) at kernel/qeventloop.cpp:212
#15 0x00007ffff1b5618c in QCoreApplication::exec() () at kernel/qcoreapplication.cpp:1261
#16 0x000055555563b99e in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/konversation-1.6.2/src/main.cpp:163
(gdb)
Comment 1 Germano Massullo 2017-04-12 18:10:27 UTC
Created attachment 104995 [details]
WAYLAND_DEBUG=1 konversation |& tee output.out
Comment 2 David Edmundson 2017-04-13 11:07:17 UTC
Please report that crash to Qt
Comment 3 Germano Massullo 2017-04-13 11:14:06 UTC
(In reply to David Edmundson from comment #2)
> Please report that crash to Qt

Which Qt component?
Comment 4 Rex Dieter 2017-04-13 14:21:56 UTC
qtwayland component (I assume)
Comment 5 Germano Massullo 2017-04-13 14:24:36 UTC
https://bugreports.qt.io/browse/QTBUG-60170
Comment 6 Germano Massullo 2017-11-16 18:53:41 UTC
I am insisting in upstream bugreport, since it happens also on Qt 5.9.
Previously the bugreport did not get much attention due older Qt release
Comment 8 Germano Massullo 2018-05-07 13:07:05 UTC
I just had a talk with Qt developer Johan Helsing. He found out what is the problem and I do confirm his analysis


<johanhelsing>if the client blocks the ui and then the compositor keeps sending mouse move events until the socket fills up and breaks
<johanhelsing> the solution is probably to move whatever is blocking the ui for several seconds to a separate thread.

See
https://bugreports.qt.io/browse/QTBUG-66997
Comment 9 magiblot 2020-04-21 01:31:15 UTC
*** Bug 418730 has been marked as a duplicate of this bug. ***
Comment 10 Justin Zobel 2020-12-02 06:51:46 UTC
Seems this one was closed as a duplicate of https://bugreports.qt.io/browse/QTBUG-66997 but that was closed as "Out of scope".

Germano, can you please check if this crash still happening for you?
Comment 11 Germano Massullo 2020-12-02 08:40:55 UTC
I am not able to reproduce the crash
konversation 1.7.6
Comment 12 Justin Zobel 2020-12-02 09:35:28 UTC
Thanks Germano. I'm going to mark this bug as resolved, if the issue returns for yourself or others feel free to reopen this report.