[okular] [Bug 396137] Okular hangs when scrolling fast on both pdf and djvu documents
https://bugs.kde.org/show_bug.cgi?id=396137 antonini44...@gmail.com changed: What|Removed |Added CC||antonini44...@gmail.com --- Comment #12 from antonini44...@gmail.com --- I think I discovered a cause for this, whuch is related to cgroups and limiting Okular RAM. My version of Okular is 1.7.2. My PC has 4 GB of RAM. I was often running into slowdowns because of thrashing very often. So I set up a few cgroups in order to actually take control of RAM. I put in cgroups preety much every program that used more than 100 MB. Okular often went over that much RAM because I viewed several PDF tabs. I set up cgroups according to https://askubuntu.com/questions/836469/install-cgconfig-in-ubuntu-16-04. I was tinkering with the cgroups and I settled for this cgroup config on Okular like this in /etc/cgconfig: group main/documents { memory { memory.limit_in_bytes = 7200; memory.soft_limit_in_bytes = 400; } } How did I find it out? Yesterday, I set up a Kubuntu VM. I was also testing Okular (Kubuntu came with Okular 1.7.3, I'm aware this bug wasn't patched on it) to try to make the bug happen. I copied to the VM a large PDF with hundreds of pages. I scrolled it for several minutes, page view set to fit width. I did it franticallu almost, but nothing happened. Surprisingly, Okular didn't slow down, nor did this bug triggered. Today I disabled the cgroup on Okular. I opened the same PDF, and I could not possibly trigger the bug either. I also noticed Okular beheves preety smoothly. When the cgroup was enabled, PDFs rendered noticeably slowly. Obviously! I just found Okular memory settings. I set it to run using as little as needed. Thanks Tobias Deiminger for patching out the bug in newer versions. I hope that this helps with anything. -- You are receiving this mail because: You are watching all bug changes.
[okular] [Bug 396137] Okular hangs when scrolling fast on both pdf and djvu documents
https://bugs.kde.org/show_bug.cgi?id=396137 Tobias Deiminger changed: What|Removed |Added Status|REPORTED|RESOLVED Latest Commit||https://invent.kde.org/kde/ ||okular/commit/593803b0a1d98 ||eba64aac38316aa521130b4ae78 Resolution|--- |FIXED --- Comment #11 from Tobias Deiminger --- Git commit 593803b0a1d98eba64aac38316aa521130b4ae78 by Tobias Deiminger. Committed on 30/01/2020 at 08:15. Pushed by aacid into branch 'release/19.12'. Fix render stop and high load due to timing issue Text generation is connected to pixmap generation thread started signal. However the signal may have been emitted faster than the connect could took place, and because started is fired only once, the connected lambda never got executed. generatePixmap tried to sync up with that never happening text generation anyway by means of scheduling itself. This lead to a infinite loop via a no more sleeping QEventLoop. Fixed by moving the connect in front of starting the thread. Related: bug 396087, bug 403643 M +2-2core/generator.cpp https://invent.kde.org/kde/okular/commit/593803b0a1d98eba64aac38316aa521130b4ae78 -- You are receiving this mail because: You are watching all bug changes.
[okular] [Bug 396137] Okular hangs when scrolling fast on both pdf and djvu documents
https://bugs.kde.org/show_bug.cgi?id=396137 Postix changed: What|Removed |Added CC||nortex...@gmail.com --- Comment #10 from Postix --- (In reply to Albert Astals Cid from comment #9) > *** Bug 403643 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
[okular] [Bug 396137] Okular hangs when scrolling fast on both pdf and djvu documents
https://bugs.kde.org/show_bug.cgi?id=396137 Albert Astals Cid changed: What|Removed |Added CC||sergio.calleg...@gmail.com --- Comment #9 from Albert Astals Cid --- *** Bug 403643 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
[okular] [Bug 396137] Okular hangs when scrolling fast on both pdf and djvu documents
https://bugs.kde.org/show_bug.cgi?id=396137 Postix changed: What|Removed |Added CC||pos...@posteo.eu -- You are receiving this mail because: You are watching all bug changes.
[okular] [Bug 396137] Okular hangs when scrolling fast on both pdf and djvu documents
https://bugs.kde.org/show_bug.cgi?id=396137 --- Comment #8 from Oliver Sander --- The problem just happened to me again, and from my extra debugging output I can now confirm that Albert's conjecture in Comment 6 is correct. No idea as to *why* that happens, though. -- You are receiving this mail because: You are watching all bug changes.
[okular] [Bug 396137] Okular hangs when scrolling fast on both pdf and djvu documents
https://bugs.kde.org/show_bug.cgi?id=396137 Elvis Angelaccio changed: What|Removed |Added CC||elvis.angelac...@kde.org -- You are receiving this mail because: You are watching all bug changes.
[okular] [Bug 396137] Okular hangs when scrolling fast on both pdf and djvu documents
https://bugs.kde.org/show_bug.cgi?id=396137 --- Comment #7 from Oliver Sander --- Okay, thanks. I've added a bit of screen output around these lines to see whether your conjecture is true. Unfortunately I cannot deliberately trigger the bug -- we'll have to wait until it comes out of hiding again. -- You are receiving this mail because: You are watching all bug changes.
[okular] [Bug 396137] Okular hangs when scrolling fast on both pdf and djvu documents
https://bugs.kde.org/show_bug.cgi?id=396137 --- Comment #6 from Albert Astals Cid --- Well, by reading the backtraces it seems you ended up in the if ( request->asynchronous() && hasFeature( Threaded ) ) { if ( d->textPageGenerationThread()->isFinished() && !canGenerateTextPage() ) { // It can happen that the text generation has already finished but // mTextPageReady is still false because textpageGenerationFinished // didn't have time to run, if so queue ourselves QTimer::singleShot(0, this, [this, request] { generatePixmap(request); }); situation but it never gets out of it. Figure out why that happens -- You are receiving this mail because: You are watching all bug changes.
[okular] [Bug 396137] Okular hangs when scrolling fast on both pdf and djvu documents
https://bugs.kde.org/show_bug.cgi?id=396137 Oliver Sander changed: What|Removed |Added CC||oliver.san...@tu-dresden.de --- Comment #5 from Oliver Sander --- This happens to me quite frequently with all sorts of pdf documents. My Okular version is compiled directly from the sources. Backtraces look very similar to what has already been posted here. Any ideas about what I could do to debug this? -- You are receiving this mail because: You are watching all bug changes.
[okular] [Bug 396137] Okular hangs when scrolling fast on both pdf and djvu documents
https://bugs.kde.org/show_bug.cgi?id=396137 Silvan Calarco changed: What|Removed |Added CC||silvan.cala...@mambasoft.it -- You are receiving this mail because: You are watching all bug changes.
[okular] [Bug 396137] Okular hangs when scrolling fast on both pdf and djvu documents
https://bugs.kde.org/show_bug.cgi?id=396137 Christoph Feck changed: What|Removed |Added Resolution|WAITINGFORINFO |--- Status|NEEDSINFO |UNCONFIRMED --- Comment #4 from Christoph Feck --- Thanks for the update; changing status. -- You are receiving this mail because: You are watching all bug changes.
[okular] [Bug 396137] Okular hangs when scrolling fast on both pdf and djvu documents
https://bugs.kde.org/show_bug.cgi?id=396137 --- Comment #3 from Max Sydorenko --- More bt with debug symbols this time: Attaching to process 8777 [New LWP 8778] [New LWP 8779] [New LWP 8781] [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib/libthread_db.so.1". 0x7ff1b89d70ba in ?? () from /usr/lib/libKF5XmlGui.so.5 (gdb) bt #0 0x7ff1b89d70ba in ?? () from /usr/lib/libKF5XmlGui.so.5 #1 0x7ff1b5e6689b in QCoreApplicationPrivate::sendThroughApplicationEventFilters(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5 #2 0x7ff1b7100ab2 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5 #3 0x7ff1b7108341 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5 #4 0x7ff1b5e66cb9 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5 #5 0x7ff1b5eb940a in QTimerInfoList::activateTimers() () from /usr/lib/libQt5Core.so.5 #6 0x7ff1b5eb9cca in ?? () from /usr/lib/libQt5Core.so.5 #7 0x7ff1aff6f368 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0 #8 0x7ff1aff6f5b1 in ?? () from /usr/lib/libglib-2.0.so.0 #9 0x7ff1aff6f63e in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0 #10 0x7ff1b5eba039 in QEventDispatcherGlib::processEvents(QFlags) () from /usr/lib/libQt5Core.so.5 #11 0x7ff1aa2bb722 in ?? () from /usr/lib/libQt5XcbQpa.so.5 #12 0x7ff1b5e6594c in QEventLoop::exec(QFlags) () from /usr/lib/libQt5Core.so.5 #13 0x7ff1b5e6dc46 in QCoreApplication::exec() () from /usr/lib/libQt5Core.so.5 #14 0x559a2e66372d in main (argc=, argv=) at /home/sydorenko/abs/okular-git/src/okular/shell/main.cpp:85 (gdb) continue Continuing. ^C Thread 1 "okular" received signal SIGINT, Interrupt. 0x7ff1b559dea9 in poll () from /usr/lib/libc.so.6 (gdb) bt #0 0x7ff1b559dea9 in poll () from /usr/lib/libc.so.6 #1 0x7ff1aff6f523 in ?? () from /usr/lib/libglib-2.0.so.0 #2 0x7ff1aff6f63e in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0 #3 0x7ff1b5eba039 in QEventDispatcherGlib::processEvents(QFlags) () from /usr/lib/libQt5Core.so.5 #4 0x7ff1aa2bb722 in ?? () from /usr/lib/libQt5XcbQpa.so.5 #5 0x7ff1b5e6594c in QEventLoop::exec(QFlags) () from /usr/lib/libQt5Core.so.5 #6 0x7ff1b5e6dc46 in QCoreApplication::exec() () from /usr/lib/libQt5Core.so.5 #7 0x559a2e66372d in main (argc=, argv=) at /home/sydorenko/abs/okular-git/src/okular/shell/main.cpp:85 (gdb) continue Continuing. ^C Thread 1 "okular" received signal SIGINT, Interrupt. 0x7ff19c100413 in Okular::PixmapRequest::isTile (this=this@entry=0x559a30d53d10) at /home/sydorenko/abs/okular-git/src/okular/core/generator.cpp:649 649 /home/sydorenko/abs/okular-git/src/okular/core/generator.cpp: Немає такого файла або каталогу. (gdb) bt #0 0x7ff19c100413 in Okular::PixmapRequest::isTile (this=this@entry=0x559a30d53d10) at /home/sydorenko/abs/okular-git/src/okular/core/generator.cpp:649 #1 0x7ff19c102159 in Okular::Generator::generatePixmap (this=0x559a3072a580, request=0x559a30d53d10) at /home/sydorenko/abs/okular-git/src/okular/core/generator.cpp:269 #2 0x7ff1b5e9ccc7 in ?? () from /usr/lib/libQt5Core.so.5 #3 0x7ff1b5e9138b in QObject::event(QEvent*) () from /usr/lib/libQt5Core.so.5 #4 0x7ff1b7100a74 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5 #5 0x7ff1b7108341 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5 #6 0x7ff1b5e66cb9 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5 #7 0x7ff1b5eb940a in QTimerInfoList::activateTimers() () from /usr/lib/libQt5Core.so.5 #8 0x7ff1b5eb9cca in ?? () from /usr/lib/libQt5Core.so.5 #9 0x7ff1aff6f368 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0 #10 0x7ff1aff6f5b1 in ?? () from /usr/lib/libglib-2.0.so.0 #11 0x7ff1aff6f63e in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0 #12 0x7ff1b5eba039 in QEventDispatcherGlib::processEvents(QFlags) () from /usr/lib/libQt5Core.so.5 #13 0x7ff1aa2bb722 in ?? () from /usr/lib/libQt5XcbQpa.so.5 #14 0x7ff1b5e6594c in QEventLoop::exec(QFlags) () from /usr/lib/libQt5Core.so.5 #15 0x7ff1b5e6dc46 in QCoreApplication::exec() () from /usr/lib/libQt5Core.so.5 #16 0x559a2e66372d in main (argc=, argv=) at /home/sydorenko/abs/okular-git/src/okular/shell/main.cpp:85 (gdb) continue Continuing. ^C Thread 1 "okular" received signal SIGINT, Interrupt. 0x7ff1b5598fe5 in _xstat () from /usr/lib/libc.so.6 (gdb) bt #0 0x7ff1b5598fe5 in _xstat () from /usr/lib/libc.so.6 #1 0x7ff1b55660c1 in __tzfile_read () from /usr/lib/libc.so.6 #2 0x7ff1b5565c51 in tzset_internal () from /usr/lib/libc.so.6 #3 0x7ff1b5565d9d in tzset () from /usr/lib/libc.so.6 #4 0x7ff1b5cf2135 in ?? () from /usr/lib/libQt5Core.so.5 #5
[okular] [Bug 396137] Okular hangs when scrolling fast on both pdf and djvu documents
https://bugs.kde.org/show_bug.cgi?id=396137 --- Comment #2 from Max Sydorenko --- I can not attach directly document I used to reproduce this bug because of size limitations, but it is freely available for download: https://www.intel.com/content/dam/www/public/us/en/documents/datasheets/5-chipset-3400-chipset-datasheet.pdf Backtrace results (unfortunately most of the debug info and symbols are stripped, but may be it is possible to figure out something from that. I will be able to build debug version of Okular later) Attaching to process 26698 [New LWP 26699] [New LWP 26700] [New LWP 26703] [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib/libthread_db.so.1". 0x7f254c6fa420 in ?? () from /usr/lib/libglib-2.0.so.0 (gdb) bt #0 0x7f254c6fa420 in ?? () from /usr/lib/libglib-2.0.so.0 #1 0x7f254c6fc983 in g_main_context_prepare () from /usr/lib/libglib-2.0.so.0 #2 0x7f254c6fd44e in ?? () from /usr/lib/libglib-2.0.so.0 #3 0x7f254c6fd63e in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0 #4 0x7f2552648039 in QEventDispatcherGlib::processEvents(QFlags) () from /usr/lib/libQt5Core.so.5 #5 0x7f2546a49722 in ?? () from /usr/lib/libQt5XcbQpa.so.5 #6 0x7f25525f394c in QEventLoop::exec(QFlags) () from /usr/lib/libQt5Core.so.5 #7 0x7f25525fbc46 in QCoreApplication::exec() () from /usr/lib/libQt5Core.so.5 #8 0x56368e0da685 in ?? () #9 0x7f2551c6106b in __libc_start_main () from /usr/lib/libc.so.6 #10 0x56368e0dbd4a in _start () (gdb) continue Continuing. ^C Thread 1 "okular" received signal SIGINT, Interrupt. 0x7f25526250ca in QObjectPrivate::setParent_helper(QObject*) () from /usr/lib/libQt5Core.so.5 (gdb) bt #0 0x7f25526250ca in QObjectPrivate::setParent_helper(QObject*) () from /usr/lib/libQt5Core.so.5 #1 0x7f25526259cb in QObject::~QObject() () from /usr/lib/libQt5Core.so.5 #2 0x7f255262ae41 in ?? () from /usr/lib/libQt5Core.so.5 #3 0x7f255262acd0 in ?? () from /usr/lib/libQt5Core.so.5 #4 0x7f255261f38b in QObject::event(QEvent*) () from /usr/lib/libQt5Core.so.5 #5 0x7f255388ea74 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5 #6 0x7f2553896341 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5 #7 0x7f25525f4cb9 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5 #8 0x7f255264740a in QTimerInfoList::activateTimers() () from /usr/lib/libQt5Core.so.5 #9 0x7f2552647cca in ?? () from /usr/lib/libQt5Core.so.5 #10 0x7f254c6fd368 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0 #11 0x7f254c6fd5b1 in ?? () from /usr/lib/libglib-2.0.so.0 #12 0x7f254c6fd63e in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0 #13 0x7f2552648039 in QEventDispatcherGlib::processEvents(QFlags) () from /usr/lib/libQt5Core.so.5 #14 0x7f2546a49722 in ?? () from /usr/lib/libQt5XcbQpa.so.5 #15 0x7f25525f394c in QEventLoop::exec(QFlags) () from /usr/lib/libQt5Core.so.5 #16 0x7f25525fbc46 in QCoreApplication::exec() () from /usr/lib/libQt5Core.so.5 #17 0x56368e0da685 in ?? () #18 0x7f2551c6106b in __libc_start_main () from /usr/lib/libc.so.6 #19 0x56368e0dbd4a in _start () (gdb) continue Continuing. ^C Thread 1 "okular" received signal SIGINT, Interrupt. 0x7f25524b3388 in QtSharedPointer::ExternalRefCountData::getAndRef(QObject const*) () from /usr/lib/libQt5Core.so.5 (gdb) bt #0 0x7f25524b3388 in QtSharedPointer::ExternalRefCountData::getAndRef(QObject const*) () from /usr/lib/libQt5Core.so.5 #1 0x7f255262b2f3 in ?? () from /usr/lib/libQt5Core.so.5 #2 0x7f255262b474 in QTimer::singleShotImpl(int, Qt::TimerType, QObject const*, QtPrivate::QSlotObjectBase*) () from /usr/lib/libQt5Core.so.5 #3 0x7f25384359a4 in Okular::Generator::generatePixmap(Okular::PixmapRequest*) () from /usr/lib/libOkular5Core.so.9 #4 0x7f255262acc7 in ?? () from /usr/lib/libQt5Core.so.5 #5 0x7f255261f38b in QObject::event(QEvent*) () from /usr/lib/libQt5Core.so.5 #6 0x7f255388ea74 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5 #7 0x7f2553896341 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5 #8 0x7f25525f4cb9 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5 #9 0x7f255264740a in QTimerInfoList::activateTimers() () from /usr/lib/libQt5Core.so.5 #10 0x7f2552647cca in ?? () from /usr/lib/libQt5Core.so.5 #11 0x7f254c6fd368 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0 #12 0x7f254c6fd5b1 in ?? () from /usr/lib/libglib-2.0.so.0 #13 0x7f254c6fd63e in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0 #14 0x7f2552648039 in QEventDispatcherGlib::processEvents(QFlags) () from /usr/lib/libQt5Core.so.5 #15 0x7f2546a49722 in ?? () from
[okular] [Bug 396137] Okular hangs when scrolling fast on both pdf and djvu documents
https://bugs.kde.org/show_bug.cgi?id=396137 Albert Astals Cid changed: What|Removed |Added CC||aa...@kde.org Status|UNCONFIRMED |NEEDSINFO Resolution|--- |WAITINGFORINFO --- Comment #1 from Albert Astals Cid --- Please attach one of the documents you're using to reproduce this. Also it would be great if you could do this, while you have caused okular to be looping at 100% CPU open a terminal and type gdb attach `pidof okular` if it complains it can't you will need to run that as root (i.e use sudo or su to become root) Once you're inside the gdb command line do type bt continue press Ctrl+C bt continue press Ctrl+C do this a few times And paste here the output of the bt commands, this may help finding out where it is hanging. -- You are receiving this mail because: You are watching all bug changes.
[okular] [Bug 396137] Okular hangs when scrolling fast on both pdf and djvu documents
https://bugs.kde.org/show_bug.cgi?id=396137 Max Sydorenko changed: What|Removed |Added CC||maxim.starga...@gmail.com -- You are receiving this mail because: You are watching all bug changes.