-
-
Notifications
You must be signed in to change notification settings - Fork 411
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
Spurious process manager test failures #2297
Comments
Some more tests failing spuriously: Example outputs from jenkins job https://travis-ci.org/ponylang/ponyc/jobs/303769678 for commit: 398d361 : LLVM 3.7.1:
LLVM 3.9.1:
|
Hmm.. according to this man page for
Of those, I think So it seems we just need to update to swallow the error if |
@jemc that seems like a reasonable first attempt. |
I'll look into this. |
This provides a fix for ponylang#2297. I was able to replicate two spurious failures. The first was KillError thrown by _kill_child, I've changed the code so KillError is not thrown as there is really no reasonable recovery that can be performed. The second spurious error I saw was in _close where @waitpid would return an error because the _child_pid was -1. This occurs in packages/process/_test.pony::TestFileExecCapabilityIsRequired and ::_TestNonExecutablePathResultsInExecveError which are designed to fail and _child_pid is always -1. This causes a failure to be always be sent asynchronously and sometimes is actually gets reported. failure is reported
This provides a fix for ponylang#2297. I was able to replicate two spurious failures. The first was KillError thrown by _kill_child, I've changed the code so KillError is not thrown as there is really no reasonable recovery that can be performed. The second spurious error I saw was in _close where @waitpid would return an error because the _child_pid was -1. This occurs in packages/process/_test.pony::TestFileExecCapabilityIsRequired and ::_TestNonExecutablePathResultsInExecveError which are designed to fail and _child_pid is always -1. This causes a failure to be always be sent asynchronously and sometimes is actually gets reported. failure is reported
This provides a fix for ponylang#2297. I was able to replicate two spurious failures. The first was KillError thrown by _kill_child, I've changed the code so KillError is not thrown as there is really no reasonable recovery that can be performed. The second spurious error I saw was in _close where @waitpid would return an error because the _child_pid was -1. This occurs in packages/process/_test.pony::TestFileExecCapabilityIsRequired and ::_TestNonExecutablePathResultsInExecveError which are designed to fail and _child_pid is always -1. This causes a failure to be always be sent asynchronously and sometimes is actually gets reported. failure is reported
This provides a fix for ponylang#2297. I was able to replicate two spurious failures. The first was KillError thrown by _kill_child, I've changed the code so KillError is not thrown as there is really no reasonable recovery that can be performed. The second spurious error I saw was in _close where @waitpid would return an error because the _child_pid was -1. This occurs in packages/process/_test.pony::TestFileExecCapabilityIsRequired and ::_TestNonExecutablePathResultsInExecveError which are designed to fail and _child_pid is always -1. This causes a failure to be always be sent asynchronously and sometimes is actually gets reported. failure is reported
This provides a fix for ponylang#2297. I was able to replicate two spurious failures. The first was KillError thrown by _kill_child, I've changed the code so KillError is not thrown as there is really no reasonable recovery that can be performed. The second spurious error I saw was in _close where @waitpid would return an error because the _child_pid was -1. This occurs in packages/process/_test.pony::TestFileExecCapabilityIsRequired and ::_TestNonExecutablePathResultsInExecveError which are designed to fail and _child_pid is always -1. This causes a failure to be always be sent asynchronously and sometimes is actually gets reported. failure is reported
Some process manager tests (but not all), check the exit code. You can see this here:
https://github.com/ponylang/ponyc/blob/master/packages/process/_test.pony#L460
The problem is that despite the test running to completion in terms of process correct data, sometimes,
_kill_child
fails. Returning a -1 error which triggers "failed" being called on the notify which fails our test.It appears that from the perspective of the test, everything worked fine, but for some reason, kill failed. There are two possibilities:
If its the latter, we want to make
_kill_child
smarter. If the process is already gone, then there is no need to throw an error. See: https://github.com/ponylang/ponyc/blob/master/packages/process/process_monitor.pony#L454If the external process didn't die but the test otherwise completed fine, then really, there's nothing we can do on the Pony side and the test should pass.
Someone needs to dig in and determine exactly why these occassionally fail with a "KILL ERROR".
My advice to anyone taking this one, you'll want to run the standard library tests in a loop in order to trigger.
Something like:
The text was updated successfully, but these errors were encountered: