Bug 345684 - Okular hangs after adding an annotation and choosing Save As
Summary: Okular hangs after adding an annotation and choosing Save As
Status: RESOLVED WORKSFORME
Alias: None
Product: okular
Classification: Applications
Component: PDF backend (show other bugs)
Version: 0.19.3
Platform: Ubuntu Linux
: NOR major
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2015-03-30 07:35 UTC by Luke Kendall
Modified: 2018-10-27 03:41 UTC (History)
5 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 Luke Kendall 2015-03-30 07:35:30 UTC
I'm running Ubuntu 14.04.2 kernel 3.13.0-46-generic on an Intel 64 bit NUC, and Gnome.
I ran Okular on a PDF with annotations, added three test annotations, and selected Close.
It warned me that my changes would be lost unless I chose to Save.  I clicked OK, and the WorkRave "you need a short break" warning popped up at that instant.  Okular was then locked in a Device-wait state and could not be killed, even with a kill -9.
I tried running a new okular process, and nothing happened.
I killed the three KDE processes:
2302 ?        Ss     0:00 kdeinit4: kdeinit4 Runnin e
 2305 ?        S      0:00 kdeinit4: klauncher [kdei e
 2307 ?        Sl     0:00 kdeinit4: kded4 [kdeinit]  
and tried running a new okular process.  It worked.
I added a single annotation, and chose Save As.  Without even popping up a panel, Okular then hung.  I could kill it that time, with a kill -9 however.

Reproducible: Always

Steps to Reproduce:
1. Open a .pdf file, with or without annotation.
2. Make any annotation.
3. Choose Save As

Actual Results:  
Okular locks up.
Usually you can then kill it via a kill -9.

Expected Results:  
I expected to see a Save As panel, to enter a filename, and save a modified pdf file.

Some output that appears when running okular:
 okular(3987)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
okular(3987)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
okular(3987)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
okular(3987)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
okular(3987)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
This backend is only for XRandR 1.1, your version is:  1 . 4 
Object::connect: No such signal org::freedesktop::UPower::DeviceAdded(QDBusObjectPath)
Object::connect: No such signal org::freedesktop::UPower::DeviceRemoved(QDBusObjectPath)

Those last two lines appear when I select Save As or Save A Copy As.
Comment 1 Albert Astals Cid 2015-03-30 17:45:22 UTC
Those two lines don't mean anything. Please run

gdb okular
(gdb) run
.. make it hang ...
Ctrl+C
(gdb) bt

And paste the output of bt here.
Comment 2 Luke Kendall 2015-04-02 01:08:24 UTC
Sorry for the delay.  Here it is, below.  Note that no Save panel pops up - okular simply hangs.

Starting program: /usr/bin/okular 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffe2383700 (LWP 14451)]
[New Thread 0x7fffe1b82700 (LWP 14452)]
[New Thread 0x7fffe1381700 (LWP 14453)]
[New Thread 0x7fffe0b80700 (LWP 14454)]
[New Thread 0x7fffc7f78700 (LWP 14456)]
[Thread 0x7fffe1381700 (LWP 14453) exited]
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
kbuildsycoca4 running...
okular(14447)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
okular(14447)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
okular(14447)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
okular(14447)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
okular(14447)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
[Thread 0x7fffe0b80700 (LWP 14454) exited]
This backend is only for XRandR 1.1, your version is:  1 . 4 
[New Thread 0x7fffe0b80700 (LWP 3931)]
[New Thread 0x7fffe1381700 (LWP 3932)]
[Thread 0x7fffe1381700 (LWP 3932) exited]
[Thread 0x7fffe0b80700 (LWP 3931) exited]
[New Thread 0x7fffe0b80700 (LWP 3933)]
[New Thread 0x7fffe1381700 (LWP 3934)]
[Thread 0x7fffe1381700 (LWP 3934) exited]
[Thread 0x7fffe0b80700 (LWP 3933) exited]
[New Thread 0x7fffe0b80700 (LWP 3935)]
[Thread 0x7fffe0b80700 (LWP 3935) exited]
[New Thread 0x7fffe0b80700 (LWP 3936)]
[Thread 0x7fffe0b80700 (LWP 3936) exited]
[New Thread 0x7fffe0b80700 (LWP 3938)]
[Thread 0x7fffe0b80700 (LWP 3938) exited]
[New Thread 0x7fffe0b80700 (LWP 3939)]
[Thread 0x7fffe0b80700 (LWP 3939) exited]
[New Thread 0x7fffe0b80700 (LWP 3949)]
Object::connect: No such signal org::freedesktop::UPower::DeviceAdded(QDBusObjectPath)
Object::connect: No such signal org::freedesktop::UPower::DeviceRemoved(QDBusObjectPath)
^C
Program received signal SIGINT, Interrupt.
0x00007ffff4fdae87 in semop () at ../sysdeps/unix/syscall-template.S:81
81	../sysdeps/unix/syscall-template.S: No such file or directory.
(gdb) where
#0  0x00007ffff4fdae87 in semop () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007ffff59cd4dc in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#2  0x00007ffff39eba13 in ?? () from /usr/lib/libsolid.so.4
#3  0x00007ffff39e255a in ?? () from /usr/lib/libsolid.so.4
#4  0x00007ffff3983419 in Solid::Device::icon() const ()
   from /usr/lib/libsolid.so.4
#5  0x00007fffc595c238 in ?? () from /usr/lib/libkfile.so.4
#6  0x00007fffc595ea4b in KFilePlacesModel::Private::loadBookmarkList() ()
   from /usr/lib/libkfile.so.4
#7  0x00007fffc595eaf3 in KFilePlacesModel::Private::_k_reloadBookmarks() ()
   from /usr/lib/libkfile.so.4
#8  0x00007fffc595fbaf in KFilePlacesModel::Private::_k_initDeviceList() ()
   from /usr/lib/libkfile.so.4
#9  0x00007fffc595fed1 in ?? () from /usr/lib/libkfile.so.4
#10 0x00007ffff59b8c1e in QObject::event(QEvent*) ()
   from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#11 0x00007ffff6392e2c in QApplicationPrivate::notify_helper(QObject*, QEvent*)
    () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#12 0x00007ffff63994a0 in QApplication::notify(QObject*, QEvent*) ()
   from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#13 0x00007ffff709dd1a in KApplication::notify(QObject*, QEvent*) ()
   from /usr/lib/libkdeui.so.5
#14 0x00007ffff59a04dd in QCoreApplication::notifyInternal(QObject*, QEvent*)
    () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#15 0x00007ffff59a3b3d in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#16 0x00007ffff59cdf83 in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#17 0x00007ffff1bb5e04 in g_main_context_dispatch ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#18 0x00007ffff1bb6048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#19 0x00007ffff1bb60ec in g_main_context_iteration ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#20 0x00007ffff59cd7a1 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#21 0x00007ffff6434bb6 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#22 0x00007ffff599f0af in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#23 0x00007ffff599f3a5 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#24 0x00007ffff7629536 in KIO::NetAccess::enter_loop() ()
   from /usr/lib/libkio.so.5
#25 0x00007ffff762aa48 in KIO::NetAccess::synchronousRunInternal(KIO::Job*, QWidget*, QByteArray*, KUrl*, QMap<QString, QString>*) () from /usr/lib/libkio.so.5
#26 0x00007ffff762aafd in KIO::NetAccess::synchronousRun(KIO::Job*, QWidget*, QByteArray*, KUrl*, QMap<QString, QString>*) () from /usr/lib/libkio.so.5
#27 0x00007fffc595867d in KFileWidget::KFileWidget(KUrl const&, QWidget*) ()
   from /usr/lib/libkfile.so.4
#28 0x00007fffc5ba5d85 in ?? () from /usr/lib/kde4/kfilemodule.so
#29 0x00007ffff76933ff in KFileDialog::KFileDialog(KUrl const&, QString const&, QWidget*, QWidget*) () from /usr/lib/libkio.so.5
#30 0x00007ffff7695d04 in ?? () from /usr/lib/libkio.so.5
#31 0x00007ffff76960a1 in KFileDialog::getSaveUrl(KUrl const&, QString const&, QWidget*, QString const&, QFlags<KFileDialog::Option>) ()
   from /usr/lib/libkio.so.5
#32 0x00007fffcb8a9511 in Okular::Part::slotSaveFileAs() ()
   from /usr/lib/kde4/okularpart.so
#33 0x00007fffcb8b67d5 in ?? () from /usr/lib/kde4/okularpart.so
#34 0x00007ffff59b487a in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#35 0x00007ffff638ca62 in QAction::triggered(bool) ()
   from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#36 0x00007ffff638e433 in QAction::activate(QAction::ActionEvent) ()
   from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#37 0x00007ffff67bc489 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#38 0x00007ffff67c09b9 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#39 0x00007ffff7154665 in KMenu::mouseReleaseEvent(QMouseEvent*) ()
   from /usr/lib/libkdeui.so.5
#40 0x00007ffff63e250a in QWidget::event(QEvent*) ()
   from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#41 0x00007ffff67c47bb in QMenu::event(QEvent*) ()
   from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
---Type <return> to continue, or q <return> to quit---
#42 0x00007ffff6392e2c in QApplicationPrivate::notify_helper(QObject*, QEvent*)
    () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#43 0x00007ffff63995dd in QApplication::notify(QObject*, QEvent*) ()
   from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#44 0x00007ffff709dd1a in KApplication::notify(QObject*, QEvent*) ()
   from /usr/lib/libkdeui.so.5
#45 0x00007ffff59a04dd in QCoreApplication::notifyInternal(QObject*, QEvent*)
    () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#46 0x00007ffff6398d93 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) ()
   from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#47 0x00007ffff640dcfc in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#48 0x00007ffff640d269 in QApplication::x11ProcessEvent(_XEvent*) ()
   from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#49 0x00007ffff6434b02 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#50 0x00007ffff1bb5e04 in g_main_context_dispatch ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#51 0x00007ffff1bb6048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#52 0x00007ffff1bb60ec in g_main_context_iteration ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#53 0x00007ffff59cd7a1 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#54 0x00007ffff6434bb6 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#55 0x00007ffff599f0af in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#56 0x00007ffff599f3a5 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#57 0x00007ffff59a4b79 in QCoreApplication::exec() ()
   from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#58 0x00000000004099c6 in ?? ()
#59 0x00007ffff4f00ec5 in __libc_start_main (main=0x4094f0, argc=1, 
    argv=0x7fffffffe2c8, init=<optimised out>, fini=<optimised out>, 
    rtld_fini=<optimised out>, stack_end=0x7fffffffe2b8) at libc-start.c:287
#60 0x000000000040b705 in _start ()
Comment 3 Albert Astals Cid 2015-04-03 15:22:38 UTC
That's interesting, can you install solid and/or kdelibs debug symbols for your distribtion and do the same so we get some more information on the backtrace?
Comment 4 Luke Kendall 2015-04-04 04:28:04 UTC
I'll take a guess (since I'm running Gnome really, not KDE), that you mean:

# apt-get install libsolid4 kdelibs5-dbg kdelibs5-dev

Okay, after doing that, here's the more informative backtrace:

Starting program: /usr/bin/okular /home/luke/tmp/Reform-Fact-Sheet.pdf
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffe2382700 (LWP 28986)]
[New Thread 0x7fffe1b81700 (LWP 28987)]
[New Thread 0x7fffe1380700 (LWP 28988)]
[New Thread 0x7fffe0b7f700 (LWP 28989)]
[Thread 0x7fffe1380700 (LWP 28988) exited]
[Thread 0x7fffe0b7f700 (LWP 28989) exited]
okular(28982)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
okular(28982)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
okular(28982)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
okular(28982)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
okular(28982)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
This backend is only for XRandR 1.1, your version is:  1 . 4 
[New Thread 0x7fffe0b7f700 (LWP 28998)]
[New Thread 0x7fffe1380700 (LWP 28999)]
[Thread 0x7fffe0b7f700 (LWP 28998) exited]
[Thread 0x7fffe1380700 (LWP 28999) exited]
[New Thread 0x7fffe1380700 (LWP 29000)]
[Thread 0x7fffe1380700 (LWP 29000) exited]
[New Thread 0x7fffe1380700 (LWP 29001)]
[Thread 0x7fffe1380700 (LWP 29001) exited]
[New Thread 0x7fffe0b7f700 (LWP 29002)]
[New Thread 0x7fffe1380700 (LWP 29003)]
[New Thread 0x7fffc6093700 (LWP 29004)]
[Thread 0x7fffe0b7f700 (LWP 29002) exited]
[Thread 0x7fffe1380700 (LWP 29003) exited]
[Thread 0x7fffc6093700 (LWP 29004) exited]

continue
[New Thread 0x7fffc6093700 (LWP 29016)]
[Thread 0x7fffc6093700 (LWP 29016) exited]
[New Thread 0x7fffe1380700 (LWP 29017)]
[Thread 0x7fffe1380700 (LWP 29017) exited]
[New Thread 0x7fffe1380700 (LWP 29028)]
Object::connect: No such signal org::freedesktop::UPower::DeviceAdded(QDBusObjectPath)
Object::connect: No such signal org::freedesktop::UPower::DeviceRemoved(QDBusObjectPath)
^C
Program received signal SIGINT, Interrupt.
0x00007ffff4fdae87 in semop () at ../sysdeps/unix/syscall-template.S:81
81	../sysdeps/unix/syscall-template.S: No such file or directory.
(gdb) where
#0  0x00007ffff4fdae87 in semop () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007ffff59cd4dc in QSystemSemaphorePrivate::modifySemaphore (
    this=0x1295770, count=count@entry=-1)
    at kernel/qsystemsemaphore_unix.cpp:303
#2  0x00007ffff59cad2d in QSystemSemaphore::acquire (this=this@entry=0x12794e8)
    at kernel/qsystemsemaphore.cpp:285
#3  0x00007ffff39eba13 in SharedContentTypesCache (this=0x12794e0)
    at ../../../solid/solid/backends/udisks2/udisksopticaldisc.cpp:257
#4  operator-> (this=<optimised out>)
    at ../../../solid/solid/backends/udisks2/udisksopticaldisc.cpp:313
#5  Solid::Backends::UDisks2::OpticalDisc::availableContent (this=this@entry=
    0x7fffffffc170)
    at ../../../solid/solid/backends/udisks2/udisksopticaldisc.cpp:418
#6  0x00007ffff39e255a in Solid::Backends::UDisks2::Device::icon (
    this=0x1222f50)
    at ../../../solid/solid/backends/udisks2/udisksdevice.cpp:615
#7  0x00007ffff3983419 in Solid::Device::icon (this=this@entry=0x1241db8)
    at ../../../solid/solid/device.cpp:138
#8  0x00007fffc67e3238 in KFilePlacesItem::KFilePlacesItem (this=0x1241d80, 
    manager=<optimised out>, address=..., udi=...)
    at ../../kfile/kfileplacesitem.cpp:68
#9  0x00007fffc67e5a4b in KFilePlacesModel::Private::loadBookmarkList (
    this=this@entry=0x111f740) at ../../kfile/kfileplacesmodel.cpp:468
#10 0x00007fffc67e5af3 in KFilePlacesModel::Private::_k_reloadBookmarks (
    this=this@entry=0x111f740) at ../../kfile/kfileplacesmodel.cpp:362
#11 0x00007fffc67e6baf in KFilePlacesModel::Private::_k_initDeviceList (
    this=0x111f740) at ../../kfile/kfileplacesmodel.cpp:329
#12 0x00007fffc67e6ed1 in KFilePlacesModel::qt_static_metacall (_o=0x10f04e0, 
    _id=-16448, _a=0x1, _c=<optimised out>) at ./kfileplacesmodel.moc:67
#13 0x00007ffff59b8c1e in QObject::event (this=0x10f04e0, e=<optimised out>)
    at kernel/qobject.cpp:1194
#14 0x00007ffff6392e2c in QApplicationPrivate::notify_helper (
    this=this@entry=0x651b90, receiver=receiver@entry=0x10f04e0, e=e@entry=
    0xf64d80) at kernel/qapplication.cpp:4567
#15 0x00007ffff63994a0 in QApplication::notify (
    this=this@entry=0x7fffffffe110, receiver=receiver@entry=0x10f04e0, 
    e=e@entry=0xf64d80) at kernel/qapplication.cpp:4353
#16 0x00007ffff709dd1a in KApplication::notify (this=0x7fffffffe110, 
    receiver=0x10f04e0, event=0xf64d80)
    at ../../kdeui/kernel/kapplication.cpp:311
#17 0x00007ffff59a04dd in QCoreApplication::notifyInternal (this=
    0x7fffffffe110, receiver=receiver@entry=0x10f04e0, 
    event=event@entry=0xf64d80) at kernel/qcoreapplication.cpp:953
#18 0x00007ffff59a3b3d in sendEvent (event=0xf64d80, receiver=0x10f04e0)
    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#19 QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, 
    event_type=event_type@entry=0, data=0x616670)
    at kernel/qcoreapplication.cpp:1577
#20 0x00007ffff59a3fe3 in QCoreApplication::sendPostedEvents (
    receiver=receiver@entry=0x0, event_type=event_type@entry=0)
    at kernel/qcoreapplication.cpp:1470
#21 0x00007ffff59cdf83 in sendPostedEvents ()
    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:236
#22 postEventSourceDispatch (s=0x6500f0)
    at kernel/qeventdispatcher_glib.cpp:287
#23 0x00007ffff1bb5e04 in g_main_context_dispatch ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#24 0x00007ffff1bb6048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#25 0x00007ffff1bb60ec in g_main_context_iteration ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#26 0x00007ffff59cd7a1 in QEventDispatcherGlib::processEvents (this=0x64d1e0, 
    flags=...) at kernel/qeventdispatcher_glib.cpp:434
#27 0x00007ffff6434bb6 in QGuiEventDispatcherGlib::processEvents (
    this=<optimised out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#28 0x00007ffff599f0af in QEventLoop::processEvents (this=this@entry=
    0x7fffffffcb10, flags=...) at kernel/qeventloop.cpp:149
#29 0x00007ffff599f3a5 in QEventLoop::exec (this=this@entry=0x7fffffffcb10, 
    flags=...) at kernel/qeventloop.cpp:204
#30 0x00007ffff7629536 in KIO::NetAccess::enter_loop (
    this=this@entry=0x7fffffffcb90) at ../../kio/kio/netaccess.cpp:509
#31 0x00007ffff762aa48 in KIO::NetAccess::synchronousRunInternal (
---Type <return> to continue, or q <return> to quit---
    this=this@entry=0x7fffffffcb90, job=job@entry=0xdaad60, 
    window=window@entry=0x10538b0, data=data@entry=0x0, 
    finalURL=finalURL@entry=0x0, metaData=metaData@entry=0x0)
    at ../../kio/kio/netaccess.cpp:494
#32 0x00007ffff762aafd in KIO::NetAccess::synchronousRun (
    job=job@entry=0xdaad60, window=window@entry=0x10538b0, 
    data=data@entry=0x0, finalURL=finalURL@entry=0x0, 
    metaData=metaData@entry=0x0) at ../../kio/kio/netaccess.cpp:284
#33 0x00007fffc67df67d in KFileWidget::KFileWidget (this=0x10538b0, 
    _startDir=..., parent=<optimised out>) at ../../kfile/kfilewidget.cpp:615
#34 0x00007fffc6a2cd85 in KFileModule::createFileWidget (this=<optimised out>, 
    startDir=..., parent=0x7fffffffce50) at ../../kfile/kfilemodule.cpp:36
#35 0x00007ffff76933ff in KFileDialog::KFileDialog (this=0x7fffffffce50, 
    startDir=..., filter=..., parent=<optimised out>, customWidget=0x0)
    at ../../kio/kfile/kfiledialog.cpp:266
#36 0x00007ffff7695d04 in KFileDialogPrivate::getSaveUrl (dir=..., filter=..., 
    parent=0x9707e0, caption=..., options=..., 
    selectedFilter=selectedFilter@entry=0x0)
    at ../../kio/kfile/kfiledialog.cpp:830
#37 0x00007ffff76960a1 in KFileDialog::getSaveUrl (dir=..., filter=..., 
    parent=<optimised out>, caption=..., options=...)
    at ../../kio/kfile/kfiledialog.cpp:816
#38 0x00007fffcb8a9511 in Okular::Part::slotSaveFileAs() ()
   from /usr/lib/kde4/okularpart.so
#39 0x00007fffcb8b67d5 in ?? () from /usr/lib/kde4/okularpart.so
#40 0x00007ffff59b487a in QMetaObject::activate (sender=sender@entry=0xcbf6b0, 
    m=m@entry=0x7ffff6e3cde0 <QAction::staticMetaObject>, 
    local_signal_index=local_signal_index@entry=1, 
    argv=argv@entry=0x7fffffffd120) at kernel/qobject.cpp:3539
#41 0x00007ffff638ca62 in QAction::triggered (this=this@entry=0xcbf6b0, 
    _t1=false) at .moc/release-shared/moc_qaction.cpp:276
#42 0x00007ffff638e433 in QAction::activate (this=this@entry=0xcbf6b0, 
    event=event@entry=QAction::Trigger) at kernel/qaction.cpp:1257
#43 0x00007ffff67bc489 in QMenuPrivate::activateCausedStack (
    this=this@entry=0xd27050, causedStack=..., action=action@entry=0xcbf6b0, 
    action_e=action_e@entry=QAction::Trigger, self=self@entry=true)
    at widgets/qmenu.cpp:1038
#44 0x00007ffff67c09b9 in QMenuPrivate::activateAction (this=0xd27050, 
    action=0xcbf6b0, action_e=action_e@entry=QAction::Trigger, 
    self=self@entry=true) at widgets/qmenu.cpp:1130
#45 0x00007ffff67c4385 in QMenu::mouseReleaseEvent (this=this@entry=0xd3c490, 
    e=e@entry=0x7fffffffd850) at widgets/qmenu.cpp:2372
#46 0x00007ffff7154665 in KMenu::mouseReleaseEvent (this=0xd3c490, 
    e=0x7fffffffd850) at ../../kdeui/widgets/kmenu.cpp:464
#47 0x00007ffff63e250a in QWidget::event (this=this@entry=0xd3c490, 
    event=event@entry=0x7fffffffd850) at kernel/qwidget.cpp:8376
#48 0x00007ffff67c47bb in QMenu::event (this=0xd3c490, e=0x7fffffffd850)
    at widgets/qmenu.cpp:2481
#49 0x00007ffff6392e2c in QApplicationPrivate::notify_helper (
    this=this@entry=0x651b90, receiver=receiver@entry=0xd3c490, 
    e=e@entry=0x7fffffffd850) at kernel/qapplication.cpp:4567
#50 0x00007ffff63995dd in QApplication::notify (
    this=this@entry=0x7fffffffe110, receiver=receiver@entry=0xd3c490, 
    e=e@entry=0x7fffffffd850) at kernel/qapplication.cpp:4110
#51 0x00007ffff709dd1a in KApplication::notify (this=0x7fffffffe110, 
    receiver=0xd3c490, event=0x7fffffffd850)
    at ../../kdeui/kernel/kapplication.cpp:311
#52 0x00007ffff59a04dd in QCoreApplication::notifyInternal (
    this=0x7fffffffe110, receiver=receiver@entry=0xd3c490, 
    event=event@entry=0x7fffffffd850) at kernel/qcoreapplication.cpp:953
#53 0x00007ffff6398d93 in sendEvent (event=<optimised out>, 
    receiver=<optimised out>)
    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#54 QApplicationPrivate::sendMouseEvent (receiver=receiver@entry=0xd3c490, 
    event=event@entry=0x7fffffffd850, alienWidget=alienWidget@entry=0x0, 
    nativeWidget=nativeWidget@entry=0xd3c490, 
    buttonDown=buttonDown@entry=0x7ffff6e78318 <qt_button_down>, 
    lastMouseReceiver=..., spontaneous=spontaneous@entry=true)
    at kernel/qapplication.cpp:3178
#55 0x00007ffff640dcfc in QETWidget::translateMouseEvent (
    this=this@entry=0xd3c490, event=event@entry=0x7fffffffdba0)
---Type <return> to continue, or q <return> to quit---
    at kernel/qapplication_x11.cpp:4568
#56 0x00007ffff640d269 in QApplication::x11ProcessEvent (this=0x7fffffffe110, 
    event=event@entry=0x7fffffffdba0) at kernel/qapplication_x11.cpp:3627
#57 0x00007ffff6434b02 in x11EventSourceDispatch (s=0x653cb0, callback=0x0, 
    user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#58 0x00007ffff1bb5e04 in g_main_context_dispatch ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#59 0x00007ffff1bb6048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#60 0x00007ffff1bb60ec in g_main_context_iteration ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#61 0x00007ffff59cd7a1 in QEventDispatcherGlib::processEvents (this=0x64d1e0, 
    flags=...) at kernel/qeventdispatcher_glib.cpp:434
#62 0x00007ffff6434bb6 in QGuiEventDispatcherGlib::processEvents (
    this=<optimised out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#63 0x00007ffff599f0af in QEventLoop::processEvents (
    this=this@entry=0x7fffffffdf70, flags=...) at kernel/qeventloop.cpp:149
#64 0x00007ffff599f3a5 in QEventLoop::exec (this=this@entry=0x7fffffffdf70, 
    flags=...) at kernel/qeventloop.cpp:204
#65 0x00007ffff59a4b79 in QCoreApplication::exec ()
    at kernel/qcoreapplication.cpp:1225
#66 0x00000000004099c6 in ?? ()
#67 0x00007ffff4f00ec5 in __libc_start_main (main=0x4094f0, argc=2, 
    argv=0x7fffffffe298, init=<optimised out>, fini=<optimised out>, 
    rtld_fini=<optimised out>, stack_end=0x7fffffffe288) at libc-start.c:287
#68 0x000000000040b705 in _start ()
Comment 5 Albert Astals Cid 2015-04-05 16:21:39 UTC
Random guess, do you have a CD/DVD with data in your computer? does removing it help?
Comment 6 Luke Kendall 2015-04-05 23:33:09 UTC
Yes; don't know.

I do use rewritable DVDs for nightly incremental backups.  Currently there is a data DVD in there but it's stuck in a device-wait state - I will need to reboot to clear it.

I'll let you know how it goes.  I think your "random guess" was well thought out!

luke
Comment 7 Luke Kendall 2015-04-06 00:00:13 UTC
After the reboot (with my USB CD/DVD drive disconnected), I can confirm that okular runs correctly and the Save As pane appears.

So it looks like a serious design flaw in that component (the Save As panel) - if the locations probed are in a device-locked state, the whole program hangs.  It also explains why it was so hard to kill okular itself.

I assume the Save As panel is a part of KDE itself, not okular, so this problem should be forwarded to the KDE team?

Thanks for your help and diagnosis!

luke
Comment 8 Albert Astals Cid 2015-04-06 14:00:18 UTC
Lukas, seems the udisks2 backend is a bit blocking in some cases, can you have a look?
Comment 9 Albert Astals Cid 2015-04-06 14:09:10 UTC
And now an address for Lukas that should be more up to date :D
Comment 10 Lukáš Tinkl 2015-04-06 15:23:41 UTC
What is your udisks2 version?
Comment 11 Luke Kendall 2015-04-06 16:03:19 UTC
$ dpkg -l | grep udisks
ii  gir1.2-udisks-2.0                                           2.1.3-1                                             amd64        GObject based library to access udisks2 - introspection data
ii  libudisks2-0:amd64                                          2.1.3-1                                             amd64        GObject based library to access udisks2
ii  udisks2                                                     2.1.3-1                                             amd64        D-BUS service to access and manipulate storage devices
Comment 12 Daniel Vrátil 2015-04-06 21:58:31 UTC
I did not write the code as Lukas suggested on IRC, but for what it's worth:

The cache and the semaphore are shared between multiple processes. When one process acquires the semaphore (l. 287) and then gets blocked in advancedDiskDetect() (l. 298) (due to some IO call blocking because of faulty HW for example), then another process which tries to acquire the semaphore in order to attach itself to the SHM (l. 257 and on) will block forever (however Linux kernel should release the lock when the process which acquired it is terminated).

I believe the only reason for the semaphore is to prevent multiple processes calling advancedDiskDetect() at once during session start - so that only one process does the call, others block and then access the cached data once the first process writes them to SHM and releases the lock. I guess this optimization could be sacrificed and only use QSharedMemory::(un)lock() to synchronize access to the SHM. This would prevent applications from hanging forever in case one process acquires the lock and then hangs for any reason, but won't solve the problem when advancedDiskDetect() blocks on an IO call due to faulty HW. The only solution to this is to execute advancedDiskDetect() in thread and update the result asynchronously.
Comment 13 Albert Astals Cid 2015-04-07 20:24:22 UTC
Dan, so you're suggesting we "don't fix this"? Or is the thread solution possible?
Comment 14 Luke Kendall 2015-04-08 00:37:35 UTC
Just thought I'd add my comment: when the problem occurred for me, I was ready to give up on okular completely - but thought I'd report the bug to be helpful, anyway.  It didn't occur to me that the bug might relate to a very odd situation my system was in.  So it made okular look very bad.
Comment 15 Daniel Vrátil 2015-04-08 09:13:55 UTC
@Albert: I'm not suggesting not to fix the problem (come on, you know me better than that ;-). What I meant is that the thread solution might not be possible with current Solid design (which is mostly synchronous). But in all fairness I did not give it much thought, so maybe it's possible just fine - I'm sure the Solid overlord will figure something out ;)
Comment 16 Albert Astals Cid 2015-05-24 04:19:28 UTC
So any suggestion on how to fix this?
Comment 17 Andrew Crouthamel 2018-09-25 21:54:18 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 set the bug status 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 18 Andrew Crouthamel 2018-10-27 03:41:13 UTC
Dear Bug Submitter,

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!