diff options
| author | Markus Heiser <markus.heiser@darmarIT.de> | 2025-07-08 09:30:41 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-08 09:30:41 +0200 |
| commit | fe52290e653e969c959b3160c1a09f02e751efd2 (patch) | |
| tree | f06623fd9e8e1022798cfd2fa481662f8847dcdb /docs/admin/settings/index.rst | |
| parent | 6ff40356352e9f5b9c7f9c5d58ac2fc787455036 (diff) | |
[fix] calculator plugin: subrocess is not closed on timeout (#4983)
The issue was introduced in commit: edfbf1e
Problematic code::
def timeout_func(timeout, func, *args, **kwargs):
...
if not p.is_alive():
ret_val = que.get()
else:
logger.debug("terminate function after timeout is exceeded") # type: ignore
p.terminate()
p.join()
p.close()
The `logger` function in the `else` path is not defined. Was accidentally
removed in commit edfbf1e without providing an appropriate replacement.::
File "/usr/local/searxng/searx/plugins/calculator.py", line 216, in timeout_func
logger.debug("terminate function after timeout is exceeded") # type: ignore
^^^^^^
NameError: name 'logger' is not defined
The exception triggered by this prevents the `p.terminate()` from being
executed. As a result, the processes accumulate in memory (memory leak).
Related: https://github.com/searxng/searx-instances/discussions/708#discussioncomment-13688168
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'docs/admin/settings/index.rst')
0 files changed, 0 insertions, 0 deletions