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
In TaskManager class, here's the body of fork_task currently:
def fork_task(self, task_info):
self.log_debug("Forking task %s" % self._task_str(task_info))
pid = os.fork()
if pid:
self.log_info("Task forked %s: pid=%s" % (self._task_str(task_info), pid))
return pid
# in no circumstance should we return after the fork
# nor should any exceptions propagate past here
try:
# set process group
os.setpgrp()
# set a do-nothing handler for sigusr2
# do not use signal.signal(signal.SIGUSR2, signal.SIG_IGN) - it completely masks interrups !!!
signal.signal(signal.SIGUSR2, lambda *args: None)
# set a default handler for SIGTERM
signal.signal(signal.SIGTERM, signal.SIG_DFL)
# run the task
self.run_task(task_info)
finally:
# die
os._exit(os.EX_OK)
If run_task raises any exception, it's never logged, and the process exits with 0 exit code giving no indication of an error.
It seems that any exceptions here should be logged, so that problems from run_task (e.g. failed XML-RPC calls to hub) leave some evidence behind.
The text was updated successfully, but these errors were encountered:
rohanpm
added a commit
to rohanpm/kobo
that referenced
this issue
Jan 4, 2019
When a task was run from fork_task, any uncaught exceptions would
be silently discarded (e.g. a communication failure between worker
and hub). This makes debugging more difficult than it should be.
Make sure any raised exception is logged in this block.
Fixesrelease-engineering#32
In TaskManager class, here's the body of fork_task currently:
If run_task raises any exception, it's never logged, and the process exits with 0 exit code giving no indication of an error.
It seems that any exceptions here should be logged, so that problems from run_task (e.g. failed XML-RPC calls to hub) leave some evidence behind.
The text was updated successfully, but these errors were encountered: