Re: Yet another async problem :)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 26 Jun 2008 15:49:44 +0200
"Krzysztof A. Adamski" <krzysztofa@xxxxxxxxx> wrote:

> Yesterday I said on IRC that I'm giving up.. but I couldn't. I've
> tried to fix the problem with deadlocks on async jobs once again.
> Finally today I've found the source of problem which I consider great
> success as it took couple days!
And another success today. Thanks to Michael DeHaan who suggested this
could be threads problem I've wrote and testes this patch:
http://github.com/kadamski/func/commit/241a9abb49ecc920c82703e61f77ecdda4b19911

diff --git a/func/minion/AuthedXMLRPCServer.py
b/func/minion/AuthedXMLRPCServer.py index 0ec9ce0..7bba160 100644
--- a/func/minion/AuthedXMLRPCServer.py
+++ b/func/minion/AuthedXMLRPCServer.py
@@ -50,7 +50,7 @@ class
AuthedSimpleXMLRPCRequestHandler(SimpleXMLRPCServer.SimpleXMLRPCRequestHan
print "Error (%s): socket error - '%s'" % (self.client_address, e)


-class BaseAuthedXMLRPCServer(SocketServer.ThreadingMixIn):
+class BaseAuthedXMLRPCServer(SocketServer.ForkingMixIn):
     def __init__(self, address, authinfo_callback=None):
         self.allow_reuse_address = 1
         self.logRequests = 1

This oneliner changes AuthedXMLRPCServer to use fork instead of
threads. It seams that logging python module is just not thread safe. 
It also seams that PyOpenSSL is leaking memory when used with threads
since now i can't see memory leaks in funcd. Adrian Likins found
information that there is a patch fixing this in new version but we
want Func working correctly on older systems and forking shouldn't be
big performance problem so i believe it should be good idea to make this
change.

_______________________________________________
Func-list mailing list
Func-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/func-list

[Index of Archives]     [Fedora Users]     [Linux Networking]     [Fedora Legacy List]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux