Skip to content

refactor: actor-based dfx start#1066

Merged
59 commits merged intomasterfrom
es-1020-dfx-start-actors
Oct 27, 2020
Merged

refactor: actor-based dfx start#1066
59 commits merged intomasterfrom
es-1020-dfx-start-actors

Conversation

@ghost
Copy link

@ghost ghost commented Sep 25, 2020

This implements #1020: rework dfx start to use actors.

Change in behavior:

  • If the replica process exits unexpectedly, dfx start will now start a new replica, and also restart the proxy webserver to forward to it. Previous behavior was to exit.

Something to watch out for is that the process doesn't report a segfault in response to SIGINT/SIGTERM. I found a way to avoid this: stop the webserver before allowing the actor system to shut down.

The segfault behavior was introduced with the latest version of actix, to which we upgraded in order to pass some audit checks. The es-1020-gradual-master-merge branch demonstrates this. To see for yourself, run dfx start and then stop it with Ctrl-C, kill -INT, or kill -TERM, and observe the following behavior:

  • last commit dd9fed6 (after upgrading actix): exits, but reports segfault
  • second-to-last commit 708474e: exits without a segfault

Anyway, when testing dfx start and probably also dfx replica, in addition to knowing that e2e tests pass it's a good idea to run them locally, press Ctrl-C, and make sure there is no message about a segfault.

checkpoint - e2e tests, e2e ic ref tests pass
@ghost ghost marked this pull request as draft September 25, 2020 21:31
@ghost ghost marked this pull request as ready for review October 9, 2020 21:37
@ghost
Copy link
Author

ghost commented Oct 9, 2020

I'm confident that this works, but I also think it would be reasonable not to merge it until after we release dfx 0.7.0.

@ghost ghost linked an issue Oct 23, 2020 that may be closed by this pull request
5 tasks
@ghost ghost merged commit 5087f0e into master Oct 27, 2020
@ghost ghost deleted the es-1020-dfx-start-actors branch October 27, 2020 03:27
dfinity-bot added a commit that referenced this pull request Oct 1, 2021
mergify bot pushed a commit that referenced this pull request Oct 1, 2021
This pull request was closed.
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

Successfully merging this pull request may close these issues.

Rework dfx start to use actors

2 participants