[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kmail-devel
Subject:    PATCH: Re: Bug#17623: VFS: file-max limit 4096 reached (because of kmail)
From:       Michael =?iso-8859-1?q?H=E4ckel?= <Michael () Haeckel ! Net>
Date:       2000-12-25 13:55:26
[Download RAW message or body]

Hi,

can someone please comment this patch?
There is a problem, when KMail does interval mail checking too often while 
the net connection is down.

Regards,
Michael Häckel

----------  Forwarded Message  ----------
Subject: Re: Bug#17623: VFS: file-max limit 4096 reached (because of kmail)
Date: Mon, 25 Dec 2000 12:03:18 +0100
From: Wolfgang Rohdewald <WRohdewald@dplanet.ch>
To: kmail@max.tat.physik.uni-tuebingen.de, Michael Häckel 
<Michael@Haeckel.Net>


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sunday 24 December 2000 11:29, Michael Häckel wrote:
> On Sunday, 24. December 2000 00:27, Wolfgang Rohdewald wrote:
> > for whatever reason kmail gave me a popup window
> > "cannot access //usr/spool/mail/wr". I did not note the exact message,
> > sorry.
> >
> > After pressing OK and going online lots of QTimers started to get mail. I
> > normally check 3 pop servers every minute - at least that's how it is
> > configured.
>
> Hopefully fixed. KMail should check now, it the account is already in the
> list for mail checking. Please tell me, if it still doesn't work.

I suppose meanwhile I have the updated cvs, but there is still a problem -
if it is the same. There a no longer so many qtimers going off, so your
patch seems to work. BUT - All my 4 pop3 slaves have hundreds of open
 sockets.

Please have a look at bug report 16190 - it contains a proposed patch to
kio which in my opinion forgets to close sockets when it should. I never
got any response to this bug report. I never tried it either yet because
until 3 days ago this never happened again. Now I have it every morning.



Package: kio
Version: v1.9.8 (KDE 2.0 >= 20001117)
Severity: grave
Compiler: gcc version 2.95.2 19991024 (release)
OS: Linux 2.2.16 i686 (compiled sources)

in TCPSlaveBase::ConnectToHost, is this code correct ? Should
there be no close(m_iSock) before the return statements ? Fix
see below, untested yet. Please edit the line ::connect first, might
be wrapped.

Problem: This morning the system had run out of file descriptors,
caused by kmail. Kmail output (filtered:)

kio (KIOJob): error 23 pop.dplanet.ch
kio (KIOJob): error 23 pop.dplanet.ch

8 lines per minute (I was testing interval mail checking)

/tmp# diff -u old /u2/src/cvs/kde/kdelibs/kio/tcpslavebase.cpp
- --- old Tue Nov 28 12:30:44 2000
+++ /u2/src/cvs/kde/kdelibs/kio/tcpslavebase.cpp        Tue Nov 28 12:56:08
 2000@@ -121,11 +121,13 @@ if (!KSocket::initSockaddr(&server_name, host,
 port))
         {
                error( ERR_UNKNOWN_HOST, host);
+               CloseDescriptor();
                return false;
         }

        if (::connect(m_iSock, (struct sockaddr*)(&server_name),
 sizeof(server_name))) { error( ERR_COULD_NOT_CONNECT, host);
+               CloseDescriptor();
                return false;
        }

@@ -175,6 +177,10 @@
                fp=0;
                m_iSock=-1;
                CleanSSL();
+       }
+       if (m_iSock != -1) {
+               close(m_iSock);
+               m_iSock=-1;
        }
 }

_______________________________________________
Kmail Developers mailing list
Kmail@master.kde.org
http://master.kde.org/mailman/listinfo/kmail

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic