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

Threading issues in python3.11 to python3.11.9-slim-bookworm #917

Closed
taylornelsonbluecargo opened this issue Apr 4, 2024 · 14 comments
Closed

Comments

@taylornelsonbluecargo
Copy link

We notice threading issues in our environment with the minor version upgrade

@collinc777
Copy link

collinc777 commented Apr 4, 2024

Noticing the same thing here. Causing ddtrace-run to fail with gunicorn

@jackguac
Copy link

jackguac commented Apr 5, 2024

Yep - same problem. Gunicorn workers all crashing. I've downgraded to python3.10 image and all fine.

@tianon
Copy link
Member

tianon commented Apr 5, 2024

"threading issues" is not really enough for us to reproduce, let alone help diagnose 😉

Does anyone have a minimal reproducer?

@yosifkit
Copy link
Member

yosifkit commented Apr 5, 2024

We didn't change any build flags or anything else (except likely some OS package updates from a rebuild) between 3.11.8 and 3.11.9, so if there is an issue, it would be in python itself or a pip installed python package.

@LaurentGoderre
Copy link
Member

Does this looks similar to your issues? benoitc/gunicorn#2899

@jim-schwoebel
Copy link

having this issue as well, can reproduce on python v 3.11.6

@tianon
Copy link
Member

tianon commented Apr 24, 2024

"threading issues" is not really enough for us to reproduce, let alone help diagnose 😉

Does anyone have a minimal reproducer?

Does this looks similar to your issues? benoitc/gunicorn#2899

@sanyappc
Copy link

I have a similar problem on virtual machines with the new python3.8-slim-bookworm image, had to switch to python:3.8-slim-bullseye. Error when trying to create a new thread

Traceback (most recent call last):
  File "/venv/lib/python3.8/site-packages/***.py", line 116, in work
    await self.configure_sentry()
  File "/venv/lib/python3.8/site-packages/***.py", line 86, in configure_sentry
    self.sentry_transaction = await get_running_loop().run_in_executor(
  File "/usr/local/lib/python3.8/asyncio/base_events.py", line 783, in run_in_executor
    executor.submit(func, *args), loop=self)
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 188, in submit
    self._adjust_thread_count()
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 213, in _adjust_thread_count
    t.start()
  File "/venv/lib/python3.8/site-packages/sentry_sdk/integrations/threading.py", line 56, in sentry_start
    return old_start(self, *a, **kw)
  File "/usr/local/lib/python3.8/threading.py", line 852, in start
    _start_new_thread(self._bootstrap, ())
RuntimeError: can't start new thread

@tianon
Copy link
Member

tianon commented May 28, 2024

"threading issues" is not really enough for us to reproduce, let alone help diagnose 😉
Does anyone have a minimal reproducer?

Does this looks similar to your issues? benoitc/gunicorn#2899

@yosifkit
Copy link
Member

If -bullseye works and -bookworm does not, that sounds like libseccomp: #837 (comment) and more generally, docker-library/official-images#16829

@martin-thoma
Copy link

martin-thoma commented Jul 2, 2024

Switching from python:3.11-slim-buster to python:3.11-slim-bookworm I saw the same error message.

edit: it's the libseccomp of the host which you can get via dpkg -l | grep libseccomp. It's NOT the one within the docker container

@yosifkit
Copy link
Member

yosifkit commented Jul 2, 2024

@martin-thoma, it is the libseccomp (and docker and containerd) of the host that you need to update, not anything in the container.

@martin-thoma
Copy link

martin-thoma commented Jul 3, 2024

Got it! Updating from docker 20 to docker 24 fixed the issue for me.

@edmorley
Copy link
Contributor

This can presumably be closed out, given it was an outdated Docker issue?

it is the libseccomp (and docker and containerd) of the host that you need to update, not anything in the container.

Got it! Updating from docker 20 to docker 24 fixed the issue for me.

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

10 participants