Skip to content

Commit

Permalink
Fix rlm_python3 dead-lock in GIL. ref FreeRADIUS#5111
Browse files Browse the repository at this point in the history
... Limiting to have more than one instance
  • Loading branch information
jpereira committed Jul 24, 2023
1 parent 0532fa9 commit eafaff9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions doc/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ FreeRADIUS 3.2.4 Fri 26 May 2023 12:00:00 EDT urgency=low
canonical attribute
* Make FreeRADIUS-Server-EMA* attributes work again for home server
exponential moving average statistics.
* Fix rlm_python3 dead-lock in GIL limiting to have more than one instance. Fixes #5111

FreeRADIUS 3.2.3 Fri 26 May 2023 12:00:00 EDT urgency=low
Configuration changes
Expand Down
2 changes: 1 addition & 1 deletion src/modules/rlm_python3/rlm_python3.c
Original file line number Diff line number Diff line change
Expand Up @@ -1204,7 +1204,7 @@ static int python_interpreter_init(rlm_python_t *inst, CONF_SECTION *conf)
Py_IncRef(inst->pythonconf_dict);
}

PyEval_SaveThread();
if (python_instances <= 1) PyEval_SaveThread(); /* Unlock GIL */

return 0;
}
Expand Down

0 comments on commit eafaff9

Please sign in to comment.