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

fix(checker): retry on process crash #3059

Merged
merged 2 commits into from
Aug 7, 2021
Merged

fix(checker): retry on process crash #3059

merged 2 commits into from
Aug 7, 2021

Conversation

nicojs
Copy link
Member

@nicojs nicojs commented Aug 6, 2021

Retry checker processes when they crash unexpectedly.

  • Add decorator pattern to checkers (like with test runners)
  • Split "resource" related shared code in its own class
  • Implement the CheckerRetryDecorator
  • Add integration tests to validate that the behavior works correctly.

Fixes #3005

Retry checker processes when they crash unexpectedly.

* Add decorator pattern to checkers (like with test runners)
* Split "resource" related shared code in its own class
* Implement the `CheckerRetryDecorator`
* Add integration tests to validate that the behavior works correctly.
@nicojs
Copy link
Member Author

nicojs commented Aug 7, 2021

I've tested it locally (using kill [pid]) and it works beautifully 😍

12:43:07 (1000) WARN CheckerRetryDecorator Checker process [1295] crashed with exit code null. Retrying in a new process. ChildProcessCrashedError: Child process [pid 1295] exited unexpectedly with exit code null (SIGTERM). Stdout and stderr were empty.
    at ChildProcessProxy.handleUnexpectedExit (/home/nicojs/github/stryker-js/packages/core/dist/src/child-proxy/child-process-proxy.js:34:37)
    at ChildProcess.emit (events.js:400:28)
    at maybeClose (internal/child_process.js:1055:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) {
  innerError: undefined,
  pid: 1295,
  exitCode: null,
  signal: 'SIGTERM'
}
Mutation testing  [] 44% (elapsed: ~2m, remaining: ~2m) 97/220 tested

@nicojs nicojs merged commit 8880643 into master Aug 7, 2021
@nicojs nicojs deleted the fix/retry-checker branch August 7, 2021 10:46
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.

Random SIGSEGV issue when running Stryker Mutator
1 participant