Univention Bugzilla – Attachment 10425 Details for
Bug 50583
Memory Leak in univention-management-console-server
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
50583.patch (text/plain), 2.07 KB, created by
Florian Best
on 2020-07-10 11:21:14 CEST
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Florian Best
Created:
2020-07-10 11:21:14 CEST
Size:
2.07 KB
patch
obsolete
>diff --git management/univention-management-console/src/univention/management/console/protocol/server.py management/univention-management-console/src/univention/management/console/protocol/server.py >index f2d93ab840..ad8a21fa4d 100644 >--- management/univention-management-console/src/univention/management/console/protocol/server.py >+++ management/univention-management-console/src/univention/management/console/protocol/server.py >@@ -36,6 +36,7 @@ Defines the basic class for an UMC server. > """ > > import os >+import gc > import fcntl > import socket > import resource >@@ -80,7 +81,8 @@ class MagicBucket(object): > """ > CORE.info('Established connection: %s' % client) > state = State(client, socket) >- state.session.signal_connect('success', notifier.Callback(self._response, state)) >+ state.callback = notifier.Callback(self._response, state) >+ state.session.signal_connect('success', state.callback) > self.__states[socket] = state > notifier.socket_add(socket, self._receive) > self._timeout_connection(state) >@@ -102,8 +104,7 @@ class MagicBucket(object): > # remove all sockets > for sock in list(self.__states.keys()): > CORE.info('Shutting down connection %s' % sock) >- self.__states.pop(sock).session.shutdown() >- notifier.socket_remove(sock) >+ self._cleanup(sock) > > def _receive(self, socket): > """Signal callback: Handles incoming data. Processes SSL events >@@ -229,14 +230,14 @@ class MagicBucket(object): > self._cleanup(state.socket) > > def _cleanup(self, socket): >- if socket not in self.__states: >+ state = self.__states.pop(socket, None) >+ if state is None: > return > >- self.__states[socket].session.shutdown() >- >+ state.session.signal_disconnect('success', state.callback) >+ state.session.shutdown() > notifier.socket_remove(socket) >- self.__states[socket].session.__del__() >- del self.__states[socket] >+ state.session.__del__() > > try: > socket.close() >@@ -406,6 +407,7 @@ class Server(signals.Provider): > categoryManager.load() > RESOURCES.info('Reloading UCR variables') > ucr.load() >+ gc.collect() # Cleanup umcp.State objects > > > class State(object):
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 50583
:
10244
|
10423
|
10424
| 10425