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

[Bug Report] When call a base64.b64encode() on a Box observation_space, the programme shut down without Error #3278

Open
1 task done
ZhaoRunyi opened this issue Jun 5, 2024 · 0 comments

Comments

@ZhaoRunyi
Copy link

If you are submitting a bug report, please fill in the following details and use the tag [bug].

Describe the bug
A clear and concise description of what the bug is.
I was running a customed mujoco environment based on stablebaseline3, and the programme shut down without Error but only warning:

..anaconda3/envs/myenv/lib/python3.7/multiprocessing/semaphore_tracker.py:144: UserWarning: semaphore_tracker: There appear to be 6 leaked semaphores to clean up at shutdown
  len(cache))

when debugging, I found that the problem was that when a base64.b64encode() was called to encode a gym.Box object, which is my observation_space, the programme failed without even get inside the base64.b64encode() fuction, so with no furthur info I can't debug no more.

Worth mentioning that such BUG didn't occur when I use another machine. At first I thought it might be the conda environment stuff, so I removed the original environment and create new ones according to the need several times, only to find the same problem still occured. Finally I conda enc export>vital_env.yml the environment from the machine that have no problem, and conda env create -n myenv -f vital_env.yml, and double check the two environments have the same versions on all libraries, however the PROBLEM STILL OCCUR! So I think there is some bugs I don't know.

Code example
Please try to provide a minimal example to reproduce the bug. Error messages and stack traces are also helpful.

base64_encoded = base64.b64encode(cloudpickle.dumps(data_item)).decode() 
# data_item is a gym.Box

System Info
Describe the characteristic of your environment:

  • Describe how Gym was installed (pip, docker, source, ...):

    • gym=0.21.0 is install thru pip 20.2.4 from a conda command conda env create -n myenv -f vital_env.yml
  • What OS/version of Linux you're using. Note that while we will accept PRs to improve Window's support, we do not officially support it.

    • ubuntu 22.04
  • Python version

    • python 3.7.10

Additional context
Add any other context about the problem here.

  • The full env list of my conda enviornment is as below:
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - backcall=0.2.0=pyhd3eb1b0_0
  - blas=1.0=mkl
  - ca-certificates=2024.3.11=h06a4308_0
  - certifi=2022.12.7=py37h06a4308_0
  - debugpy=1.5.1=py37h295c915_0
  - decorator=5.1.1=pyhd3eb1b0_0
  - entrypoints=0.4=py37h06a4308_0
  - fftw=3.3.9=h5eee18b_2
  - intel-openmp=2021.4.0=h06a4308_3561
  - ipykernel=6.15.2=py37h06a4308_0
  - ipython=7.31.1=py37h06a4308_1
  - jedi=0.18.1=py37h06a4308_1
  - jupyter_client=7.4.9=py37h06a4308_0
  - jupyter_core=4.11.2=py37h06a4308_0
  - ld_impl_linux-64=2.38=h1181459_1
  - libedit=3.1.20230828=h5eee18b_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgfortran-ng=11.2.0=h00389a5_1
  - libgfortran5=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libsodium=1.0.18=h7b6447c_0
  - libstdcxx-ng=11.2.0=h1234567_1
  - matplotlib-inline=0.1.6=py37h06a4308_0
  - mkl=2021.4.0=h06a4308_640
  - mkl-service=2.4.0=py37h7f8727e_0
  - mkl_fft=1.3.1=py37hd3c417c_0
  - mkl_random=1.2.2=py37h51133e4_0
  - ncurses=6.4=h6a678d5_0
  - nest-asyncio=1.5.6=py37h06a4308_0
  - numpy=1.21.5=py37h6c91a56_3
  - numpy-base=1.21.5=py37ha15fc14_3
  - openssl=1.1.1w=h7f8727e_0
  - parso=0.8.3=pyhd3eb1b0_0
  - pexpect=4.8.0=pyhd3eb1b0_3
  - pickleshare=0.7.5=pyhd3eb1b0_1003
  - pip=20.2.4=py37h06a4308_0
  - prompt-toolkit=3.0.36=py37h06a4308_0
  - ptyprocess=0.7.0=pyhd3eb1b0_2
  - pygments=2.11.2=pyhd3eb1b0_0
  - python=3.7.10=h12debd9_4
  - pyzmq=23.2.0=py37h6a678d5_0
  - readline=8.2=h5eee18b_0
  - scipy=1.7.3=py37h6c91a56_2
  - setuptools=65.6.3=py37h06a4308_0
  - six=1.16.0=pyhd3eb1b0_1
  - sqlite=3.38.2=hc218d9a_0
  - tk=8.6.11=h1ccaba5_0
  - tornado=6.2=py37h5eee18b_0
  - traitlets=5.7.1=py37h06a4308_0
  - wcwidth=0.2.5=pyhd3eb1b0_0
  - wheel=0.38.4=py37h06a4308_0
  - xz=5.4.6=h5eee18b_1
  - zeromq=4.3.5=h6a678d5_0
  - zlib=1.2.11=0
  - pip:
      - aenum==3.1.5
      - antlr4-python3-runtime==4.9.3
      - cffi==1.15.1
      - charset-normalizer==3.3.2
      - click==8.1.7
      - cloudpickle==2.2.1
      - commonroad-drivability-checker==2021.4.1
      - commonroad-io==2022.1
      - commonroad-route-planner==2022.1
      - commonroad-vehicle-models==3.0.2
      - cycler==0.11.0
      - cython==3.0.10
      - docker-pycreds==0.4.0
      - fast-histogram==0.11
      - fasteners==0.19
      - fonttools==4.38.0
      - gitdb==4.0.11
      - gitpython==3.1.43
      - glfw==2.7.0
      - gym==0.21.0
      - idna==3.7
      - imageio==2.31.2
      - importlib-metadata==4.13.0
      - iso3166==2.1.1
      - kiwisolver==1.4.5
      - lxml==5.2.2
      - matplotlib==3.5.3
      - mpl-scatter-density==0.7
      - mujoco-py==2.1.2.14
      - networkx==2.6.3
      - nvidia-cublas-cu11==11.10.3.66
      - nvidia-cuda-nvrtc-cu11==11.7.99
      - nvidia-cuda-runtime-cu11==11.7.99
      - nvidia-cudnn-cu11==8.5.0.96
      - omegaconf==2.3.0
      - packaging==24.0
      - pandas==1.1.5
      - patchelf==0.15.0.0
      - pathtools==0.1.2
      - pickle5==0.0.12
      - pillow==9.5.0
      - polygon3==3.0.9.1
      - promise==2.3
      - protobuf==3.20.3
      - psutil==5.9.8
      - pybind11==2.9.0
      - pycparser==2.21
      - pyparsing==3.1.2
      - python-dateutil==2.9.0.post0
      - pytz==2024.1
      - pyyaml==6.0.1
      - requests==2.31.0
      - rtree==1.0.1
      - salib==1.3.13
      - sentry-sdk==2.3.1
      - setproctitle==1.3.3
      - shapely==2.0.4
      - shortuuid==1.0.13
      - smmap==5.0.1
      - torch==1.13.1
      - tqdm==4.66.4
      - triangle==20200424
      - typing-extensions==4.7.1
      - urllib3==2.0.7
      - wandb==0.12.17
      - zipp==3.15.0
  • I have also installed a custom_envs using pip install -e ./mujuco_environment command and this folder include one of my newly-written environment add to the problem-free envs provided by the original project repo. Howeve, after I mv my self-written environment, and try pip install -e ./mujuco_environment again, and then the problem still occur!

  • The other problem is that I created a soft link(ln -s) in anaconda3/lib/: libtinfow.so -> libtinfow.so.6.4 and libtinfow.so.6 -> libtinfow.so.6.4, and such warning always occur:

/bin/bash: ~/anaconda3/lib/libtinfo.so.6: no version information available (required by /bin/bash)

would that also be the cause?

Checklist

  • I have checked that there is no similar issue in the repo (required)
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

1 participant