Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
TheBlusky opened this issue Mar 21, 2025 · 0 comments

Comments

@TheBlusky
Copy link

Using uwsgi 2.0.28, simply running the uwsgi --master --http=8080 --py-call-osafterfork command on an empty environment.

  • With python 3.13
$ docker run --rm -it python:3.13 bash
root@a2a21e201c85:/# pip install uwsgi
[...]
Successfully installed uwsgi-2.0.28
root@a2a21e201c85:/# uwsgi --master --http=8080 --py-call-osafterfork
*** Starting uWSGI 2.0.28 (64bit) on [Fri Mar 21 16:40:33 2025] ***
[...]
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI master process (pid: 609)
spawned uWSGI worker 1 (pid: 610, cores: 1)
Fatal Python error: PyMutex_Unlock: unlocking mutex that is not locked
Python runtime state: initialized

Current thread 0x00007ff7a3c42480 (most recent call first):
spawned uWSGI http 1 (pid: 611)
  <no Python frame>
DAMN ! worker 1 (pid: 610) died, killed by signal 6 :( trying respawn ...
Respawned uWSGI worker 1 (new pid: 612)
Fatal Python error: PyMutex_Unlock: unlocking mutex that is not locked
Python runtime state: initialized

Current thread 0x00007ff7a3c42480 (most recent call first):
  <no Python frame>
DAMN ! worker 1 (pid: 612) died, killed by signal 6 :( trying respawn ...
worker respawning too fast !!! i have to sleep a bit (2 seconds)...
^CSIGINT/SIGTERM received...killing workers...
gateway "uWSGI http 1" has been buried (pid: 611)
Respawned uWSGI worker 1 (new pid: 613)
Fatal Python error: PyMutex_Unlock: unlocking mutex that is not locked
Python runtime state: initialized

The module is looping on the last error: Fatal Python error: PyMutex_Unlock: unlocking mutex that is not locked

  • With python 3.12
$ docker run --rm -it python:3.12 bash
root@7af8ba226d73:/# pip install uwsgi
[...]
root@7af8ba226d73:/# uwsgi --master --http=8080 --py-call-osafterfork
*** Starting uWSGI 2.0.28 (64bit) on [Fri Mar 21 16:38:51 2025] ***
[...]
spawned uWSGI master process (pid: 607)
spawned uWSGI worker 1 (pid: 608, cores: 1)
spawned uWSGI http 1 (pid: 609)

It's working fine.

@xrmx xrmx changed the title uWSGI fails to start with "--py-call-osafterfork" on Python 3.12 (work with Python 3.12) uWSGI fails to start with "--py-call-osafterfork" on Python 3.13 (work with Python 3.12) Apr 9, 2025
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

No branches or pull requests

1 participant