open_spiel icon indicating copy to clipboard operation
open_spiel copied to clipboard

Quoridor 4p fails games_sim_test.py on MacOS arm64

Open lanctot opened this issue 6 months ago • 6 comments

======================================================================
ERROR: test_multiplayer_game_4p_quoridor (__main__.GamesSimTest)
GamesSimTest.test_multiplayer_game_4p_quoridor
test_multiplayer_game_4p_quoridor(<GameType 'quoridor'>, 4)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/runner/work/open_spiel/open_spiel/venv/lib/python3.12/site-packages/absl/testing/parameterized.py", line 323, in bound_param_test
    return test_method(self, *testcase_params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/runner/work/open_spiel/open_spiel/open_spiel/python/tests/games_sim_test.py", line 251, in test_multiplayer_game
    self.sim_game(game)
  File "/Users/runner/work/open_spiel/open_spiel/open_spiel/python/tests/games_sim_test.py", line 174, in sim_game
    self.apply_action_test_clone(state, action)
  File "/Users/runner/work/open_spiel/open_spiel/open_spiel/python/tests/games_sim_test.py", line 89, in apply_action_test_clone
    self.apply_action(state, action)
  File "/Users/runner/work/open_spiel/open_spiel/open_spiel/python/tests/games_sim_test.py", line 78, in apply_action
    state.apply_action(action)
pyspiel.SpielError: /Users/runner/work/open_spiel/open_spiel/open_spiel/games/quoridor/quoridor.cc:619 board_[move.xy] == kPlayerNone
board_[move.xy] = a, kPlayerNone = 

lanctot avatar Jun 10 '25 00:06 lanctot

@lanctot, is it a third party game?

Can look into that.

alexunderch avatar Jun 10 '25 05:06 alexunderch

It was written by @tewalds originally. The multiplayer variants were a contribution IIRC.

Thanks, it seems to only fail in the games_sim_test.py in Python and only on MacOS arm64. So it's likely a memory issue of some kind that rarely triggers. So it may be particularly hard to find.

lanctot avatar Jun 11 '25 02:06 lanctot

I have exactly the same device, so it'd be at least curious to try to understand what it's going on

alexunderch avatar Jun 11 '25 06:06 alexunderch

Interesting, for me all the tests are passing. Did you disable the test?

alexunderch avatar Jun 11 '25 19:06 alexunderch

Interesting, for me all the tests are passing. Did you disable the test?

Yes I had to otherwise I was not able to import the new version of abseil which was higher priority.

See the changes to games_sim_test.py in this commit: https://github.com/google-deepmind/open_spiel/commit/298c8dec008e2107df6acf979abac7673eaea66d

You can comment out that if condition and it should fail. If it doesn't, it's probably because it's non-deterministic which even more strongly points to a memory issue

lanctot avatar Jun 11 '25 19:06 lanctot

Couldn't make it fail after several attempts. Thus, it's time for valgrind and code analysers.

alexunderch avatar Jun 12 '25 09:06 alexunderch