Ticket #775 (closed: fixed)

Opened 11 years ago

Last modified 5 years ago

Multithreading can cause problems with cow_ptr array copies in certain circumstances

Reported by: Nick Draper Owned by: Martyn Gigg
Priority: minor Milestone: Iteration 24
Component: Keywords:
Cc: Blocked By:
Blocking: Tester: Janik Zikovsky

Description (last modified by Nick Draper) (diff)

We can get a linux seg fault in this situation

  • In a multithread loop
  • Where you are assigning a whole X array from one workspace to another one spectra at a time
    outputWS->dataX(i) = inputWS->readX(i);
    
  • Where your input is originally sharing a single x array through the shared pointer. E.g. fresh from a loadraw.
  • Where both workspaces are actually the same
  • Only on linux
  • Not in MantidPlot (can be shown in unit tests and MantidScript)

Change History

comment:1 Changed 11 years ago by Nick Draper

  • Description modified (diff)

comment:2 Changed 11 years ago by Nick Draper

  • Milestone changed from Iteration 18 to Iteration 19

Moved as part of iteration 18 end

comment:3 Changed 11 years ago by Nick Draper

  • Milestone changed from Iteration 19 to Iteration 20

Moved as part of the end of Iteration 19

comment:4 Changed 11 years ago by Nick Draper

  • Priority changed from major to minor

comment:5 Changed 11 years ago by Nick Draper

  • Status changed from new to assigned
  • Owner set to Martyn Gigg

Check if this is still the case!

comment:6 Changed 10 years ago by Martyn Gigg

  • Status changed from assigned to accepted

comment:7 Changed 10 years ago by Martyn Gigg

  • Status changed from accepted to verify

In my tests, I can't reproduce this so I don't think it's a problem anymore

comment:8 Changed 10 years ago by Nick Draper

  • Resolution set to fixed

fill in missing resolution

comment:9 Changed 10 years ago by Janik Zikovsky

  • Status changed from verify to verifying
  • Tester set to Janik Zikovsky

comment:10 Changed 10 years ago by Janik Zikovsky

(In [5938]) Refs #775: some test code in Main

comment:11 Changed 10 years ago by Janik Zikovsky

  • Status changed from verifying to closed

Cannot produce a segfault. The PARALLEL_CRITICAL blocker in the cow_ptr does the job; the routine effectively runs single-threaded, even in a parallel block.

comment:12 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 1623

Note: See TracTickets for help on using tickets.