Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Upcoming release

###### [Full changelog](https://github.com/nipy/nipype/milestone/13)

* FIX: MultiProc mishandling crashes (https://github.com/nipy/nipype/pull/2301)
* MAINT: Revise use of `subprocess.Popen` (https://github.com/nipy/nipype/pull/2289)
* ENH: Memorize version checks (https://github.com/nipy/nipype/pull/2274, https://github.com/nipy/nipype/pull/2295)

Expand Down
13 changes: 9 additions & 4 deletions nipype/pipeline/plugins/multiproc.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,10 @@ def _send_procs_to_workers(self, updatehash=False, graph=None):
num_subnodes = self.procs[jobid].num_subnodes()
except Exception:
traceback = format_exception(*sys.exc_info())
self._report_crash(self.procs[jobid], traceback=traceback)
self._clean_queue(jobid, graph)
self._clean_queue(
jobid, graph,
result={'result': None, 'traceback': traceback}
)
self.proc_pending[jobid] = False
continue
if num_subnodes > 1:
Expand Down Expand Up @@ -275,10 +277,13 @@ def _send_procs_to_workers(self, updatehash=False, graph=None):
logger.debug('Running node %s on master thread',
self.procs[jobid])
try:
self.procs[jobid].run()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also caught this missing updatehash

self.procs[jobid].run(updatehash=updatehash)
except Exception:
traceback = format_exception(*sys.exc_info())
self._report_crash(self.procs[jobid], traceback=traceback)
self._clean_queue(
jobid, graph,
result={'result': None, 'traceback': traceback}
)

# Release resources
self._task_finished_cb(jobid)
Expand Down