Skip to content

Conversation

@duzumaki
Copy link

@duzumaki duzumaki commented Sep 5, 2025

fixes #2710

in 3.13, there's a new mutex type that now cares if the mutex is unlocked while not currently locked

A warning should be emitted to advise to use py-call-uwsgi-fork-hooks if running against 3.13 (+ a doc update that suggests to use py-call-uwsgi-fork-hooks over py-call-osafterfork

since maintainers want to support py-call-osafterfork for LTS reasons, my suggestion would be to just remove py-call-osafterfork entirely otherwise

@duzumaki duzumaki changed the title py-call-osafterfork is double unlocking and 3.13 is stricte now. pyth… py-call-osafterfork is double unlocking and 3.13 is stricter now Sep 5, 2025
@duzumaki duzumaki force-pushed the no_double_unlock_pls branch from 80072e0 to 491f782 Compare September 15, 2025 12:58
@duzumaki duzumaki changed the title py-call-osafterfork is double unlocking and 3.13 is stricter now py-call-osafterfork is double unlocking Sep 15, 2025
@duzumaki duzumaki force-pushed the no_double_unlock_pls branch 2 times, most recently from 1f9a875 to e223990 Compare September 15, 2025 13:21
@duzumaki duzumaki force-pushed the no_double_unlock_pls branch from e223990 to cb2a437 Compare September 15, 2025 13:22
@duzumaki duzumaki changed the title py-call-osafterfork is double unlocking py-call-osafterfork is double unlocking (python 3.13+) Sep 15, 2025
@duzumaki duzumaki changed the title py-call-osafterfork is double unlocking (python 3.13+) py-call-osafterfork isn't needed in python 3.13+ Sep 15, 2025
Copy link
Collaborator

@xrmx xrmx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason the PR is in draft?

PyOS_AfterFork_Child();
#endif
}
#if PY_VERSION_HEX < 0x030D0000
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move preprocessor directives to column 0, also you can use #ifdef UWSGI_PY313

if (!up.call_uwsgi_fork_hooks && up.call_osafterfork) {
// before python 3.7
#ifdef HAS_NOT_PYOS_FORK_STABLE_API
PyOS_AfterFork();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like there's one tab too much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

uWSGI fails to start with "--py-call-osafterfork" on Python 3.13 (work with Python 3.12)

2 participants