Open mharradon opened 4 years ago
Hi,
Can you give me more details about your setup? I ran your example using Python 3.7.1 on macOS and it doesn't segfault. Neither does the other issue you linked above.
The issue occurs on 3.7.3 in a Docker container. I'll try to provide a container that reproduces it. I see it doesn't occur on my Mac with 3.7.3, though both are Anaconda distributions.
I've found what I believe to be quite the mysterious (and painful) bug.
A minimal reproducing example:
I believe it's related to this issue: openai/atari-py#52
Essentially, it appears that nesting of threads segfault if and only if gym.make has occurred. If you comment out that line the error goes away.
This issue appeared sometime since gym release 0.15.3 . The older versions don't seem to have this problem.
If I use faulthandler I can get:
So, at least as I understand, it is not even gym code that is segfaulting - rather it is somehow indirectly causing other code to segfault. I was suggested to post here from the gym repo, as this only occurs with Atari environments.
I'm using Python3.7.
Thanks!