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

List:       kde-commits
Subject:    Re: [kdelibs/KDE/4.7] kio/kio: fd leak fix by Ambroz Bizjak:
From:       Dawit A <adawit () kde ! org>
Date:       2011-08-18 6:25:16
Message-ID: CALa28R4cfwB=JLRYkL-Dm_7Bz6a-zrocsHfHOLy1_9+W3S_c6Q () mail ! gmail ! com
[Download RAW message or body]

David,

I do not understand the point of this patch. It seems to want to
delete all QObjects in the current process in order to fix a fd leak ?
Is that the intent ? If so, then there is a big big problem. After
this patch was committed Konqueror completely stops working for me
whenever I browse a given website, leave it alone for a long while,
and come back to browse the same site I was viewing earlier. After
that I cannot use that particular instance of Konqueror. I have to
launch a new one.

I see the following error message in my .xsession-errors file:

konqueror(18947)/kio (Slave) KIO::Slave::createSlave: createSlave
"https" for KUrl("<sensored>")
konqueror(18947) KIO::SlavePrivate::SlavePrivate: Connection server
not listening, could not connect
klauncher(5035)/kio (KLauncher) KLauncher::requestSlave: KLauncher:
launching new slave  "kio_http"  with protocol= "https"  args=
("https", "local:/tmp/ksocket-dalemayehu/klauncherMT5035.slave-socket",
"")
klauncher(5035)/kio (KLauncher) KLauncher::processRequestReturn:
"kio_http" (pid 24120) up and running.
kio_http(24120)/kio (KIOConnection) KIO::Connection::connectToRemote:
Unknown requested KIO::Connection protocol=' "" ' ( "" )
kio_http(24120)/kio (kioslave) KIO::SlaveBase::connectSlave: failed to
connect to ""
Reason: ""
couldn't lock local file
konqueror(18947)/kio (Slave) KIO::Slave::timeout: slave failed to
connect to application pid= 24120  protocol= "https"
konqueror(18947)/kio (Slave) KIO::Slave::timeout: Houston, we lost our
slave, pid= 24120
konqueror(18947)/kio (Slave) KIO::Slave::timeout: slave died pid =  24120
konqueror(18947)/kio (AccessManager) KDEPrivate::AccessManagerReply::jobError: "
couldn't lock local file
couldn't lock local file
couldn't lock local file
couldn't lock local file
couldn't lock local file
couldn't lock local file

Moreover, are not KIO::Scheduler and KLauncher the ones responsible
for managing ioslave creation/deletion ? BTW, reverting this patch
seems to solve the problem for me. I am still testing with longer wait
periods before using the browser again, but so far doing so seems to
have resolved the regression.

On Wed, Aug 10, 2011 at 5:49 PM, David Faure <faure@kde.org> wrote:
> Git commit a889845bb441e6325df45e1c6d2263ac82358fbe by David Faure.
> Committed on 10/08/2011 at 02:30.
> Pushed by dfaure into branch 'KDE/4.7'.
>
> fd leak fix by Ambroz Bizjak: deleteLater has no effect w/o eventloop
>
> M  +7    -0    kio/kio/slavebase.cpp
>
> http://commits.kde.org/kdelibs/a889845bb441e6325df45e1c6d2263ac82358fbe
>
> diff --git a/kio/kio/slavebase.cpp b/kio/kio/slavebase.cpp
> index 221ef75..ccfc06d 100644
> --- a/kio/kio/slavebase.cpp
> +++ b/kio/kio/slavebase.cpp
> @@ -37,6 +37,7 @@
>  #include <QtCore/QFile>
>  #include <QtCore/QList>
>  #include <QtCore/QDateTime>
> +#include <QtCore/QCoreApplication>
>
>  #include <kcrash.h>
>  #include <kconfig.h>
> @@ -314,7 +315,13 @@ void SlaveBase::dispatchLoop()
>             kDebug(7019) << "slave was killed, returning";
>             return;
>         }
> +
> +        // execute deferred deletes
> +        QCoreApplication::sendPostedEvents(NULL, QEvent::DeferredDelete);
>     }

Do you really want to send a deferred delete request to all the
QObject's in the current process from within the while loop ?

> +
> +    // execute deferred deletes
> +    QCoreApplication::sendPostedEvents(NULL, QEvent::DeferredDelete);
> }

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

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