Ticket #7234 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

NormaliseToMonitor race condition

Reported by: Russell Taylor Owned by: Russell Taylor
Priority: major Milestone: Release 2.6
Component: Framework Keywords:
Cc: Blocked By:
Blocking: Tester: Martyn Gigg

Description

Saw this failure on a windows build:

In NormaliseToMonitorTest::testExec_inplace:
C:/jenkins/workspace/ornl_windows7_master/Code/Mantid/Framework/Algorithms/test/NormaliseToMonitorTest.h:115: Error: Expected (output->readE(i)[j] == 3.05941) up to 0.00001 (0.0000), found (3.1176 != 3.0594)
C:/jenkins/workspace/ornl_windows7_master/Code/Mantid/Framework/Algorithms/test/NormaliseToMonitorTest.h:115: Error: Expected (output->readE(i)[j] == 3.05941) up to 0.00001 (0.0000), found (3.1176 != 3.0594)
C:/jenkins/workspace/ornl_windows7_master/Code/Mantid/Framework/Algorithms/test/NormaliseToMonitorTest.h:115: Error: Expected (output->readE(i)[j] == 3.05941) up to 0.00001 (0.0000), found (3.1176 != 3.0594)
C:/jenkins/workspace/ornl_windows7_master/Code/Mantid/Framework/Algorithms/test/NormaliseToMonitorTest.h:115: Error: Expected (output->readE(i)[j] == 3.05941) up to 0.00001 (0.0000), found (3.1176 != 3.0594)
C:/jenkins/workspace/ornl_windows7_master/Code/Mantid/Framework/Algorithms/test/NormaliseToMonitorTest.h:115: Error: Expected (output->readE(i)[j] == 3.05941) up to 0.00001 (0.0000), found (3.1176 != 3.0594)
C:/jenkins/workspace/ornl_windows7_master/Code/Mantid/Framework/Algorithms/test/NormaliseToMonitorTest.h:115: Error: Expected (output->readE(i)[j] == 3.05941) up to 0.00001 (0.0000), found (3.1176 != 3.0594)
C:/jenkins/workspace/ornl_windows7_master/Code/Mantid/Framework/Algorithms/test/NormaliseToMonitorTest.h:115: Error: Expected (output->readE(i)[j] == 3.05941) up to 0.00001 (0.0000), found (3.1176 != 3.0594)
C:/jenkins/workspace/ornl_windows7_master/Code/Mantid/Framework/Algorithms/test/NormaliseToMonitorTest.h:115: Error: Expected (output->readE(i)[j] == 3.05941) up to 0.00001 (0.0000), found (3.1176 != 3.0594)
C:/jenkins/workspace/ornl_windows7_master/Code/Mantid/Framework/Algorithms/test/NormaliseToMonitorTest.h:115: Error: Expected (output->readE(i)[j] == 3.05941) up to 0.00001 (0.0000), found (3.1176 != 3.0594)

Seems likely to be a race condition shown up by the additional test coverage introduced in #7216.

Change History

comment:1 Changed 7 years ago by Russell Taylor

  • Status changed from new to accepted

comment:2 Changed 7 years ago by Russell Taylor

Wrong ticket quoted in commit message:

Re #7216. Ensure non-const ref is obtained before const one.

As it may trigger a copy inside the cow_ptr and invalidate a previously obtained reference if the input & output workspaces are the same. In reality, Y & E vectors are almost never shared (outside of tests), but it's better to be fully safe/correct.

Changeset: ea3af02a52d6e923f971fa8a19af36e99b7598cd

comment:3 Changed 7 years ago by Russell Taylor

  • Status changed from accepted to verify
  • Resolution set to fixed

Tester: Roll up for a good opportunity to learn what the deal is with the cow_ptr if you don't know already. Branch is feature/7234_nomalisetomonitor_race_condition.

Test by inspecting build jobs for failure of the above test. This has been seen (that I've noticed) on the ORNL Windows & Ubuntu incremental builds & the ISIS Windows one.

comment:4 Changed 7 years ago by Martyn Gigg

  • Status changed from verify to verifying
  • Tester set to Martyn Gigg

comment:5 Changed 7 years ago by Martyn Gigg

  • Status changed from verifying to closed

Ran the test in a thin loop 50 times and had about 4-5 failures before the fix and no failures after.

comment:6 Changed 7 years ago by Nick Draper

  • Component changed from Mantid to Framework

comment:7 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 8080

Note: See TracTickets for help on using tickets.