Bug 307973 - konsole blocked because the request to get a favicon never return
Summary: konsole blocked because the request to get a favicon never return
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Unclassified
Component: kdecore (show other bugs)
Version: Git
Platform: Compiled Sources Linux
: NOR critical (vote)
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
: 310244 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-10-06 11:06 UTC by Jaime Torres
Modified: 2012-12-15 07:18 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.9.5


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jaime Torres 2012-10-06 11:06:36 UTC
With all the bandwidth used by other application, kded gets blocked waiting for a web favicon.
Result, in my case: konsole blocked.

Reproducible: Always

Steps to Reproduce:
1. Start to download a very big file with firefox, to use all your bandwith
2.while the download is going on, in konsole, select text until it is blocked.
3.
Actual Results:  
It is blocked in KMimeType::favIconForUrl (url=...)  (kmimetype.cpp:498) forever.

Expected Results:  
Shouldn't  favIconForUrl respect the KDE settings for network timeout?
Shouldn't favIconForUrl have a cache?

where konsole gets blocked:

#5  0x00007f6f86847fdc in dbus_connection_send_with_reply_and_block () from /lib64/libdbus-1.so.3
#6  0x00007f6f982c439f in q_dbus_connection_send_with_reply_and_block (error=0x7fffb2d73b20, timeout_milliseconds=-1, message=0x7f6f90839880, 
    connection=0x7f6f90891dc0) at /g/kdegit/qt/src/dbus/qdbus_symbols_p.h:135
#7  QDBusConnectionPrivate::sendWithReply (this=0x7f6f9088f500, message=..., sendMode=<optimized out>, timeout=-1)
    at /g/kdegit/qt/src/dbus/qdbusintegrator.cpp:1902
#8  0x00007f6f982afff3 in QDBusConnection::call (this=0x7f6f7a638ec8, message=..., mode=<optimized out>, timeout=<optimized out>)
    at /g/kdegit/qt/src/dbus/qdbusconnection.cpp:597
#9  0x00007f6f982d2f56 in QDBusAbstractInterface::callWithArgumentList (this=this@entry=0x7fffb2d73ee0, mode=QDBus::Block, mode@entry=
    QDBus::AutoDetect, method=..., args=...) at /g/kdegit/qt/src/dbus/qdbusabstractinterface.cpp:468
#10 0x00007f6f982d458e in QDBusAbstractInterface::call (this=0x7fffb2d73ee0, mode=mode@entry=QDBus::AutoDetect, method=..., arg1=..., arg2=..., arg3=
    ..., arg4=..., arg5=..., arg6=..., arg7=..., arg8=...) at /g/kdegit/qt/src/dbus/qdbusabstractinterface.cpp:724
#11 0x00007f6f982d4d11 in QDBusAbstractInterface::call (this=<optimized out>, method=..., arg1=..., arg2=..., arg3=..., arg4=..., arg5=..., arg6=..., 
    arg7=..., arg8=...) at /g/kdegit/qt/src/dbus/qdbusabstractinterface.cpp:667
#12 0x00007f6f9868b5bb in KMimeType::favIconForUrl (url=...) at /g/kdegit/kdelibs/kdecore/services/kmimetype.cpp:498
#13 0x00007f6f904718dd in lookupIconNameFor (url=..., type=KUriFilterData::NetProtocol) at /g/kdegit/kdelibs/kio/kio/kurifilter.cpp:47
#14 0x00007f6f90471bae in KUriFilterPlugin::iconNameFor (this=<optimized out>, url=..., type=<optimized out>)
    at /g/kdegit/kdelibs/kio/kio/kurifilter.cpp:569
#15 0x00007f6f7aa1ec10 in KAutoWebSearch::populateProvidersList (this=this@entry=0x7f6f7d4ab320, searchProviders=..., data=..., 
    allproviders=allproviders@entry=false) at /g/kdegit/kde-runtime/kurifilter-plugins/ikws/kuriikwsfilter.cpp:104
#16 0x00007f6f7aa1ed4f in KAutoWebSearch::filterUri (this=0x7f6f7d4ab320, data=...)
    at /g/kdegit/kde-runtime/kurifilter-plugins/ikws/kuriikwsfilter.cpp:119
#17 0x00007f6f90471e7a in KUriFilter::filterUri (this=this@entry=0x7f6f7c1432a0, data=..., filters=...) at /g/kdegit/kdelibs/kio/kio/kurifilter.cpp:629
#18 0x00007f6f90471f77 in KUriFilter::filterSearchUri (this=0x7f6f7c1432a0, data=..., types=...) at /g/kdegit/kdelibs/kio/kio/kurifilter.cpp:684
#19 0x00007f6f8414d357 in Konsole::SessionController::updateWebSearchMenu (this=this@entry=0x7f6f7d482900)
    at /g/kdegit/konsole/src/SessionController.cpp:394
#20 0x00007f6f8414d6f1 in Konsole::SessionController::selectionChanged (this=this@entry=0x7f6f7d482900, selectedText=...)
    at /g/kdegit/konsole/src/SessionController.cpp:365
#21 0x00007f6f841520dc in Konsole::SessionController::qt_static_metacall (_o=0x7f6f7d482900, _c=<optimized out>, _id=5, _a=<optimized out>)
    at /g/b45/konsole/src/SessionController.moc:154
#22 0x00007f6f97f3d3bf in QMetaObject::activate (sender=0x7f6f90a43000, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fffb2d745b0)
    at /g/kdegit/qt/src/corelib/kernel/qobject.cpp:3539
#23 0x00007f6f84144445 in Konsole::Session::selectionChanged (this=this@entry=0x7f6f90a43000, _t1=...) at /g/b45/konsole/src/Session.moc:420
#24 0x00007f6f84146e83 in Konsole::Session::qt_static_metacall (_o=0x7f6f90a43000, _c=<optimized out>, _id=15, _a=<optimized out>)
    at /g/b45/konsole/src/Session.moc:181
Comment 1 Christoph Feck 2012-10-06 11:29:44 UTC
Can you please check which kded module is responsible for blocking calls to the dbus system? Likely candidates are the package update (e.g. muon, see bug 307049) or network status modules (see bug 268038).

For more information, see http://kdepepo.wordpress.com/2011/05/11/troubleshooting-kded4-bugs/
Comment 2 Jekyll Wu 2012-10-06 12:07:09 UTC
Also see  bug 306338.  Finally someone finds a way to reproduce the freeze.
Comment 3 Jaime Torres 2012-10-07 06:52:05 UTC
The problem has reproduced here again, not as I expected, but in any case: I know the (or one of the) kded4 module that freezes all.

A semaphore in libasound, used by phononServer.

#0  0x00007f22addb4c77 in semop () from /lib64/libc.so.6
#1  0x00007f2290821840 in snd_pcm_dsnoop_open () from /usr/lib64/libasound.so.2
#2  0x00007f22908220d3 in _snd_pcm_dsnoop_open () from /usr/lib64/libasound.so.2
#3  0x00007f22907e80ba in ?? () from /usr/lib64/libasound.so.2
#4  0x00007f22907e8648 in ?? () from /usr/lib64/libasound.so.2
#5  0x00007f22907ea632 in ?? () from /usr/lib64/libasound.so.2
#6  0x00007f2290809ed1 in _snd_pcm_plug_open () from /usr/lib64/libasound.so.2
#7  0x00007f22907e80ba in ?? () from /usr/lib64/libasound.so.2
#8  0x00007f22907ea679 in ?? () from /usr/lib64/libasound.so.2
#9  0x00007f2290825956 in _snd_pcm_asym_open () from /usr/lib64/libasound.so.2
#10 0x00007f22907e80ba in ?? () from /usr/lib64/libasound.so.2
#11 0x00007f22907ea679 in ?? () from /usr/lib64/libasound.so.2
#12 0x00007f2290810292 in _snd_pcm_empty_open () from /usr/lib64/libasound.so.2
#13 0x00007f22907e80ba in ?? () from /usr/lib64/libasound.so.2
#14 0x00007f22907e8648 in ?? () from /usr/lib64/libasound.so.2
#15 0x00007f228ed7f526 in PhononServer::findVirtualDevices (this=this@entry=0x7f2294cdddd0) at /g/kdegit/kde-runtime/phonon/kded-module/phononserver.cpp:252
#16 0x00007f228ed82cdb in PhononServer::findDevices (this=this@entry=0x7f2294cdddd0) at /g/kdegit/kde-runtime/phonon/kded-module/phononserver.cpp:673
#17 0x00007f228ed8321f in PhononServer::timerEvent (this=0x7f2294cdddd0, e=<optimized out>) at /g/kdegit/kde-runtime/phonon/kded-module/phononserver.cpp:1058
#18 0x00007f22afcf679c in QObject::event (this=0x7f2294cdddd0, e=<optimized out>) at /g/kdegit/qt/src/corelib/kernel/qobject.cpp:1157
#19 0x00007f22aed364b1 in QApplicationPrivate::notify_helper (this=this@entry=0x7f22a88778c0, receiver=receiver@entry=0x7f2294cdddd0, e=e@entry=0x7fff146fb9c0)
    at /g/kdegit/qt/src/gui/kernel/qapplication.cpp:4560
#20 0x00007f22aed3b559 in QApplication::notify (this=0x7fff146fbde0, receiver=0x7f2294cdddd0, e=0x7fff146fb9c0) at /g/kdegit/qt/src/gui/kernel/qapplication.cpp:4421
#21 0x00007f22b0d785ce in KApplication::notify (this=0x7fff146fbde0, receiver=0x7f2294cdddd0, event=0x7fff146fb9c0) at /g/kdegit/kdelibs/kdeui/kernel/kapplication.cpp:311
#22 0x00007f22afcdfc0d in QCoreApplication::notifyInternal (this=0x7fff146fbde0, receiver=0x7f2294cdddd0, event=0x7fff146fb9c0) at /g/kdegit/qt/src/corelib/kernel/qcoreapplication.cpp:915
#23 0x00007f22afd14072 in QCoreApplication::sendEvent (event=0x7fff146fb9c0, receiver=<optimized out>) at ../../include/QtCore/../../../../kdegit/qt/src/corelib/kernel/qcoreapplication.h:231
#24 QTimerInfoList::activateTimers (this=0x7f22a8839520) at /g/kdegit/qt/src/corelib/kernel/qeventdispatcher_unix.cpp:611
#25 0x00007f22afd10aa4 in timerSourceDispatch (source=<optimized out>) at /g/kdegit/qt/src/corelib/kernel/qeventdispatcher_glib.cpp:186
#26 timerSourceDispatch (source=<optimized out>) at /g/kdegit/qt/src/corelib/kernel/qeventdispatcher_glib.cpp:180
#27 0x00007f22afd10ad1 in idleTimerSourceDispatch (source=<optimized out>) at /g/kdegit/qt/src/corelib/kernel/qeventdispatcher_glib.cpp:233
#28 0x00007f22aa2ee3b5 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#29 0x00007f22aa2ee6e8 in ?? () from /usr/lib64/libglib-2.0.so.0
#30 0x00007f22aa2ee7a4 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#31 0x00007f22afd11204 in QEventDispatcherGlib::processEvents (this=0x7f22a8933be0, flags=...) at /g/kdegit/qt/src/corelib/kernel/qeventdispatcher_glib.cpp:424
#32 0x00007f22aede4b46 in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at /g/kdegit/qt/src/gui/kernel/qguieventdispatcher_glib.cpp:204
#33 0x00007f22afcde16f in QEventLoop::processEvents (this=this@entry=0x7fff146fbc40, flags=...) at /g/kdegit/qt/src/corelib/kernel/qeventloop.cpp:149
#34 0x00007f22afcde428 in QEventLoop::exec (this=0x7fff146fbc40, flags=...) at /g/kdegit/qt/src/corelib/kernel/qeventloop.cpp:204
#35 0x00007f22afce39a8 in QCoreApplication::exec () at /g/kdegit/qt/src/corelib/kernel/qcoreapplication.cpp:1187
#36 0x00007f229c1efbdc in kdemain (argc=1, argv=0x7f22a8933ac0) at /g/kdegit/kdelibs/kded/kded.cpp:924
#37 0x000000000040848b in launch (argc=argc@entry=1, _name=_name@entry=0x40c8b9 "kded4", args=args@entry=0x0, cwd=cwd@entry=0x0, envc=envc@entry=0, envs=envs@entry=0x0, reset_env=reset_env@entry=false,
    tty=tty@entry=0x0, avoid_loops=avoid_loops@entry=false, startup_id_str=startup_id_str@entry=0x40c619 "0") at /g/kdegit/kdelibs/kinit/kinit.cpp:734
#38 0x00000000004054d1 in main (argc=4, argv=<optimized out>, envp=0x7fff146fc2f0) at /g/kdegit/kdelibs/kinit/kinit.cpp:1849
Comment 4 qbasicer+bugs 2012-11-02 13:34:44 UTC
I got this today too, I wasn't downloading anything but I was trying to restart munin and copying the error output
Comment 5 Dawit Alemayehu 2012-11-17 20:23:20 UTC
*** Bug 310244 has been marked as a duplicate of this bug. ***
Comment 6 Dawit Alemayehu 2012-11-17 20:37:45 UTC
The dbus call blocking is another issue, but the cause (updating the web search menu) when selection changes is rather curious. I do not see why the search menu which is only shown when the context menu is displayed needs to be updated everytime the user changes the current selection ; especially since "updateWebSearchMenu" is already called right before the context menu is displayed. 

Removing the updateWebSearchMenu call from selectionChanged in Konsole should resolve this issue, but it won't resolve the problem it exposed, i.e. what is causing dbus to block indefinitely.
Comment 7 Dawit Alemayehu 2012-12-01 04:59:57 UTC
Git commit 7656ce515ad6676c591dff5a547657c6f57036bb by Dawit Alemayehu.
Committed on 17/11/2012 at 21:42.
Pushed by adawit into branch 'master'.

Don't call updateWebSearchMenu from selectionChanged. The search menu items will
be added before the context menu is displayed.
FIXED-IN: 4.10

M  +0    -1    src/SessionController.cpp

http://commits.kde.org/konsole/7656ce515ad6676c591dff5a547657c6f57036bb
Comment 8 Dawit Alemayehu 2012-12-01 05:14:04 UTC
Git commit 9103b8d386df59dcb6f8f34cf6089771d78a1013 by Dawit Alemayehu.
Committed on 17/11/2012 at 21:42.
Pushed by adawit into branch 'KDE/4.9'.

Don't call updateWebSearchMenu from selectionChanged. The search menu items will
be added before the context menu is displayed.
FIXED-IN: 4.10
REVIEW: 107511

(cherry picked from commit 7656ce515ad6676c591dff5a547657c6f57036bb)

M  +0    -1    src/SessionController.cpp

http://commits.kde.org/konsole/9103b8d386df59dcb6f8f34cf6089771d78a1013