[Kde-pim] imap resource deadlocks on socket error

David Faure faure at kde.org
Wed Nov 28 17:15:43 GMT 2012


On Wednesday 28 November 2012 17:22:31 Stefan Brüns wrote:
> Am 16.11.12, schrieb David Faure  <faure at kde.org>:
> > The "automatic fallback for SSL/TLS protocol versions" commit
> > (d8eeb4cb0c0c7 in kdepimlibs) leads to the following deadlock due to a
> > non-recursive mutex being locked recursively (in a single thread).
> > 
> > ...
> > In other words, the disconnectFromHost() leads to reconnect() in the same
> > class, and the mutex is already locked => deadlock.
> > 
> > Maybe this code should call locker.unlock() before disconnectFromHost()?
> > Unless the disconnectFromHost() wasn't meant to end up calling
> > reconnect()?
> 
> The reconnect() triggered by disconnectFromHost() is intended behaviour,
> whereas calling it synchrounously is not. I did not expect the
> disconnected() signal to be triggered synchrounously.
> 
> locker.unlock() is most probably the right thing to do.
> 
> Can you do this, or shall I?

Done.

Somewhen we should fix this class to not derive from QThread, right now it's 
very confusing what's called from the main thread and what's internal.
Slots in a QThread subclass - huh. By now we know this is very wrong.

-- 
David Faure, faure at kde.org, http://www.davidfaure.fr
Working on KDE, in particular KDE Frameworks 5

_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list