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

race condition with eventlet.sleep() in __del__ #801

Open
unipolar opened this issue Jun 19, 2023 · 1 comment
Open

race condition with eventlet.sleep() in __del__ #801

unipolar opened this issue Jun 19, 2023 · 1 comment
Labels

Comments

@unipolar
Copy link

python3.6 - python3.10
greenlet-2.0.2
eventlet-0.33.3

This code stuck forever on eventlet.sleep()

import gc
import eventlet

class X:
    def __init__(self):
        self.x = self

    def __del__(self):
        eventlet.sleep()

class Y:
    def y(self):
        pass

y = None
gc.collect()

m = []

for k in range(328):
   m.append(Y().y)

X()
y = Y()   # !!! remove this line to reproduce on python3.6
eventlet.sleep()

can be reproduced with python docker container

docker run -v $PWD:/test --rm -it python:3.10 sh -c "pip3 install eventlet; python3 /test/code.py"

similar to gevent/gevent#1959, but for eventlet I have only artificial example

@4383
Copy link
Member

4383 commented Mar 13, 2024

Hello,

First thanks for reporting this issue, and sorry for the late response.

i just ran your code snippet against Python3.12 and I can't reproduce the issue.
Many things have been fixed during the previous months and many new eventlet versions have been released, so please can you recheck your use case with the latest version of eventlet?

Please share your observations.

If you not reproduce the problem, then I think we will be able to close this issue.

Thanks in advance.

@4383 4383 added the bug label Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants