-
Notifications
You must be signed in to change notification settings - Fork 26
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
Fix segfault with protobuf, gym (atari), cv2, and ScenarIO #316
Conversation
Just to understand, which pytorch binaries are you using? |
|
I am not sure about what is going on, but this seems something coming from opencv, in particular from https://github.com/opencv/opencv/tree/master/modules/dnn/misc/caffe . It seems to be some sort of C++ generated file with an old version of protobuf, but that was committed to the opencv repo. Do you know who could bring in opencv? |
I searched something in https://www.google.com/search?channel=fs&client=ubuntu&q=Version+verification+failed+in+%22..%2Fmodules%2Fdnn%2Fmisc%2Fcaffe%2Fopencv-caffe.pb.cc%22. , and from one of the search results ( https://patchwork.ozlabs.org/project/buildroot/patch/20200113195757.905861-1-fontaine.fabrice@gmail.com/ ) it seems that the |
For example, I imagine that:
or
could reproduce the issue? |
Here: https://github.com/openai/gym/blob/0.18.0/gym/wrappers/atari_preprocessing.py#L7 . |
Yes I confirm it's due import scenario
import cv2 Naively, I hoped that switching to |
The main difference is that with pip or by mixing apt/pip this kind of errors are kind intrinsic in how C++ dependencies are typically handled, while in conda-forge (hopefully) this should all be fixable problems. See conda-forge/opencv-feedstock#269 for the PR that should solve this problem. |
I totally agree. I'm not yet that familiar with the conda infrastructure but the advantages over PyPI are evident. Beyond these segfaults, effortless multiplatform binary distribution is just gold ❤️ If only the tensorflow situation could get better.... xD Thanks a lot for fixing the problem upstream in conda-forge! I'll keep in any case the workaround since it could occur in a PyPI-based setup. |
Similar to the infamous problems we have with tensorflow / protobuf, also a system with torch could segfault similarly 😰
stack trace
This time, the culprit is
gym/wrappers/atari_preprocessing.py
. I found out that, as done for tensorflow, pre-importinggym
fixes the problem.