Jan Safranek added the comment: On 05/09/2013 09:07 AM, Jan Safranek wrote: > > Jan Safranek added the comment: > > On 05/07/2013 05:32 PM, Antoine Pitrou wrote: >> Jan, one possibility would be for Pegasus to stop "unloading" Python, >> it seems. > > It is always possibility. Actually, Pegasus "plugin" is just a shared > object (.so) and the .so is linked with Python. Pegasus calls dlopen() > and dlclose() on it. After dlclose(), the "plugin" is removed from > memory. Unfortunately, libpython2.7.so stays loaded, at least > /proc/XXX/mems says so. If there was a way to unload libpython2.7.so > from memory too...
libpython2.7.so is not unloaded because python extensions, e.g. /usr/lib64/python2.7/lib-dynload/_heapq.so depend on it. And _heapq.so was dlopenened by Python and it was not dlclosed -> glibc does not unload it. It seems that Py_Finalize() does not even close opened shared objects. Isn't it a bug? Jan ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17922> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com