google-deepmind / open_spiel

OpenSpiel is a collection of environments and algorithms for research in general reinforcement learning and search/planning in games.
Apache License 2.0
4.25k stars 933 forks source link

Segmentation fault for `python_playthrough_test` #21

Closed michalsustr closed 5 years ago

michalsustr commented 5 years ago

Output of the test:

1/93 Test #49: python_playthrough_test .....................***Exception: SegFault 11.71 sec
Running tests under Python 3.7.3: /home/michal/.virtualenvs/os/bin/python3
[ RUN      ] PlaythroughTest.test_rerun_playthroughs
I0902 13:00:14.309487 140507519309632 playthrough_test.py:42] liars_dice.txt
I0902 13:00:14.368588 140507519309632 playthrough_test.py:42] havannah(board_size=4).txt
I0902 13:00:14.671652 140507519309632 playthrough_test.py:42] bridge_uncontested_bidding.txt
I0902 13:00:21.458908 140507519309632 playthrough_test.py:42] backgammon.txt
I0902 13:00:22.513101 140507519309632 playthrough_test.py:42] coop_box_pushing.txt
I0902 13:00:23.643769 140507519309632 playthrough_test.py:42] y(board_size=9).txt
I0902 13:00:24.053513 140507519309632 playthrough_test.py:42] hex(board_size=5).txt
I0902 13:00:24.171892 140507519309632 playthrough_test.py:42] misere(game=tic_tac_toe()).txt
I0902 13:00:24.201291 140507519309632 playthrough_test.py:42] pig_4p.txt
I0902 13:00:24.263108 140507519309632 playthrough_test.py:42] markov_soccer.txt
I0902 13:00:24.363373 140507519309632 playthrough_test.py:42] leduc_poker_773740114.txt
I0902 13:00:24.374366 140507519309632 playthrough_test.py:42] tiny_bridge_4p.txt
I0902 13:00:24.389407 140507519309632 playthrough_test.py:42] tic_tac_toe.txt
I0902 13:00:24.415252 140507519309632 playthrough_test.py:42] matrix_rps.txt
I0902 13:00:24.417987 140507519309632 playthrough_test.py:42] leduc_poker_1540482260.txt
I0902 13:00:24.436774 140507519309632 playthrough_test.py:42] oshi_zumo.txt
I0902 13:00:24.454514 140507519309632 playthrough_test.py:42] kuhn_poker_2p.txt
I0902 13:00:24.458492 140507519309632 playthrough_test.py:42] pig_5p.txt
I0902 13:00:24.823575 140507519309632 playthrough_test.py:42] catch.txt
Fatal Python error: Segmentation fault

Current thread 0x00007fca74c6d740 (most recent call first):
  File "/home/michal/Code/GT/open_spiel/open_spiel/python/algorithms/generate_playthrough.py", line 161 in playthrough_lines
  File "/home/michal/Code/GT/open_spiel/open_spiel/python/algorithms/generate_playthrough.py", line 52 in playthrough
  File "/home/michal/Code/GT/open_spiel/open_spiel/python/algorithms/generate_playthrough.py", line 254 in replay
  File "/home/michal/Code/GT/open_spiel/open_spiel/python/../integration_tests/playthrough_test.py", line 43 in test_rerun_playthroughs
  File "/usr/lib/python3.7/unittest/case.py", line 615 in run
  File "/usr/lib/python3.7/unittest/case.py", line 663 in __call__
  File "/usr/lib/python3.7/unittest/suite.py", line 122 in run
  File "/usr/lib/python3.7/unittest/suite.py", line 84 in __call__
  File "/usr/lib/python3.7/unittest/suite.py", line 122 in run
  File "/usr/lib/python3.7/unittest/suite.py", line 84 in __call__
  File "/usr/lib/python3.7/unittest/runner.py", line 176 in run
  File "/usr/lib/python3.7/unittest/main.py", line 271 in runTests
  File "/usr/lib/python3.7/unittest/main.py", line 101 in __init__
  File "/home/michal/.virtualenvs/os/lib/python3.7/site-packages/absl/testing/absltest.py", line 2200 in _run_and_get_tests_result
  File "/home/michal/.virtualenvs/os/lib/python3.7/site-packages/absl/testing/absltest.py", line 2230 in run_tests
  File "/home/michal/.virtualenvs/os/lib/python3.7/site-packages/absl/testing/absltest.py", line 1971 in main_function
  File "/home/michal/.virtualenvs/os/lib/python3.7/site-packages/absl/app.py", line 251 in _run_main
  File "/home/michal/.virtualenvs/os/lib/python3.7/site-packages/absl/app.py", line 300 in run
  File "/home/michal/.virtualenvs/os/lib/python3.7/site-packages/absl/testing/absltest.py", line 1973 in _run_in_app
  File "/home/michal/.virtualenvs/os/lib/python3.7/site-packages/absl/testing/absltest.py", line 1855 in main
  File "/home/michal/Code/GT/open_spiel/open_spiel/python/../integration_tests/playthrough_test.py", line 53 in <module>

My setup:

python --version
Python 3.7.3
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 19.04
Release:        19.04
Codename:       disco
cmake --version
cmake version 3.13.4
g++ --version
g++ (Ubuntu 8.3.0-6ubuntu1) 8.3.0
lanctot commented 5 years ago

Thanks. We will try to reproduce and take a look into a fix.

elkhrt commented 5 years ago

It's possible we have fixed this already. Could you check if this is still occurring at HEAD? Thank you!

zxkyjimmy commented 5 years ago

I guess there will be a new problem because we don't have a folder named google3/third_party.

ammzen commented 5 years ago

I guess there will be a new problem because we don't have a folder named google3/third_party. You are right. I have the same problem.

Running tests under Python 3.6.5: /Users/albertmu/Desktop/workspace/open_spiel/venv/bin/python3
[ RUN      ] PlaythroughTest.test_rerun_playthroughs
[  FAILED  ] PlaythroughTest.test_rerun_playthroughs
======================================================================
ERROR: test_rerun_playthroughs (__main__.PlaythroughTest)
test_rerun_playthroughs (__main__.PlaythroughTest)
----------------------------------------------------------------------
FileNotFoundError: [Errno 2] No such file or directory: '/Users/workspace/open_spiel/open_spiel/python/../../google3/third_party/open_spiel/integration_tests/playthroughs/'
OpenSpiel commented 5 years ago

Thanks for the report. I fixed it internally, and will come out when it is submitted (just need to remove "google3/third_party/").