-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Errors when rerunning test suite #5590
Comments
Agreed. I don't see how we can solve this, as this is purely an environment issue. |
The above reproduction steps work even if you wait for the tests to run to completion each time. So the issue is that even though the tests have finished running, VS Code is keeping that process open in some way. |
Also worth noting that although there seems to be some randomness in how many times you need to run the tests to trigger the failure, once it reaches this failure state then the tests will fail every time from then on with those CUDNN errors (suggesting there's some process permanently stuck in the background holding the GPU resources). |
The process doesn't stay alive, it dies. |
This problem only occurs when running through VS Code, not when running the tests in other ways (e.g. running |
There's nothing specific to VS Code.
|
Solution:
|
Closing in favour of #7608. |
Environment data
Expected behaviour
Running the same test suite multiple times should result in the same result each time.
Actual behaviour
After restarting VS Code, the test suite runs normally the first time. But then running it again (sometimes on the second attempt, sometimes after rerunning it several times) results in a bunch of errors related to CUDNN ("Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR" or "Could not create cudnn handle: CUDNN_STATUS_ALLOC_FAILED").
Based on these issues:
tensorflow/tensorflow#6698 (comment)
tensorflow/tensorflow#24496
https://stackoverflow.com/a/53707323
I believe that that CUDNN error is actually caused by the previous test process not shutting down completely, which causes those errors when the test suite runs again.
Note that this issue does not occur when running the tests normally through a command prompt (e.g., just calling
pytest
from the command line). It only happens when running the tests through VS Code.Steps to reproduce:
Run that test (using any of the methods described here https://code.visualstudio.com/docs/python/unit-testing#_run-tests).
Repeat step 2 until error appears.
Logs
Output for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)Output from
Console
under theDeveloper Tools
panel (toggle Developer Tools on underHelp
; turn on source maps to make any tracebacks be useful by runningEnable source map support for extension debugging
)The text was updated successfully, but these errors were encountered: