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

Shrink on one worker #1280

Merged
merged 1 commit into from
Jul 5, 2024
Merged

Shrink on one worker #1280

merged 1 commit into from
Jul 5, 2024

Conversation

arcz
Copy link
Member

@arcz arcz commented Jun 27, 2024

There was a high contention while shrinking with multiple workers at the same time. This locks shrinking to the same worker which solved the test. Fixes #1105.

Changes and implications:

  1. Only the worker which solved a test will shrink the test. Worker number is displayed in the UI while shrinking.
  2. If there is shrinking work, do it until the shrink limit and then go back to fuzzing. Fuzzing will be put on pause when all workers are shrinking.
  3. Test limit is unevenly distributed. When worker shrinks it doesn't work on its portion of test limit. This will be fixed in another PR.
  4. Refactored selectMainContract, mkTests and mkSignatureMap out of loadSpecified. This allows for more granular control to easier construct Env. Moved world to the Env and tests can be created before Env.
  5. Merged Campaign.updateTest and Test.updateOpenTest into Campaign.updateOpenTest.

TODO: Look into reintroducing multicore shrinking with better synchronization (#1249).

@arcz arcz requested a review from ggrieco-tob as a code owner June 27, 2024 12:17
@arcz arcz mentioned this pull request Jun 27, 2024
@arcz arcz added this to the Echidna 2.2.4 milestone Jun 27, 2024
@ggrieco-tob
Copy link
Member

Let's update the number of workers to 3. We can probably pick a better number, but it should work while we determinate how to do that.

@ggrieco-tob ggrieco-tob merged commit ec5a3c1 into master Jul 5, 2024
18 checks passed
@ggrieco-tob ggrieco-tob deleted the fix-shrink branch July 5, 2024 13:16
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.

[Bug-Candidate]: Echidna multicore produces slower shrinking behavior
2 participants