Skip to content

Commit a00149f

Browse files
authored
Merge pull request #2301 from oesteban/fix/2300
[FIX] MultiProc mishandling crashes
2 parents f1d690c + 12598b6 commit a00149f

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

CHANGES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Upcoming release
77

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

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

nipype/pipeline/plugins/multiproc.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,10 @@ def _send_procs_to_workers(self, updatehash=False, graph=None):
238238
num_subnodes = self.procs[jobid].num_subnodes()
239239
except Exception:
240240
traceback = format_exception(*sys.exc_info())
241-
self._report_crash(self.procs[jobid], traceback=traceback)
242-
self._clean_queue(jobid, graph)
241+
self._clean_queue(
242+
jobid, graph,
243+
result={'result': None, 'traceback': traceback}
244+
)
243245
self.proc_pending[jobid] = False
244246
continue
245247
if num_subnodes > 1:
@@ -275,10 +277,13 @@ def _send_procs_to_workers(self, updatehash=False, graph=None):
275277
logger.debug('Running node %s on master thread',
276278
self.procs[jobid])
277279
try:
278-
self.procs[jobid].run()
280+
self.procs[jobid].run(updatehash=updatehash)
279281
except Exception:
280282
traceback = format_exception(*sys.exc_info())
281-
self._report_crash(self.procs[jobid], traceback=traceback)
283+
self._clean_queue(
284+
jobid, graph,
285+
result={'result': None, 'traceback': traceback}
286+
)
282287

283288
# Release resources
284289
self._task_finished_cb(jobid)

0 commit comments

Comments
 (0)