Bug 106225 - KIOSlaves should die if they encounter errors
Summary: KIOSlaves should die if they encounter errors
Status: RESOLVED INTENTIONAL
Alias: None
Product: kio
Classification: Frameworks and Libraries
Component: imap (show other bugs)
Version: 0.1
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-24 18:39 UTC by Marcin Kasperski
Modified: 2018-05-08 17:54 UTC (History)
1 user (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 Marcin Kasperski 2005-05-24 18:39:06 UTC
Version:           1.7.2 (using KDE 3.3.2,  (3.1))
Compiler:          gcc version 3.3.5 (Debian 1:3.3.5-12)
OS:                Linux (i686) release 2.6.8

After exiting kmail with File/Exit option from menu, the imap client process (kdeinit: kio_newimap4 newimap) stays alive and running in spite of it is not necessary anymore.

Apart from some unnecessary ram and cpu usage, there is more important problem which made me to fill this bug: if imap client goes wild for some reason (there are some bugs in it unfortunately), even if one exits kmail and runs it again, the same imap client is reused and the problem stays. To recover one needs to exit kmail, start shell, do sth like ps waux | grep imap, kill found process and then start kmail. Troublesome.
Comment 1 Thiago Macieira 2005-05-25 05:27:07 UTC
KIOSlaves continue running after the app has quit, by design. They quit after some time of inactivity. So this is no bug.

Reopen if your kio_newimap4 slave keeps on running for more than a few minutes after kmail has quit.
Comment 2 Thiago Macieira 2005-05-25 05:27:22 UTC
KIOSlaves continue running after the app has quit, by design. They quit after some time of inactivity. So this is no bug.

Reopen if your kio_newimap4 slave keeps on running for more than a few minutes after kmail has quit.
Comment 3 Marcin Kasperski 2005-05-25 15:28:36 UTC
Yes, it disappears after a few minutes. But I am still unhappy, procedure: "in case your kmail IMAP handler starts to misbehave, exit kmail, wait for 5 minutes and then start kmail" does not look very nice.

Maybe the desing which require kioslaves to run after the app has quit could be adapted at least for the case when slaves misbehaved or reported errors just before the exit - in such case killing them immediately.
Comment 4 Thiago Macieira 2005-05-26 05:48:48 UTC
If the slave misbehaved, it can't be expected to follow a command such as "quit now".

If it reported an error from the server, but is working fine, why should it quit? For that matter, why would you quit KMail at all? There's nothing wrong.

Instead, please let us know of any bugs you find in the ioslave so that we can fix it. File one (new) bug report per issue you find, please.
Comment 5 Marcin Kasperski 2005-05-30 16:29:56 UTC
I reported some errors regarding IMAP handling (the most 
annoying - IMAP slave entering permanent 'weird' state when one removed some messages using another IMAP client - has IIRC been FIXED). Nevertheless for the normal KDE user (as me), propagation of the fix between the KDE CVS and the distribution takes 1 year or so, so it is always worth to implement general solutions which reduce the impact of bugs until they are fixed...

And, if slave misbehaved so it does not even handle 'quit' command, it surely should be immediately kill-ed - of course the thing to be implemented generally, not only in kmail 
Comment 6 Thiago Macieira 2005-06-01 01:05:24 UTC
That I agree. klauncher should kill slaves that don't respond to commands.

Also, slaves should suicide if they detect an impossible condition --- e.g., sent a QUIT command and got a bizarre answer.
Comment 7 kavol 2006-08-30 10:52:58 UTC
yeah, I have run into such troubles too ...

my IMAP connection crashes everytime and only restarting kmail (and imap process) helps; however, sometimes I have to kill the processes manually ... if the imap process reports one single error, it (nearly) never recovers and it has to be restarted :-(
Comment 8 Thomas McGuire 2007-12-12 23:39:02 UTC
Reassigning the bugs of the SMTP, IMAP and POP ioslaves to kdepim-bugs.
Comment 9 Thomas McGuire 2007-12-12 23:44:23 UTC
Undo autoconfirm.
Comment 10 Nate Graham 2018-05-08 17:54:31 UTC
Not dying in response to errors is by design. Issues need to be handled another way.