Bug 171185 - kfmclient openUrl doesn't quit when using !konqueror as default browser
Summary: kfmclient openUrl doesn't quit when using !konqueror as default browser
Status: CLOSED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: general (show other bugs)
Version: 4.2.0
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
: 182497 194883 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-09-16 22:57 UTC by Andrey Rakhmatullin
Modified: 2009-08-03 18:15 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Rakhmatullin 2008-09-16 22:57:31 UTC
Version:            (using KDE 4.1.1)
OS:                Linux
Installed from:    Unlisted Binary Package

If I use 'opera -backgroundtab' as the external browser,  kfmclient openURL http://example.com doesn't quit, while kfmclient from KDE3 does.
May be KRun doesn't send finished() signal if the application quits just after starting (which is the opera case, because it just passes the URL to the already running instance and quits). Startup notification also doesn't stop after activating opera (probably because of the same KRun regression).
Comment 1 Meder Bakirov 2008-11-20 08:56:05 UTC
I can confirm this with Akregator 1.3.3. 

For every topic I click in my feeds, akregator leaves "kfmclient openURL ..."-type processes. I use firefox as an external browser. Finally, it ends up with "too many open files" error in KDE (4.1.3) and I have to solve this by killing all kfmclient-processes.

Here is an example from my working machine (shows kfmclient processes with links, I have clicked on to open in external browser (firefox)):

dotcoder@dotcoder ~ $ ps ax|grep kfmclient
 6334 ?        S      0:00 /usr/bin/kfmclient openURL http://obso1337.org/hci/kde/SLUG_Meeting_19_Nov_2008.pdf
 6347 ?        S      0:00 /usr/bin/kfmclient openURL http://aseigo.blogspot.com/2008/11/plasma-systray-42.html
 6443 ?        S      0:00 /usr/bin/kfmclient openURL http://www.opennet.ru/opennews/art.shtml?num=18997
 6460 ?        S      0:00 /usr/bin/kfmclient openURL http://dot.kde.org/1227137279/
 6474 ?        S      0:00 /usr/bin/kfmclient openURL http://wiki.nil.com/Network_address_translation_of_DNS_responses
27000 ?        S      0:00 /usr/bin/kfmclient openURL http://feeds.dzone.com/~r/dzone/frontpage/~3/458089534/chris_khalils_musings_web_30_user_experience_and.html
27013 ?        S      0:00 /usr/bin/kfmclient openURL http://www.opennet.ru/opennews/art.shtml?num=18981
29177 ?        S      0:00 /usr/bin/kfmclient openURL http://flycat.info/2008/11/19/spasenie-gentoo/
29610 ?        S      0:00 /usr/bin/kfmclient openURL http://feeds.dzone.com/~r/dzone/frontpage/~3/458341874/19_photoshop_tutorials_to_design_a_own_business_c.html
dotcoder@dotcoder ~ $

Thanks!
Comment 2 Christopher Neufeld 2008-11-28 22:32:33 UTC
I also experience this.  I have set my browser to firefox, and currently Akregator has left 16 of these processes around.  Also, in one case recently, a leftover kfmclient process was holding one of my ALSA sound devices open, and nothing else, neither KDE binaries nor non-KDE, could produce sound until I had killed the kfmclient job.
Comment 3 Christopher Neufeld 2009-02-06 22:20:55 UTC
It seems as if the kfmclient starts up holding at least some of the open file descriptors of the process that launched it.  I was on a video call/chat in Skype, and clicked a link in the chat window.  The kfmclient that was created wound up holding the /dev/video device.  When I later started Skype again, it was unable to access the camera for a video call because the kfmclient from hours earlier was still alive and holding that device open.
Comment 4 Andrey Rakhmatullin 2009-03-25 21:44:21 UTC
(In reply to comment #3)
> It seems as if the kfmclient starts up holding at least some of the open file
> descriptors of the process that launched it.  I was on a video call/chat in
> Skype, and clicked a link in the chat window.  The kfmclient that was created
> wound up holding the /dev/video device.  When I later started Skype again, it
> was unable to access the camera for a video call because the kfmclient from
> hours earlier was still alive and holding that device open.

Yes, it doesn't close any fds, it can be verified using lsof.
4.2.1: still here, btw.
Comment 5 Matt Sharp 2009-03-31 14:15:57 UTC
I can confirm this issue too.  Akregator opens a feed in firefox (which is set as the default browser.  The kfmclient process then doesn't terminate.  I attached to one of them using gdb and got this backtrace.  

#0  0xb7f37424 in __kernel_vsyscall ()
#1  0x4f515e51 in select () from /lib/libc.so.6
#2  0x4160cfb0 in QEventDispatcherUNIX::select (this=<value optimized out>, nfds=<value optimized out>, readfds=<value optimized out>, writefds=<value optimized out>, exceptfds=<value optimized out>, timeout=<value optimized out>) at kernel/qeventdispatcher_unix.cpp:608
#3  0x42856f93 in QEventDispatcherX11::select (this=<value optimized out>, nfds=<value optimized out>, readfds=<value optimized out>, writefds=Could not find the frame base for "QEventDispatcherX11::select(int, fd_set*, fd_set*, fd_set*, timeval*)".
) at kernel/qeventdispatcher_x11.cpp:190
#4  0x4160dde4 in QEventDispatcherUNIXPrivate::doSelect (this=<value optimized out>, flags=<value optimized out>, timeout=<value optimized out>) at kernel/qeventdispatcher_unix.cpp:172
#5  0x4160e2b9 in QEventDispatcherUNIX::processEvents (this=<value optimized out>, flags=<value optimized out>) at kernel/qeventdispatcher_unix.cpp:895
#6  0x42857193 in QEventDispatcherX11::processEvents (this=<value optimized out>, flags=<value optimized out>) at kernel/qeventdispatcher_x11.cpp:154
#7  0x415e54fd in QEventLoop::processEvents (this=<value optimized out>, flags=<value optimized out>) at kernel/qeventloop.cpp:149
#8  0x415e5690 in QEventLoop::exec (this=<value optimized out>, flags=Could not find the frame base for "QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)".
) at kernel/qeventloop.cpp:196
#9  0x415e75f6 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:851
#10 0x427d3547 in QApplication::exec () at kernel/qapplication.cpp:3337
#11 0x411949b4 in ClientApp::createNewWindow (url=<value optimized out>, newTab=<value optimized out>, tempFile=<value optimized out>, mimetype=<value optimized out>) at /tmp/portage/kde-base/konqueror-4.2.1-r1/work/konqueror-4.2.1/konqueror/client/kfmclient.cpp:345
#12 0x4119585c in ClientApp::doIt () at /tmp/portage/kde-base/konqueror-4.2.1-r1/work/konqueror-4.2.1/konqueror/client/kfmclient.cpp:523
#13 0x411969f0 in kdemain (argc=<value optimized out>, argv=<value optimized out>) at /tmp/portage/kde-base/konqueror-4.2.1-r1/work/konqueror-4.2.1/konqueror/client/kfmclient.cpp:140
#14 0x080487b2 in main (argc=0x4008108, argv=0x0) at /tmp/portage/kde-base/konqueror-4.2.1-r1/work/konqueror_build/konqueror/client/kfmclient_dummy.cpp:3

If you need more (such as the actual function parameters), let me know and I'll try and build a more debugging friendly binary and test it.
Comment 6 Thomas Capricelli 2009-05-04 20:38:22 UTC
I guess i have the same problem. I'm using firefox as default browser and i have lot (now : 36, but sometimes a lot more) kfmclient (as seen by 'pidof kfmclient | wc -w').

It even go as far as i can't start any X client, if i try in a konsole, i have a message saying that the maximum number of client is reached (i dont have the exact message here, sorry). Killing kfmclient's solve this problem.

I have had this problem for very long, probably at least from KDE 4.1.0
Comment 7 JJ Luza 2009-05-11 17:28:16 UTC
*** Bug 182497 has been marked as a duplicate of this bug. ***
Comment 8 JJ Luza 2009-05-11 17:33:51 UTC
I just notice this report.
I had opened a bug for this problem in january (see bug 182497), so I marked mine as duplicate of this one.

I can confirm it happens with akregator but I have noticed it with web shortcut (see my bug) in krunner too.

I get it if I set something else than default browser (konqueror) in systemsettings (eg: arora or firefox)

People who encounter this bug should vote to confirm it
Comment 9 Jonas Nyrén 2009-05-16 15:57:04 UTC
*** This bug has been confirmed by popular vote. ***
Comment 10 Pradeepto K. Bhattacharya 2009-07-08 14:25:17 UTC
SVN commit 993295 by pradeepto:

 -- kfmclient openUrl doesn't quit when using !konqueror ( fix using KGlobal::setAllowQuit(), thanks to Will Stephenson ;) )
BUG:171185
 


 M  +1 -0      kfmclient.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=993295
Comment 11 Christopher Neufeld 2009-07-12 16:12:34 UTC
Confirmed, I no longer see the bad behaviour in a checkout of svn revision 994816.
Comment 12 Tommi Tervo 2009-07-15 09:05:42 UTC
*** Bug 194883 has been marked as a duplicate of this bug. ***
Comment 13 Tommi Tervo 2009-07-15 09:27:17 UTC
SVN commit 996912 by teve:

Backported Pradeepto's commit r993295 to 4.3 branch
CCBUG:171185


 M  +1 -0      kfmclient.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=996912