Review Request: Do not terminate threads
Albert Astals Cid
tsdgeos at terra.es
Thu Aug 4 10:31:31 BST 2011
> On Aug. 4, 2011, 3:19 a.m., Dawit Alemayehu wrote:
> > I do not like this patch for the very reason you stated. I do not want the mutex there either because it is rather expensive. As it stands we start a thread for each lookup right now which in of itself is already too expensive for my taste. Hence, I will have to think of some other way to avoid the even worse solution of creating a local even loop.
> >
> > Having said that, are you using a slow DNS server ? The only way the lookup thread gets terminated is if your nameserver takes longer than 1000 ms per query. That is because the two KUriFilterPlugins that use it set a timeout value of that duration. Otherwise, that code path should not be encountered at all!
So you do not want a patch that fixes konqueror crashing 75% times i use it in exchange of having a small memory leak once in a blue moon? Awesome.
And yes, obviously i have a slow DNS server, otherwise why would i hit that codepath?
- Albert
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/102179/#review5369
-----------------------------------------------------------
On Aug. 2, 2011, 11:30 a.m., Albert Astals Cid wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/102179/
> -----------------------------------------------------------
>
> (Updated Aug. 2, 2011, 11:30 a.m.)
>
>
> Review request for kdelibs and Dawit Alemayehu.
>
>
> Summary
> -------
>
> Each time the terminate code triggers my Konqueror crashes, i'm substituting the terminate for just waiting the thread to finish and we just ignoring it.
>
> The code has a race condition in which wait() returns false, then we switch to the thread and m_autoDelete is still not set and thus noone will delete the thread. I can add a mutex if you guys think this is unacceptable.
>
>
> Diffs
> -----
>
> kio/kio/hostinfo.cpp fef39fc
>
> Diff: http://git.reviewboard.kde.org/r/102179/diff
>
>
> Testing
> -------
>
> When the
> kDebug() << "Name look up for" << hostName << "failed";
> if triggers i do not get a crash anymore.
>
>
> Thanks,
>
> Albert
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20110804/b109f226/attachment.htm>
More information about the kde-core-devel
mailing list