Bug 430190 - Crash when moving sidebar on Wayland
Summary: Crash when moving sidebar on Wayland
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 21.04.2
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2020-12-09 17:51 UTC by Martino Fontana
Modified: 2023-01-15 09:46 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martino Fontana 2020-12-09 17:51:37 UTC
Application: okular (1.11.2)

Qt Version: 5.14.2
Frameworks Version: 5.74.0
Operating System: Linux 5.8.0-31-generic x86_64
Windowing system: Wayland
Distribution: Ubuntu 20.10

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

Open any file;
Resize the sidebar, better if you resize it wildly;
Okular becomes unresponsive and then crashes.

The crash can be reproduced every time.

-- Backtrace:
Application: Okular (okular), signal: Aborted

[KCrash Handler]
#4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:49
#5  0x00007fd64f181864 in __GI_abort () at abort.c:79
#6  0x00007fd64f5b6ba3 in QMessageLogger::fatal(char const*, ...) const () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007fd64b5cb8b5 in ?? () from /lib/x86_64-linux-gnu/libQt5WaylandClient.so.5
#8  0x00007fd64b5dc0de in QtWaylandClient::QWaylandDisplay::flushRequests() () from /lib/x86_64-linux-gnu/libQt5WaylandClient.so.5
#9  0x00007fd64f809320 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#10 0x00007fd64f80c8b5 in QSocketNotifier::activated(int, QSocketNotifier::QPrivateSignal) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#11 0x00007fd64f80cc51 in QSocketNotifier::event(QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#12 0x00007fd650313013 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#13 0x00007fd64f7d31ca in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#14 0x00007fd64f82b425 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#15 0x00007fd64df3d4db in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#16 0x00007fd64df3d788 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#17 0x00007fd64df3d853 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#18 0x00007fd64f82a843 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#19 0x00007fd64f7d1a4b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#20 0x00007fd64f7d9fc6 in QCoreApplication::exec() () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#21 0x0000557cb5963d7a in ?? ()
#22 0x00007fd64f183cb2 in __libc_start_main (main=0x557cb5963660, argc=2, argv=0x7ffefc493ca8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffefc493c98) at ../csu/libc-start.c:314
#23 0x0000557cb5964b1e in ?? ()
[Inferior 1 (process 8872) detached]

The reporter indicates this bug may be a duplicate of or related to bug 389411.

Possible duplicates by query: bug 429344, bug 427384, bug 424911, bug 423951, bug 423222.

Reported using DrKonqi
Comment 1 Albert Astals Cid 2020-12-09 18:58:48 UTC
Can you please run it from the command line and attach the output?
Comment 2 Martino Fontana 2020-12-09 19:34:34 UTC
$ okular
This plugin supports grabbing the mouse only for popup windows
This plugin supports grabbing the mouse only for popup windows
The Wayland connection broke. Did the Wayland compositor die?
KCrash: crashing... crashRecursionCounter = 2
KCrash: Application Name = okular path = /usr/bin pid = 27468
KCrash: Arguments: /usr/bin/okular 
KCrash: Attempting to start /usr/lib/x86_64-linux-gnu/libexec/drkonqi

[1]+  Stopped                 okular


I didn't open a file when reproducing this.
Comment 3 Albert Astals Cid 2020-12-09 20:41:18 UTC
Wayland people, some help?
Comment 4 Méven Car 2020-12-15 10:42:08 UTC
I don't reproduce it with Qt 5.15.2, KWin 20.80 (Plasma 5.21 master).
My guess is the bug has already been ironed out.
Wayland stability is making strides with each Plasma and Qt update.

But I can't be sure.

Does anyone else reproduce it with Kubuntu 20.10 Wayland (Plasma 5.19) ?

Is the crash reproducible in KDE Neon stable (Plasma 5.20) ?
Comment 5 Laura David Hurka 2020-12-15 17:51:57 UTC
I use KDE Neon user edition, with Plasma 5.20.4 and Qt 5.15.2, and various Okular versions (git master, neon packages, whatever updated last).

I don’t remember any such crash, although I often move the slider.

> Resize the sidebar, better if you resize it wildly;
Apparently Okular writes to disk when the slider is moved, maybe it happens only with HDDs?
Comment 6 Méven Car 2020-12-17 10:40:39 UTC
(In reply to David Hurka from comment #5)
> I use KDE Neon user edition, with Plasma 5.20.4 and Qt 5.15.2, and various
> Okular versions (git master, neon packages, whatever updated last).
> 
> I don’t remember any such crash, although I often move the slider.
> 
> > Resize the sidebar, better if you resize it wildly;
> Apparently Okular writes to disk when the slider is moved, maybe it happens
> only with HDDs?

The trace does not suggest that. flushing in Wayland means sending client buffered requests to Wayland server.

But okular should be writing to disk when a user changes the UI, just for the sake of saving the new setting.

If no one else can reproduce it with a current version of Plasma I will resolves this as WORKFORME.
Comment 7 Bug Janitor Service 2021-01-01 04:39:14 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 8 Bug Janitor Service 2021-01-16 04:37:57 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now 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

Thank you for helping us make KDE software even better for everyone!
Comment 9 Martino Fontana 2021-03-12 09:55:59 UTC
I'm on Kubuntu 21.04 now, with KDE 5.21.2, and still reproduce the bug on Okular 20.12.3. Also happens only on Wayland, doesn't happen on Xorg. And yes, I have an HDD.
I don't know I should make it a duplicate of bug 427913.
Still, the backtrace:

Application: Okular (okular), signal: Aborted

[KCrash Handler]
#4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:49
#5  0x00007f3d37ad7864 in __GI_abort () at abort.c:79
#6  0x00007f3d37f49c43 in QMessageLogger::fatal(char const*, ...) const () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007f3d3660bd39 in ?? () from /lib/x86_64-linux-gnu/libQt5WaylandClient.so.5
#8  0x00007f3d3661af9a in QtWaylandClient::QWaylandDisplay::flushRequests() () from /lib/x86_64-linux-gnu/libQt5WaylandClient.so.5
#9  0x00007f3d381a6b44 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#10 0x00007f3d381aa0b3 in QSocketNotifier::activated(QSocketDescriptor, QSocketNotifier::Type, QSocketNotifier::QPrivateSignal) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#11 0x00007f3d381aa8e3 in QSocketNotifier::event(QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#12 0x00007f3d38cd6173 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#13 0x00007f3d3816f22a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#14 0x00007f3d381c9195 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#15 0x00007f3d3686301b in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#16 0x00007f3d368632c8 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#17 0x00007f3d36863393 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#18 0x00007f3d381c8594 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#19 0x00007f3d3816db8b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#20 0x00007f3d38176024 in QCoreApplication::exec() () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#21 0x000056231d6efb3a in ?? ()
#22 0x00007f3d37ad9565 in __libc_start_main (main=0x56231d6ef420, argc=1, argv=0x7ffc48165b38, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffc48165b28) at ../csu/libc-start.c:332
#23 0x000056231d6f08de in ?? ()
[Inferior 1 (process 41013) detached]
Comment 10 Martino Fontana 2021-06-14 22:42:29 UTC
Still can reproduce it as of Okular 21.04.2 (KDE 5.22) on Kubuntu 21.04.
Comment 11 Martino Fontana 2022-07-11 19:32:38 UTC
Can still reproduce on Okular 22.04.2 (Plasma 5.25.2).
I'm on a much better computer, so moving the sidebar doesn't crash Okular anymore, but the high disk write is noticeable on System Monitor.
(I'll also repeat that the bug is only on Wayland)
Comment 12 Martino Fontana 2023-01-13 15:16:21 UTC
Still on issue on Okular 22.12.1 (Plasma 5.26.5).
Comment 13 Méven 2023-01-15 09:46:47 UTC
(In reply to Martino Fontana from comment #11)
> Can still reproduce on Okular 22.04.2 (Plasma 5.25.2).
> I'm on a much better computer, so moving the sidebar doesn't crash Okular
> anymore, 

Please open a separate bug as the issue you are reporting is not the same and is unrelated.

> but the high disk write is noticeable on System Monitor.
> (I'll also repeat that the bug is only on Wayland)

It seems okular simply recomputes the document preview as the user resize the sidebar and must be caching it on disk.
It is pretty much expected behavior.
It would be surprising this happens only on Wayland, then it would mean okular is doing something wrong in Wayland.
It is also a lot less severe than a crash.
That's why this should be tracked separately.