You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using centos 7, python3.6.8, invoke 1.4.0 and I am getting a weird intermittent UnexpectedExit error when using run from invoke. I've tried digging through an strace, but I couldn't find any pattern with the ones that fail or anything else interesting. For the process that was said to have returned an exit code of None, I confirmed it exits with 0 in the strace output.
Is there any other info that would be useful?
To reproduce, I just run:
import traceback
import time
import datetime
from invoke import run
error_count = 0
for i in range(0,10000):
time.sleep(0.15)
print(str(datetime.datetime.now()) + " - " + str(time.time()) + " - on attempt: " + str(i))
try:
result = run("rm -f /tmp/idfkidfk")
if result.return_code != 0:
raise Exception("WTF!!!!")
except Exception as e:
print(str(datetime.datetime.now()) + " - " + str(time.time()) + " - Hit exception:\n" + traceback.format_exc())
error_count += 1
And it seems to throw one of these every few hundred attempts or so:
2020-01-28 18:20:11.132695 - 1580264411.1327217 - on attempt: 307
2020-01-28 18:20:11.307360 - 1580264411.3073883 - on attempt: 308
2020-01-28 18:20:11.483637 - 1580264411.4836638 - on attempt: 309
2020-01-28 18:20:11.497629 - 1580264411.4976513 - Hit exception:
Traceback (most recent call last):
File "idfk.py", line 10, in <module>
result = run("rm -f /tmp/idfkidfk")
File "/root/.pyenv/versions/3.6.8/lib/python3.6/site-packages/invoke/__init__.py", line 48, in run
return Context().run(command, **kwargs)
File "/root/.pyenv/versions/3.6.8/lib/python3.6/site-packages/invoke/context.py", line 94, in run
return self._run(runner, command, **kwargs)
File "/root/.pyenv/versions/3.6.8/lib/python3.6/site-packages/invoke/context.py", line 101, in _run
return runner.run(command, **kwargs)
File "/root/.pyenv/versions/3.6.8/lib/python3.6/site-packages/invoke/runners.py", line 363, in run
return self._run_body(command, **kwargs)
File "/root/.pyenv/versions/3.6.8/lib/python3.6/site-packages/invoke/runners.py", line 422, in _run_body
return self.make_promise() if self._asynchronous else self._finish()
File "/root/.pyenv/versions/3.6.8/lib/python3.6/site-packages/invoke/runners.py", line 489, in _finish
raise UnexpectedExit(result)
invoke.exceptions.UnexpectedExit: Encountered a bad command exit code!
Command: 'rm -f /tmp/idfkidfk'
Exit code: None
Stdout: already printed
Stderr: already printed
2020-01-28 18:20:11.648929 - 1580264411.6489484 - on attempt: 310
2020-01-28 18:20:11.823539 - 1580264411.8235662 - on attempt: 311
Thanks,
Jon
The text was updated successfully, but these errors were encountered:
Hey,
I am using centos 7, python3.6.8, invoke 1.4.0 and I am getting a weird intermittent UnexpectedExit error when using run from invoke. I've tried digging through an strace, but I couldn't find any pattern with the ones that fail or anything else interesting. For the process that was said to have returned an exit code of None, I confirmed it exits with 0 in the strace output.
Is there any other info that would be useful?
To reproduce, I just run:
And it seems to throw one of these every few hundred attempts or so:
Thanks,
Jon
The text was updated successfully, but these errors were encountered: