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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alda REPL server sometimes "claims" more than 1 player on startup #416

Open
daveyarwood opened this issue Apr 16, 2022 · 0 comments
Open

Comments

@daveyarwood
Copy link
Member

馃悶 Bug report 馃悶

Description

When starting an Alda REPL session, the REPL server finds an available player process (i.e. one in the "ready" state) and "claims" it by sending it a ping message. This puts the player process into the "active" state, which makes Alda more eager to spawn new player processes in order to have them readily available.

This works reliably, but it seems to be a little too reliable in that, for some reason, two player processes seem to go from "ready" to "active" when the REPL server starts.

Steps to Reproduce

  1. In a separate terminal, monitor the state of the player processes by running watch alda ps.
  2. Start from a clean state by running alda shutdown to shut down all current player processes.
  3. Run alda -v2 repl to start a REPL session in verbose mode.
  4. Exit the session and start a new one.
  5. Repeat step 4.

Expected Behavior

Each time a REPL session is started, only 1 of the players in the "ready" state goes into the "active" state.

Alda spawns more player processes as needed, but it shouldn't need to do that too much, because only one process becomes unavailable for each REPL session.

Actual Behavior

The first time I start a REPL server session, I see 5 players in the "ready" state and 1 player in the "active" state. The REPL server output shows that it is using the 1 player in the "active" state.

When I exit that session and start another one, 2 of the players that were in the "ready" state go into the "active" state. One of them is the one that this new REPL session is using. We are now down to 3 players in the "ready" state.

If I keep going, exiting and starting new REPL sessions, more and more player processes are spawned to ensure that there are always player processes available in the "ready" state.

Environment

Operating system and version: Ubuntu 20.04

Alda version:

$ alda version
alda 2.2.1
$ alda-player info
alda-player 2.2.1
log path: /home/dave/.cache/alda/logs

Health check:

$ alda doctor
(all passing)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant