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

ENOSYS error in pthread_mutexattr_setprotocol for alpine based images #2650

Open
8R0WNI3 opened this issue Jun 12, 2024 · 0 comments
Open

ENOSYS error in pthread_mutexattr_setprotocol for alpine based images #2650

8R0WNI3 opened this issue Jun 12, 2024 · 0 comments

Comments

@8R0WNI3
Copy link

8R0WNI3 commented Jun 12, 2024

I'm trying to build a python app using uWSGI in an alpine based container image. However, uWSGI fails already during startup with the error message unable to set PTHREAD_PRIO_INHERIT.

Full log:

[uWSGI] getting INI configuration from uwsgi.ini
*** Starting uWSGI 2.0.25.1 (64bit) on [Wed Jun 12 14:09:48 2024] ***
compiled with version: 13.2.1 20240309 on 17 May 2024 06:11:37
os: Linux-6.5.0-15-generic #15-Ubuntu SMP PREEMPT_DYNAMIC Tue Jan  9 22:39:36 UTC 2024
nodename: 67cfac20d99c
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 2
current working directory: /
detected binary path: /usr/sbin/uwsgi
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
your memory page size is 4096 bytes
detected max file descriptor number: 1048576
lock engine: pthread robust mutexes
unable to set PTHREAD_PRIO_INHERIT

Minimum Dockerfile to reproduce this error:

FROM alpine:3

RUN apk add --no-cache \
    bash \
    gcc \
    libc-dev \
    python3-dev \
    uwsgi \
    uwsgi-python3

COPY uwsgi.ini /uwsgi.ini

ENTRYPOINT ["uwsgi", "uwsgi.ini"]

with uwsgi.ini

[uwsgi]
master = 1
processes = 1
threads = 20
enable-threads = true
thunder-lock = true
plugins = /usr/lib/uwsgi/python
http-socket = 0.0.0.0:5000

I'm running an Apple M2 Pro chip and the error persists both for linux/arm64 and linux/amd64 builds. When using an debian based image, the issue does not occur.

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