Bug 253039 - File opening dialog blocking due to UDisks
Summary: File opening dialog blocking due to UDisks
Status: RESOLVED FIXED
Alias: None
Product: solid
Classification: Frameworks and Libraries
Component: libsolid-udisks (show other bugs)
Version: unspecified
Platform: Unlisted Binaries Linux
: NOR normal
Target Milestone: ---
Assignee: Lukáš Tinkl
URL:
Keywords:
: 258441 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-10-02 17:43 UTC by Mark
Modified: 2013-04-25 22:15 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
proposed patch... (548 bytes, patch)
2010-10-31 05:28 UTC, Dawit Alemayehu
Details
proposed patch updated... (4.40 KB, patch)
2010-11-04 01:58 UTC, Dawit Alemayehu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark 2010-10-02 17:43:14 UTC
Version:           unspecified (using Devel) 
OS:                Linux

Hi,

I have a bunch of drives in my pc which totals to 9 partitions. I can access them all (except swap, obviously) just fine in Dolphin, however in other applications (QtCreator in this case) i see the file open dialog appear, freeze for ~40 seconds, then i see everything besides the partitions followed by another freeze of ~40 seconds and after that i (finally) see all the partitions.

However then the gui is completely non responsive and only seems to do something once every few seconds.

Something is obviously seriously wrong, but it's not taking 100% CPU usage.
It's not crashing either, just not responsive.

I strangely could only reproduce this behavior in QtCreator's file open dialog. But when that one is open is slows down everything that does a file open dialog and dolphin becomes non responsive till i close the dialog.

Reproducible: Always

Steps to Reproduce:
Have udev + udisks installed and running
No HAL running (don't know if that matters)
Install QtCreator and open a file open dialog in it
And you should have a non responsive qtcreator, dolphin and everything else that has a file open dialog open.

Actual Results:  
Non responsive apps that have a file open dialog open.

Expected Results:  
File open dialog should be very responsive and not slowing anything down.
Comment 1 Christophe Marin 2010-10-11 11:56:02 UTC
Confirmed with a few non-kde apps (qtcreator, designer, opera, vlc...)

-sakura- krop 11:47 /d/git/repos/git # qtcreator 
qtcreator(7775)/kdeui (KIconLoader) KSharedDataCache::Private::mapSharedMemory: Cache attached to shared memory, 5558272 bytes available out of 10485760
qtcreator(7775)/kdeui (KIconLoader) KSharedDataCache::insert: Overwriting existing cached entry due to collision.
qtcreator(7775)/kdecore (KSycoca) KSycocaPrivate::openDatabase: Trying to open ksycoca from "/var/tmp/kdecache-krop/ksycoca4"
KGlobal::locale::Warning your global KLocale is being recreated with a valid main component instead of a fake component, this usually means you tried to call i18n related functions before your main component was created. You should not do that since it most likely will not work 
qtcreator(7775)/kfile (kdelibs) KFileWidget::KFileWidget: startDir KUrl("file:///d/git/repos/git")
qtcreator(7775)/kfile (kdelibs) KFileWidget::getStartUrl: for KUrl("file:///d/git/repos/git") -> KUrl("file:///d/git/repos/git") recentDirClass "" fileName ""
qtcreator(7775)/kfile (kdelibs) KDirOperator::setDirLister: mainWidget= KFileDialog(0x7fff934e4b60)
qtcreator(7775)/kfile (kdelibs) KDirOperator::Private::updateSorting: changing sort flags from QFlags(0x1|0x2|0x4|0x8|0x10|0x20|0x40|0x80|0x100|0x200|0x400|0x800|0x1000|0x2000|0x4000|0x8000|0x10000|0x20000|0x40000|0x80000|0x100000|0x200000|0x400000|0x800000|0x1000000|0x2000000|0x4000000|0x8000000|0x10000000|0x20000000|0x40000000|0xffffffff80000000) to QFlags(0x4)
qtcreator(7775)/kfile (kdelibs) KDirOperator::Private::updateSorting: changing sort flags from QFlags(0x4) to QFlags(0x4)
qtcreator(7775)/kfile (kdelibs) KUrlComboBox::setUrl: setURL: text= "/d/git/repos/git/"
QMap<QString, QVariant> Solid::Backends::UDisks::UDisksDevice::allProperties() const error: QDBusMessage(type=Error, service="", error name="org.freedesktop.DBus.Error.UnknownMethod", error message="Method "GetAll" with signature "s" on interface "org.freedesktop.DBus.Properties" doesn't exist
", signature="", contents=() ) 
QMap<QString, QVariant> Solid::Backends::UDisks::UDisksDevice::allProperties() const error: QDBusMessage(type=Error, service="", error name="org.freedesktop.DBus.Error.UnknownMethod", error message="Method "GetAll" with signature "s" on interface "org.freedesktop.DBus.Properties" doesn't exist
", signature="", contents=() ) 
QMap<QString, QVariant> Solid::Backends::UDisks::UDisksDevice::allProperties() const error: QDBusMessage(type=Error, service="", error name="org.freedesktop.DBus.Error.UnknownMethod", error message="Method "GetAll" with signature "s" on interface "org.freedesktop.DBus.Properties" doesn't exist
", signature="", contents=() ) 

(~1 mn later, the file dialog appears)

qtcreator(7775)/kfile (kdelibs) KFileWidget::KFileWidget: stat of KUrl("file:///d/git/repos/git") -> statRes true isDir true
qtcreator(7775)/kfile (kdelibs) KFileDialog::KFileDialog: KFileDialog connecting signals
qtcreator(7775)/kdecore (K*TimeZone*) KSystemTimeZonesPrivate::instance: instance(): ... initialised
qtcreator(7775)/kdecore (K*TimeZone*) KSystemTimeZonesPrivate::readConfig: readConfig(): local zone= "Europe/Paris"
qtcreator(7775)/kdecore (K*TimeZone*) KSystemTimeZonesPrivate::readZoneTab: readZoneTab( "/usr/share/zoneinfo/zone.tab" )
Comment 2 Lukáš Tinkl 2010-10-26 18:18:48 UTC
Please try to reproduce with a recent kdelibs/solid version
Comment 3 Christophe Marin 2010-10-26 18:24:36 UTC
how recent ?

I can reproduce with r1187456 (so, one week old)
Comment 4 Dawit Alemayehu 2010-10-27 18:21:21 UTC
I have the same issue with kdelibs r1190424 and non-KDE apps. On my x86_64 Arch Linux box with Qt 4.7 and dbus 1.4.0, QtCreator always  freezes when attempting to open a project. The same thing happens when using VLC (1.1.4.1) and attempting to open a file though opening a directory works just fine! Here is the backtrace I consistently get when I run QtCreator through gdb and press CTRL+C when the freeze occurs:

#0  0x00007ffff5dab173 in poll () from /lib/libc.so.6
#1  0x00007fffeca8d170 in ?? () from /usr/lib/libdbus-1.so.3
#2  0x00007fffeca8c06d in ?? () from /usr/lib/libdbus-1.so.3
#3  0x00007fffeca76c45 in ?? () from /usr/lib/libdbus-1.so.3
#4  0x00007fffeca780b9 in ?? () from /usr/lib/libdbus-1.so.3
#5  0x00007fffeca77564 in dbus_connection_send_with_reply_and_block () from /usr/lib/libdbus-1.so.3
#6  0x00007fffeffc8358 in ?? () from /usr/lib/libQtDBus.so.4
#7  0x00007fffeffb61a3 in QDBusConnection::call(QDBusMessage const&, QDBus::CallMode, int) const () from /usr/lib/libQtDBus.so.4
#8  0x00007fffeed28fe6 in Solid::Backends::UDisks::UDisksDevice::allProperties (this=0x7ffffffface0)
    at /usr/local/src/KDE/trunk/kdelibs/solid/solid/backends/udisks/udisksdevice.cpp:697
#9  0x00007fffeed29a50 in Solid::Backends::UDisks::UDisksDevice::checkCache (this=0x7ffffffface0, key=...)
    at /usr/local/src/KDE/trunk/kdelibs/solid/solid/backends/udisks/udisksdevice.cpp:662
#10 0x00007fffeed29cd6 in Solid::Backends::UDisks::UDisksDevice::property (this=0x7ffffffface0, key=...)
    at /usr/local/src/KDE/trunk/kdelibs/solid/solid/backends/udisks/udisksdevice.cpp:680
#11 0x00007fffeed2b8a9 in Solid::Backends::UDisks::UDisksDevice::queryDeviceInterface (this=0x7ffffffface0, type=<value optimized out>)
    at /usr/local/src/KDE/trunk/kdelibs/solid/solid/backends/udisks/udisksdevice.cpp:173
#12 0x00007fffeed24a34 in Solid::Backends::UDisks::UDisksManager::allDevices (this=0x11ab940) at /usr/local/src/KDE/trunk/kdelibs/solid/solid/backends/udisks/udisksmanager.cpp:132
#13 0x00007fffeed25024 in Solid::Backends::UDisks::UDisksManager::UDisksManager (this=0x11ab940, parent=<value optimized out>)
    at /usr/local/src/KDE/trunk/kdelibs/solid/solid/backends/udisks/udisksmanager.cpp:60
#14 0x00007fffeecd859b in Solid::ManagerBasePrivate::loadBackends (this=0x119fd10) at /usr/local/src/KDE/trunk/kdelibs/solid/solid/managerbase.cpp:75
#15 0x00007fffeecda044 in Solid::DeviceManagerPrivate::DeviceManagerPrivate (this=0x119fd00) at /usr/local/src/KDE/trunk/kdelibs/solid/solid/devicemanager.cpp:38
#16 0x00007fffeecda165 in Solid::DeviceManagerStorage::ensureManagerCreated (this=0xecd120) at /usr/local/src/KDE/trunk/kdelibs/solid/solid/devicemanager.cpp:287
#17 0x00007fffeecda189 in Solid::DeviceManagerStorage::notifier (this=0xecd120) at /usr/local/src/KDE/trunk/kdelibs/solid/solid/devicemanager.cpp:280
#18 0x00007fffeecd8958 in Solid::Device::Device (this=<value optimized out>, udi=...) at /usr/local/src/KDE/trunk/kdelibs/solid/solid/device.cpp:76
#19 0x00007fffd933e713 in KFilePlacesItem::KFilePlacesItem (this=0x6f96f0, manager=<value optimized out>, address=..., udi=...)
    at /usr/local/src/KDE/trunk/kdelibs/kfile/kfileplacesitem.cpp:38
#20 0x00007fffd93429f3 in KFilePlacesModel::Private::loadBookmarkList (this=0x118bdb0) at /usr/local/src/KDE/trunk/kdelibs/kfile/kfileplacesmodel.cpp:471
#21 0x00007fffd9342e50 in KFilePlacesModel::Private::_k_reloadBookmarks (this=0x118bdb0) at /usr/local/src/KDE/trunk/kdelibs/kfile/kfileplacesmodel.cpp:380
#22 0x00007fffd9343866 in KFilePlacesModel::KFilePlacesModel (this=0x7ba840, parent=<value optimized out>) at /usr/local/src/KDE/trunk/kdelibs/kfile/kfileplacesmodel.cpp:192
#23 0x00007fffd933b1be in KFileWidget::KFileWidget (this=0xec8570, _startDir=<value optimized out>, parent=<value optimized out>)
    at /usr/local/src/KDE/trunk/kdelibs/kfile/kfilewidget.cpp:338
#24 0x00007fffd9586ed4 in KFileModule::createFileWidget (this=<value optimized out>, startDir=..., parent=0x7fffffffc270)
    at /usr/local/src/KDE/trunk/kdelibs/kfile/kfilemodule.cpp:37
#25 0x00007ffff13d56a2 in KFileDialog::KFileDialog (this=0x7fffffffc270, startDir=..., filter=..., parent=<value optimized out>, customWidget=0x0)
    at /usr/local/src/KDE/trunk/kdelibs/kio/kfile/kfiledialog.cpp:269
#26 0x00007ffff13da1cc in KFileDialogQtOverride::getOpenFileNames(QWidget*, QString const&, QString const&, QString const&, QString*, QFlags<QFileDialog::Option>) ()
   from /usr/lib/libkio.so.5
#27 0x00007ffff759e658 in QFileDialog::getOpenFileNames(QWidget*, QString const&, QString const&, QString const&, QString*, QFlags<QFileDialog::Option>) ()
   from /usr/lib/libQtGui.so.4
#28 0x00007fffec77be8b in Core::FileManager::getOpenFileNames(QString const&, QString, QString*) () from /usr/lib/qtcreator/plugins/Nokia/libCore.so
#29 0x00007fffe4559982 in ProjectExplorer::ProjectExplorerPlugin::openOpenProjectDialog() () from /usr/lib/qtcreator/plugins/Nokia/libProjectExplorer.so
#30 0x00007fffe45fd0a4 in ProjectExplorer::ProjectExplorerPlugin::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib/qtcreator/plugins/Nokia/libProjectExplorer.so
#31 0x00007ffff68ef2ff in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#32 0x00007ffff7744df2 in QAbstractButton::clicked(bool) () from /usr/lib/libQtGui.so.4
#33 0x00007ffff748c75b in ?? () from /usr/lib/libQtGui.so.4
#34 0x00007ffff748dd2b in ?? () from /usr/lib/libQtGui.so.4
#35 0x00007ffff748df9c in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/libQtGui.so.4
#36 0x00007ffff712bbc8 in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
#37 0x00007ffff70da564 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#38 0x00007ffff70df85a in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#39 0x00007ffff68d9eac in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#40 0x00007ffff70db565 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/libQtGui.so.4
#41 0x00007ffff7158d78 in ?? () from /usr/lib/libQtGui.so.4
#42 0x00007ffff7157499 in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/libQtGui.so.4
#43 0x00007ffff717e5f2 in ?? () from /usr/lib/libQtGui.so.4
#44 0x00007ffff5a3fbf3 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#45 0x00007ffff5a403d0 in ?? () from /usr/lib/libglib-2.0.so.0
#46 0x00007ffff5a4066d in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#47 0x00007ffff6904f1f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#48 0x00007ffff717e29e in ?? () from /usr/lib/libQtGui.so.4
---Type <return> to continue, or q <return> to quit---
#49 0x00007ffff68d9242 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#50 0x00007ffff68d948c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#51 0x00007ffff68dd94b in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#52 0x0000000000408e8a in ?? ()
#53 0x00007ffff5d03c4d in __libc_start_main () from /lib/libc.so.6
#54 0x0000000000405309 in ?? ()
#55 0x00007fffffffe5f8 in ?? ()
#56 0x000000000000001c in ?? ()
#57 0x0000000000000001 in ?? ()
#58 0x00007fffffffe911 in ?? ()
#59 0x0000000000000000 in ?? ()
#0  0x00007ffff5dab173 in poll () from /lib/libc.so.6
#1  0x00007fffeca8d170 in ?? () from /usr/lib/libdbus-1.so.3
#2  0x00007fffeca8c06d in ?? () from /usr/lib/libdbus-1.so.3
#3  0x00007fffeca76c45 in ?? () from /usr/lib/libdbus-1.so.3
#4  0x00007fffeca780b9 in ?? () from /usr/lib/libdbus-1.so.3
#5  0x00007fffeca77564 in dbus_connection_send_with_reply_and_block () from /usr/lib/libdbus-1.so.3
#6  0x00007fffeffc8358 in ?? () from /usr/lib/libQtDBus.so.4
#7  0x00007fffeffb61a3 in QDBusConnection::call(QDBusMessage const&, QDBus::CallMode, int) const () from /usr/lib/libQtDBus.so.4
#8  0x00007fffeed28fe6 in Solid::Backends::UDisks::UDisksDevice::allProperties (this=0x7ffffffface0)
    at /usr/local/src/KDE/trunk/kdelibs/solid/solid/backends/udisks/udisksdevice.cpp:697
#9  0x00007fffeed29a50 in Solid::Backends::UDisks::UDisksDevice::checkCache (this=0x7ffffffface0, key=...)
    at /usr/local/src/KDE/trunk/kdelibs/solid/solid/backends/udisks/udisksdevice.cpp:662
#10 0x00007fffeed29cd6 in Solid::Backends::UDisks::UDisksDevice::property (this=0x7ffffffface0, key=...)
    at /usr/local/src/KDE/trunk/kdelibs/solid/solid/backends/udisks/udisksdevice.cpp:680
#11 0x00007fffeed2b8a9 in Solid::Backends::UDisks::UDisksDevice::queryDeviceInterface (this=0x7ffffffface0, type=<value optimized out>)
    at /usr/local/src/KDE/trunk/kdelibs/solid/solid/backends/udisks/udisksdevice.cpp:173
#12 0x00007fffeed24a34 in Solid::Backends::UDisks::UDisksManager::allDevices (this=0x11ab940) at /usr/local/src/KDE/trunk/kdelibs/solid/solid/backends/udisks/udisksmanager.cpp:132
#13 0x00007fffeed25024 in Solid::Backends::UDisks::UDisksManager::UDisksManager (this=0x11ab940, parent=<value optimized out>)
    at /usr/local/src/KDE/trunk/kdelibs/solid/solid/backends/udisks/udisksmanager.cpp:60
#14 0x00007fffeecd859b in Solid::ManagerBasePrivate::loadBackends (this=0x119fd10) at /usr/local/src/KDE/trunk/kdelibs/solid/solid/managerbase.cpp:75
#15 0x00007fffeecda044 in Solid::DeviceManagerPrivate::DeviceManagerPrivate (this=0x119fd00) at /usr/local/src/KDE/trunk/kdelibs/solid/solid/devicemanager.cpp:38
#16 0x00007fffeecda165 in Solid::DeviceManagerStorage::ensureManagerCreated (this=0xecd120) at /usr/local/src/KDE/trunk/kdelibs/solid/solid/devicemanager.cpp:287
#17 0x00007fffeecda189 in Solid::DeviceManagerStorage::notifier (this=0xecd120) at /usr/local/src/KDE/trunk/kdelibs/solid/solid/devicemanager.cpp:280
#18 0x00007fffeecd8958 in Solid::Device::Device (this=<value optimized out>, udi=...) at /usr/local/src/KDE/trunk/kdelibs/solid/solid/device.cpp:76
#19 0x00007fffd933e713 in KFilePlacesItem::KFilePlacesItem (this=0x6f96f0, manager=<value optimized out>, address=..., udi=...)
    at /usr/local/src/KDE/trunk/kdelibs/kfile/kfileplacesitem.cpp:38
#20 0x00007fffd93429f3 in KFilePlacesModel::Private::loadBookmarkList (this=0x118bdb0) at /usr/local/src/KDE/trunk/kdelibs/kfile/kfileplacesmodel.cpp:471
#21 0x00007fffd9342e50 in KFilePlacesModel::Private::_k_reloadBookmarks (this=0x118bdb0) at /usr/local/src/KDE/trunk/kdelibs/kfile/kfileplacesmodel.cpp:380
#22 0x00007fffd9343866 in KFilePlacesModel::KFilePlacesModel (this=0x7ba840, parent=<value optimized out>) at /usr/local/src/KDE/trunk/kdelibs/kfile/kfileplacesmodel.cpp:192
#23 0x00007fffd933b1be in KFileWidget::KFileWidget (this=0xec8570, _startDir=<value optimized out>, parent=<value optimized out>)
    at /usr/local/src/KDE/trunk/kdelibs/kfile/kfilewidget.cpp:338
#24 0x00007fffd9586ed4 in KFileModule::createFileWidget (this=<value optimized out>, startDir=..., parent=0x7fffffffc270)
    at /usr/local/src/KDE/trunk/kdelibs/kfile/kfilemodule.cpp:37
#25 0x00007ffff13d56a2 in KFileDialog::KFileDialog (this=0x7fffffffc270, startDir=..., filter=..., parent=<value optimized out>, customWidget=0x0)
    at /usr/local/src/KDE/trunk/kdelibs/kio/kfile/kfiledialog.cpp:269
#26 0x00007ffff13da1cc in KFileDialogQtOverride::getOpenFileNames(QWidget*, QString const&, QString const&, QString const&, QString*, QFlags<QFileDialog::Option>) ()
   from /usr/lib/libkio.so.5
#27 0x00007ffff759e658 in QFileDialog::getOpenFileNames(QWidget*, QString const&, QString const&, QString const&, QString*, QFlags<QFileDialog::Option>) ()
   from /usr/lib/libQtGui.so.4
#28 0x00007fffec77be8b in Core::FileManager::getOpenFileNames(QString const&, QString, QString*) () from /usr/lib/qtcreator/plugins/Nokia/libCore.so
#29 0x00007fffe4559982 in ProjectExplorer::ProjectExplorerPlugin::openOpenProjectDialog() () from /usr/lib/qtcreator/plugins/Nokia/libProjectExplorer.so
#30 0x00007fffe45fd0a4 in ProjectExplorer::ProjectExplorerPlugin::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib/qtcreator/plugins/Nokia/libProjectExplorer.so
#31 0x00007ffff68ef2ff in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#32 0x00007ffff7744df2 in QAbstractButton::clicked(bool) () from /usr/lib/libQtGui.so.4
#33 0x00007ffff748c75b in ?? () from /usr/lib/libQtGui.so.4
#34 0x00007ffff748dd2b in ?? () from /usr/lib/libQtGui.so.4
#35 0x00007ffff748df9c in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/libQtGui.so.4
#36 0x00007ffff712bbc8 in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
#37 0x00007ffff70da564 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#38 0x00007ffff70df85a in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#39 0x00007ffff68d9eac in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#40 0x00007ffff70db565 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/libQtGui.so.4
#41 0x00007ffff7158d78 in ?? () from /usr/lib/libQtGui.so.4
#42 0x00007ffff7157499 in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/libQtGui.so.4
#43 0x00007ffff717e5f2 in ?? () from /usr/lib/libQtGui.so.4
#44 0x00007ffff5a3fbf3 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#45 0x00007ffff5a403d0 in ?? () from /usr/lib/libglib-2.0.so.0
#46 0x00007ffff5a4066d in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#47 0x00007ffff6904f1f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#48 0x00007ffff717e29e in ?? () from /usr/lib/libQtGui.so.4
---Type <return> to continue, or q <return> to quit---
#49 0x00007ffff68d9242 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#50 0x00007ffff68d948c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#51 0x00007ffff68dd94b in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#52 0x0000000000408e8a in ?? ()
#53 0x00007ffff5d03c4d in __libc_start_main () from /lib/libc.so.6
#54 0x0000000000405309 in ?? ()
#55 0x00007fffffffe5f8 in ?? ()
#56 0x000000000000001c in ?? ()
#57 0x0000000000000001 in ?? ()
#58 0x00007fffffffe911 in ?? ()
#59 0x0000000000000000 in ?? ()
Comment 5 Lukáš Tinkl 2010-10-28 20:41:51 UTC
SVN commit 1190737 by lukas:

rework the device cache to use QMetaObject and QMetaProperty, thus avoiding the freezes with newer
dbus versions (which was due to a bug in QtDbus)

CCBUG: 253039


 M  +1 -1      udisks/udisks.h  
 M  +8 -18     udisks/udisksdevice.cpp  
 M  +1 -2      udisks/udisksdevice.h  
 M  +8 -18     upower/upowerdevice.cpp  
 M  +1 -2      upower/upowerdevice.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1190737
Comment 6 Mark 2010-10-28 23:16:43 UTC
Could you tell me how i can get partitions to automount using udisks? It used to "work" some time ago without changing anything anywhere, but now (since ~ 1 month) i don't see any partitions anymore. Is there a special way to turn this on?
Comment 7 Dawit Alemayehu 2010-10-31 05:23:28 UTC
(In reply to comment #5)
> SVN commit 1190737 by lukas:
> 
> rework the device cache to use QMetaObject and QMetaProperty, thus avoiding the
> freezes with newer
> dbus versions (which was due to a bug in QtDbus)
> 
> CCBUG: 253039
> 
> 
>  M  +1 -1      udisks/udisks.h  
>  M  +8 -18     udisks/udisksdevice.cpp  
>  M  +1 -2      udisks/udisksdevice.h  
>  M  +8 -18     upower/upowerdevice.cpp  
>  M  +1 -2      upower/upowerdevice.h  
> 
> 
> WebSVN link: http://websvn.kde.org/?view=rev&revision=1190737

That did not solve the problem for me. Actually things are worse now. Before there were only freezes for non-KDE apps such as QtCreator. Now I get the noticable delays in KDE apps as well.  

So I did some digging into the issue a bit, I found that removing the line that attempts to prefill the cache in UDisksManager's ctor (line #60) fixes the lag/freeze issue completely on my system. No clue why such a slow operation is called from the ctor in the first place, but still I am not entirely sure how doing so would cause the lags or freezes either...

Can someone experiencing the same issues please try the attached one liner patch and confirm whether or not it resolves the issue for you ?
Comment 8 Dawit Alemayehu 2010-10-31 05:28:58 UTC
Created attachment 53007 [details]
proposed patch...
Comment 9 Lukáš Tinkl 2010-11-01 13:57:25 UTC
Uhm interesting but the proposed patch touches a different piece of code, unrelated to my patch above. I'll investigate more here
Comment 10 Lukáš Tinkl 2010-11-01 15:22:59 UTC
SVN commit 1191945 by lukas:

patch proposed by adawit (remove the device cache prefill)

CCBUG: 253039


 M  +0 -2      udisksmanager.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1191945
Comment 11 Dawit Alemayehu 2010-11-04 01:58:08 UTC
Created attachment 53117 [details]
proposed patch updated...

Here is a better patch. The new patch does the following:

1.) Remove the call to allDevices() from UDisksManager's ctor. Instead a new private method is added to properly initialize the devices list cache before use.

2.) Removes the aggessive caching logic in UDisksDevice::checkCache. It is deterimental to performance when accessing device properties in short live UDisksDevice objects.

3.) Remove the 'result' variable from UDisksManager::allDevices since it is unnecessary and m_deviceCache can be used directly.

4.) Other minor namespace (foreach -> Q_FOREACH) and macro-performance (moving the call for propertyCount() out of the for loop.
Comment 12 Alexandre Pereira 2010-11-28 10:30:33 UTC
well , i am having a kinda similar problem.

right now , every dolphin/konqueror file manager/file open operation freezes for 5 to 10 seconds.

while it freezes , it displays in strace an infinity of these messages :


recvmsg(13, 0x7fff625d3e50, MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource temporarily unavailable)
sendmsg(13, {msg_name(0)=NULL, msg_iov(2)=[{"l\1\0\1<\0\0\0\337\t\0\0\220\0\0\0\1\1o\0%\0\0\0/org/fre"..., 160}, {"\35\0\0\0org.freedesktop.UDisks.Devic"..., 60}], msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 220
poll([{fd=13, events=POLLIN}], 1, 25000) = 1 ([{fd=13, revents=POLLIN}])
recvmsg(13, {msg_name(0)=NULL, msg_iov(1)=[{"l\2\1\1\10\0\0\0:\230\5\0.\0\0\0\6\1s\0\5\0\0\0:1.96\0\0\0"..., 2048}], msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_CMSG_CLOEXEC) = 72
recvmsg(13, 0x7fff625d3e50, MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource temporarily unavailable)
sendmsg(13, {msg_name(0)=NULL, msg_iov(2)=[{"l\1\0\1:\0\0\0\340\t\0\0\220\0\0\0\1\1o\0%\0\0\0/org/fre"..., 160}, {"\35\0\0\0org.freedesktop.UDisks.Devic"..., 58}], msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 218
poll([{fd=13, events=POLLIN}], 1, 25000) = 1 ([{fd=13, revents=POLLIN}])
recvmsg(13, {msg_name(0)=NULL, msg_iov(1)=[{"l\2\1\1\10\0\0\0;\230\5\0.\0\0\0\6\1s\0\5\0\0\0:1.96\0\0\0"..., 2048}], msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_CMSG_CLOEXEC) = 72
recvmsg(13, 0x7fff625d3e50, MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource temporarily unavailable)
sendmsg(13, {msg_name(0)=NULL, msg_iov(2)=[{"l\1\0\1?\0\0\0\341\t\0\0\220\0\0\0\1\1o\0%\0\0\0/org/fre"..., 160}, {"\35\0\0\0org.freedesktop.UDisks.Devic"..., 63}], msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 223
poll([{fd=13, events=POLLIN}], 1, 25000) = 1 ([{fd=13, revents=POLLIN}])
recvmsg(13, {msg_name(0)=NULL, msg_iov(1)=[{"l\2\1\1\10\0\0\0<\230\5\0.\0\0\0\6\1s\0\5\0\0\0:1.96\0\0\0"..., 2048}], msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_CMSG_CLOEXEC) = 72
recvmsg(13, 0x7fff625d3e50, MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource temporarily unavailable)
sendmsg(13, {msg_name(0)=NULL, msg_iov(2)=[{"l\1\0\0019\0\0\0\342\t\0\0\220\0\0\0\1\1o\0%\0\0\0/org/fre"..., 160}, {"\35\0\0\0org.freedesktop.UDisks.Devic"..., 57}], msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 217
poll([{fd=13, events=POLLIN}], 1, 25000) = 1 ([{fd=13, revents=POLLIN}])
recvmsg(13, {msg_name(0)=NULL, msg_iov(1)=[{"l\2\1\1\10\0\0\0=\230\5\0.\0\0\0\6\1s\0\5\0\0\0:1.96\0\0\0"..., 2048}], msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_CMSG_CLOEXEC) = 72


i am using kde trunk, compiled on 26-11-2010.

thanks
Comment 13 Alexandre Pereira 2010-11-30 12:25:11 UTC
well ... updated to current trunk of today and my bug problem seems to be fixed.

thanks :)
Comment 14 Lukáš Tinkl 2010-11-30 12:52:07 UTC
Fixed in current trunk, should appear in KDE 4.6 beta2
Comment 15 Mark 2010-12-01 07:36:29 UTC
*** Bug 258441 has been marked as a duplicate of this bug. ***
Comment 16 Christophe Marin 2010-12-02 15:25:53 UTC
(In reply to comment #14)
> Fixed in current trunk, should appear in KDE 4.6 beta2

Not all apps are fixed it seems.

the file dialog still takes ages to appear with eg. vlc or Opera.

Using kdelibs 4.6.82 (rev. 1202688)

log:

# vlc
VLC media player 1.1.5 The Luggage (revision exported)
Blocked: call to unsetenv("DBUS_ACTIVATION_ADDRESS")
Blocked: call to unsetenv("DBUS_ACTIVATION_BUS_TYPE")
Blocked: call to setlocale(6, "")
Blocked: call to sigaction(17, 0x7f4c84102ab0, 0x7f4c84102b50)
Blocked: call to setlocale(6, "")
vlc(10914)/kdeui (KIconLoader) KSharedDataCache::Private::mapSharedMemory: Cache attached to shared memory, 6758400 bytes available out of 10485760
Blocked: call to putenv("LANGUAGE=")
vlc(10914)/kdecore (KSycoca) KSycocaPrivate::openDatabase: Trying to open ksycoca from "/var/tmp/kdecache-user/ksycoca4"
KGlobal::locale::Warning your global KLocale is being recreated with a valid main component instead of a fake component, this usually means you tried to call i18n related functions before your main component was created. You should not do that since it most likely will not work
vlc(10914)/kfile (kdelibs) KFileWidget::KFileWidget: startDir KUrl("file:///home/login")
Blocked: call to signal(12, 0x7f4c80755e90)
vlc(10914)/kio (KDirWatch) KDirWatchPrivate::addEntry: Added File "/home/login/.local/share//user-places.xbel" for "" ["KDirWatch-1"]
vlc(10914)/kio (bookmarks) KBookmarkManager::KBookmarkManager: starting KDirWatch for  "/home/user/.local/share//user-places.xbel"
vlc(10914)/kio (KDirListerCache) KDirListerCache::listDir: Listing directory: KUrl("trash:/")
vlc(10914)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0xd3fe50)
vlc(10914)/kio (Scheduler) KIO::SchedulerPrivate::protoQ: creating ProtoQueue instance for "trash"
vlc(10914)/kio (Scheduler) KIO::ProtoQueue::ProtoQueue: m_maxConnectionsTotal: 2 m_maxConnectionsPerHost: 2
vlc(10914)/kfile (kdelibs) KFileWidget::getStartUrl: for KUrl("file:///home/user") -> KUrl("file:///home/user") recentDirClass "" fileName ""
vlc(10914)/kfile (kdelibs) KDirOperator::setDirLister: mainWidget= KFileDialog(0x7f4c84100f10)
vlc(10914)/kfile (kdelibs) KDirOperator::Private::updateSorting: changing sort flags from QFlags(0x1|0x2|0x4|0x8|0x10|0x20|0x40|0x80|0x100|0x200|0x400|0x800|0x1000|0x2000|0x4000|0x8000|0x10000|0x20000|0x40000|0x80000|0x100000|0x200000|0x400000|0x800000|0x1000000|0x2000000|0x4000000|0x8000000|0x10000000|0x20000000|0x40000000|0xffffffff80000000) to QFlags(0x4)

*** hangs here

QProcess: Destroyed while process is still running.

*** hangs for a few seconds there as well


vlc(10914)/kfile (kdelibs) KDirOperator::Private::updateSorting: changing sort flags from QFlags(0x4) to QFlags(0x4)
vlc(10914)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0xe25040)
vlc(10914)/kio (Scheduler) KIO::SchedulerPrivate::protoQ: creating ProtoQueue instance for "file"
vlc(10914)/kio (Scheduler) KIO::ProtoQueue::ProtoQueue: m_maxConnectionsTotal: 50 m_maxConnectionsPerHost: 50
vlc(10914)/kio (KDirListerCache) KDirListerCache::listDir: Entry currently being listed: KUrl("trash:/") by (KDirLister(0xd74db0) )
vlc(10914)/kio (Slave) KIO::Slave::createSlave: createSlave "trash" for KUrl("trash:/")
vlc(10914)/kio (KIOConnection) KIO::ConnectionServer::listenForRemote: Listening on  "local:/tmp/ksocket-user/kfilemoduleU10914.slave-socket"
vlc(10914)/kio (Slave) KIO::Slave::createSlave: createSlave "file" for KUrl("file:///home/user")
vlc(10914)/kio (KIOConnection) KIO::ConnectionServer::listenForRemote: Listening on  "local:/tmp/ksocket-user/kfilemoduleG10914.slave-socket"
Warning: call to sigaction(13, 0x7f4c840fefe0, (nil))
vlc(10914)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::StatJob(0xe25040) KIO::Slave(0xa8f9b0)
vlc(10914)/kfile (kdelibs) KFileWidget::KFileWidget: stat of KUrl("file:///home/user") -> statRes true isDir true
vlc(10914)/kfile (kdelibs) KFileDialog::KFileDialog: KFileDialog connecting signals
vlc(10914)/kio (KDirListerCache) KDirListerCache::listDir: Listing directory: KUrl("file:///home/user")
vlc(10914)/kio (KDirWatch) KDirWatchPrivate::addEntry: Added Dir "/home/user" for "" ["KDirWatch-2"]
vlc(10914)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO::SimpleJob(0xf3d690)
vlc(10914)/kio (KDirWatch) KDirWatchPrivate::addEntry: Added File "/etc/samba/smb.conf" for "" ["KDirWatch-2"]
vlc(10914)/kio (KDirWatch) KDirWatchPrivate::addEntry: Added File "/etc/security/fileshare.conf" for "" ["KDirWatch-2"]
vlc(10914)/kio (KDirWatch) KDirWatchPrivate::useFAM:  Setup FAM (Req 1) for "/etc/security/fileshare.conf"
vlc(10914)/kio (KDirWatch) KDirWatchPrivate::addEntry: Added File "/etc/exports" for "" ["KDirWatch-2"]
vlc(10914)/kdecore (K*TimeZone*) KSystemTimeZonesPrivate::instance: instance(): ... initialised
vlc(10914)/kdecore (K*TimeZone*) KSystemTimeZonesPrivate::readConfig: readConfig(): local zone= "Europe/Paris"
vlc(10914)/kdecore (K*TimeZone*) KSystemTimeZonesPrivate::readZoneTab: readZoneTab( "/usr/share/zoneinfo/zone.tab" )
Blocked: call to setenv("TZ", ":Europe/Paris", 1)
Blocked: call to unsetenv("TZ")
Blocked: call to setenv("TZ", ":Europe/Paris", 1)
Blocked: call to unsetenv("TZ")
Blocked: call to setenv("TZ", ":Europe/Paris", 1)
Blocked: call to unsetenv("TZ")
Blocked: call to setenv("TZ", ":Europe/Paris", 1)
Blocked: call to setenv("TZ", ":Europe/Paris", 1)
vlc(10914)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::ListJob(0xf3d690) KIO::Slave(0xa8f9b0)
vlc(10914)/kio (KDirListerCache) KDirListerCache::slotResult: finished listing KUrl("file:///home/user")
vlc(10914)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::ListJob(0xd3fe50) KIO::Slave(0xc3ff00)
vlc(10914)/kio (KDirListerCache) KDirListerCache::slotResult: finished listing KUrl("trash:/")
Warning: call to srand(-343567822)
Warning: call to rand()
vlc(10914)/kdeui (KIconLoader) KSharedDataCache::insert: Overwriting existing old cached entry due to collision.
Comment 17 Christophe Marin 2010-12-02 16:56:45 UTC
forget the previous comment, the issue is not in solid anymore.
Comment 18 Sergio Martins 2013-04-12 00:36:00 UTC
I'm seeing this with 4.10, using KDE apps.

Here's a backtrace ( no debug symbols, sorry)
#0  0x00007ffff790009d in poll () from /usr/lib/libc.so.6
#1  0x00007ffff0dae900 in ?? () from /usr/lib/libdbus-1.so.3
#2  0x00007ffff0dad7cd in ?? () from /usr/lib/libdbus-1.so.3
#3  0x00007ffff0d983e4 in ?? () from /usr/lib/libdbus-1.so.3
#4  0x00007ffff0d9978d in ?? () from /usr/lib/libdbus-1.so.3
#5  0x00007ffff0d98b8c in dbus_connection_send_with_reply_and_block () from /usr/lib/libdbus-1.so.3
#6  0x00007ffff5b6a00b in ?? () from /usr/lib/libQtDBus.so.4
#7  0x00007ffff5b6a875 in ?? () from /usr/lib/libQtDBus.so.4
#8  0x00007ffff5b7a2eb in ?? () from /usr/lib/libQtDBus.so.4
#9  0x00007ffff5b7a429 in QDBusInterface::QDBusInterface(QString const&, QString const&, QString const&, QDBusConnection const&, QObject*) () from /usr/lib/libQtDBus.so.4
#10 0x00007fffeec48dac in ?? () from /usr/lib/libsolid.so.4
#11 0x00007fffeebf832c in ?? () from /usr/lib/libsolid.so.4
#12 0x00007fffeebf9b4c in ?? () from /usr/lib/libsolid.so.4
#13 0x00007fffeebf9cd5 in ?? () from /usr/lib/libsolid.so.4
#14 0x00007fffeebf9d8c in Solid::DeviceNotifier::instance() () from /usr/lib/libsolid.so.4
#15 0x00007fffeebf85b8 in Solid::Device::Device(QString const&) () from /usr/lib/libsolid.so.4
#16 0x00007fff61d1a77f in ?? () from /usr/lib/libkfile.so.4
#17 0x00007fff61d1d011 in KFilePlacesModel::Private::loadBookmarkList() () from /usr/lib/libkfile.so.4
#18 0x00007fff61d1d1e3 in KFilePlacesModel::Private::_k_reloadBookmarks() () from /usr/lib/libkfile.so.4
#19 0x00007fff61d1dea8 in KFilePlacesModel::KFilePlacesModel(QObject*) () from /usr/lib/libkfile.so.4
#20 0x00007fff61d14f3e in KFileWidget::KFileWidget(KUrl const&, QWidget*) () from /usr/lib/libkfile.so.4
#21 0x00007fff61f64d75 in ?? () from /usr/lib/kde4/kfilemodule.so
#22 0x00007ffff1f1e1bf in KFileDialog::KFileDialog(KUrl const&, QString const&, QWidget*, QWidget*) () from /usr/lib/libkio.so.5
#23 0x00007ffff1f1a249 in KEncodingFileDialog::KEncodingFileDialog(QString const&, QString const&, QString const&, QString const&, KFileDialog::OperationMode, QWidget*) () from /usr/lib/libkio.so.5
#24 0x00007ffff1f1b0ca in KEncodingFileDialog::getOpenUrlsAndEncoding(QString const&, QString const&, QString const&, QWidget*, QString const&) () from /usr/lib/libkio.so.5
#25 0x00007ffff64738a2 in ?? () from /usr/lib/libkateinterfaces.so.4
#26 0x00007ffff6476e9d in ?? () from /usr/lib/libkateinterfaces.so.4
#27 0x00007ffff57f9b8f in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#28 0x00007ffff6d43f82 in QAction::triggered(bool) () from /usr/lib/libQtGui.so.4
#29 0x00007ffff6d44170 in QAction::activate(QAction::ActionEvent) () from /usr/lib/libQtGui.so.4
#30 0x00007ffff710466f in ?? () from /usr/lib/libQtGui.so.4
---Type <return> to continue, or q <return> to quit---
#31 0x00007ffff710491c in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/libQtGui.so.4
#32 0x00007ffff71bebaa in QToolButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/libQtGui.so.4
#33 0x00007ffff6d99a49 in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
#34 0x00007ffff6d4a18c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#35 0x00007ffff6d4ee6b in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#36 0x00007ffff5fff96a in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#37 0x00007ffff57e46ae in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#38 0x00007ffff6d4afcb in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/libQtGui.so.4
#39 0x00007ffff6dc5ad4 in ?? () from /usr/lib/libQtGui.so.4
#40 0x00007ffff6dc4861 in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/libQtGui.so.4
#41 0x00007ffff6deaa22 in ?? () from /usr/lib/libQtGui.so.4
#42 0x00007ffff4e9d845 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#43 0x00007ffff4e9db78 in ?? () from /usr/lib/libglib-2.0.so.0
#44 0x00007ffff4e9dc34 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#45 0x00007ffff5812b86 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#46 0x00007ffff6dea69e in ?? () from /usr/lib/libQtGui.so.4
#47 0x00007ffff57e33ff in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#48 0x00007ffff57e3688 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#49 0x00007ffff57e8328 in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#50 0x00007ffff7bd6c65 in kdemain () from /usr/lib/libkdeinit4_kate.so
#51 0x00007ffff7844a15 in __libc_start_main () from /usr/lib/libc.so.6
#52 0x0000000000400721 in _start ()
Comment 19 Christoph Feck 2013-04-25 12:12:31 UTC
Sergio, can you find out which entry in the places list is responsible for the blocking?
Comment 20 Sergio Martins 2013-04-25 22:15:38 UTC
This was related to upower demon not running ( due to a polkitd screw up ).
It's good now for me.