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

Apply stack fix to all python containers #160

Closed
timothyb89 opened this issue Aug 14, 2017 · 1 comment · Fixed by #162
Closed

Apply stack fix to all python containers #160

timothyb89 opened this issue Aug 14, 2017 · 1 comment · Fixed by #162
Assignees
Labels

Comments

@timothyb89
Copy link
Member

musl's default stack size is very small (80 KiB) which can cause frequent stack overflows (probably why the agent-collector crashes). See also: https://github.com/voidlinux/void-packages/issues/4147

A workaround was proposed in ultrajson/ultrajson#254 (comment). I've had good results when testing it in the keystone-init container by building the .so as part of the container build process, and we should apply it elsewhere - at least to the agent, which likely needs it most.

Basic steps to implement:

  • add stack-fix.c to container
  • build with gcc -shared -fPIC /stack-fix.c -o /stack-fix.so
  • run python with LD_PRELOAD=/stack-fix.so python ...
@matrixik
Copy link
Member

matrixik commented Apr 3, 2018

Looks like we probably could remove this fix from containers, we only need to rebuild them with newer Python.

After
docker-library/python@8717dc2
and
docker-library/python@f45e1fb
Newer containers with Python have bigger stack (1 MB). So this problem should not happen again with ujson.

Relevant issue: docker-library/python#211

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants