[Git][security-tracker-team/security-tracker][master] web_support: fix memory leak with Python 3

Emilio Pozuelo Monfort pochu at debian.org
Tue Aug 11 17:31:14 BST 2020



Emilio Pozuelo Monfort pushed to branch master at Debian Security Tracker / security-tracker


Commits:
6ee5cd6b by Emilio Pozuelo Monfort at 2020-08-11T18:28:29+02:00
web_support: fix memory leak with Python 3

ThreadingMixIn keeps a list of all non-deamon threads since Python
3.7, which prevents all the resources from being freed. Daemonize
them so that we don't keep their resources forever, eventually
causing OOM.

- - - - -


1 changed file:

- lib/python/web_support.py


Changes:

=====================================
lib/python/web_support.py
=====================================
@@ -796,7 +796,7 @@ class WebService(Service, WebServiceBase):
         r.flatten(result.write)
 
 class ThreadingHTTPServer(ThreadingMixIn, HTTPServer):
-    pass
+    daemon_threads = True
 
 RE_BASE_URL = re.compile(r'^(https?)://([^/]+)(.*)')
 



View it on GitLab: https://salsa.debian.org/security-tracker-team/security-tracker/-/commit/6ee5cd6be5a18a1753aabfaa10ead6d3f6c8a9c5

-- 
View it on GitLab: https://salsa.debian.org/security-tracker-team/security-tracker/-/commit/6ee5cd6be5a18a1753aabfaa10ead6d3f6c8a9c5
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-security-tracker-commits/attachments/20200811/e4e859bb/attachment-0001.html>


More information about the debian-security-tracker-commits mailing list