common-workflow-language / cwltool

Common Workflow Language reference implementation
https://cwltool.readthedocs.io/
Apache License 2.0
332 stars 230 forks source link

Add helpful error message when a program is terminated by a (Unix) signal, such as a segfault #580

Closed mr-c closed 2 years ago

mr-c commented 6 years ago

Currently one gets a error as the expected outputs are not available, which is technically true but unhelpful.

Thanks to @gijzelaerr for the idea

mr-c commented 6 years ago

In general we should emphasis failing return codes over missing outputs, so there may be additional work to do here

mr-c commented 2 years ago

A good start would be adding a _logging.debug entry for the value of the return code in https://github.com/common-workflow-language/cwltool/blob/352daf6d53f12df4cd960c0343ef659924aa9712/cwltool/job.py#L346

gmloose commented 2 years ago

I think the title should be changed to "Add helpful error message when a program is terminated by a (Unix) signal", to make it more generic than just catching segmentation faults.

gmloose commented 2 years ago

Who or what sets self.successCodes, self.temporaryFailCodes, and self.permanentFailCodes? I can see these are set in lines 967-969 of command_line_tool.py, using self.tool.get(), and I see that self.tool is assigned a toolpath_object in line 586 of process.py, but then I'm lost because toolpath_object can be one of many objects.

mr-c commented 2 years ago

@gmloose they come from the CWL CommandLineTool description: https://www.commonwl.org/v1.0/CommandLineTool.html#CommandLineTool