Ticket #7968 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Crash when filtering time-series logs with single value

Reported by: Nick Draper Owned by: Martyn Gigg
Priority: critical Milestone: Release 3.0
Component: Framework Keywords:
Cc: Blocked By:
Blocking: Tester: Peter Parker

Description

The following script causes a complete crash of Mantid 2.6.1 on windows 7 64

It looks like another GUI race condition problem

It basically means I can’t run a script without deleteing existing named workspaces

Rob

import offspec as nr

for i in range(23750,23753):
                binning=["2.0","0.1","14.0","2"]
                nr.nrSESANSP0Fn(str(i),str(i),4,4,"2","1",binning,diagnostics=1)

for i in range(23750,23753):
                binning=["2.0","0.1","14.0","2"]
                nr.nrSESANSP0Fn(str(i),str(i),4,4,"2","1",binning,diagnostics=1)

Change History

comment:1 Changed 7 years ago by Nick Draper

  • Milestone changed from Backlog to Release 3.0

comment:2 Changed 7 years ago by Martyn Gigg

  • Status changed from new to verify
  • Resolution set to invalid

This has been fixed by #7708.

comment:3 Changed 7 years ago by Nick Draper

  • Status changed from verify to verifying
  • Tester set to Nick Draper

comment:4 Changed 7 years ago by Nick Draper

  • Status changed from verifying to reopened
  • Resolution invalid deleted

This fails with a debug assertion, the exception was a vector subscript out of range while filtering the sample logs

comment:5 Changed 7 years ago by Martyn Gigg

  • Summary changed from race condition critical crash to Crash when filtering time-series logs with single value

Changing summary to something more suitable to the problem

comment:6 Changed 7 years ago by Martyn Gigg

  • Status changed from reopened to inprogress

This can be reproduced by simply trying to load OFFSPEC000023750.nxs

There is an out-of-bounds access in TimeSeriesProperty::filterWith at line 1520 that assumes the log has at least 2 values.

comment:7 Changed 7 years ago by Martyn Gigg

This has also shown a sporadic problem with WorkspaceGroup::workspaceReplaceHandle

I had a single crash when it was trying to enable ADS notifications on the last line of the function. The disable/enable should not be necessary as there is a mutex held meaning that notifications from other threads will just block until release.

comment:8 Changed 7 years ago by Martyn Gigg

Protect against single-valued time series/filters when filtering logs.

Refs #7968

Changeset: fd1f48688a1eadaa1cd3d7828e9ca11a7c63643c

comment:9 Changed 7 years ago by Martyn Gigg

Remove unnecessary enable/disable of ADS observers in WorkspaceGroup

The mutex lock will already deal with queuing issues. Refs #7968

Changeset: 3dfd7ebcaaabee29f47238ca0160d5ae2ff97efd

comment:10 Changed 7 years ago by Martyn Gigg

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

Branch: bugfix/7968_crash_filtering_single_value_time_series

Tester: Ideally this could be tested on windows in debug mode. Before the fixes if you try to load OFFSPEC000023750.nxs, which is in the ISIS archive at ndxoffspec/Instrument/data/cycle_13_3, then a debug assertion about an out of bounds error would fail.

Assuming that passes then also try and run the script in the description too.

comment:11 Changed 7 years ago by Wenduo Zhou

  • Status changed from verify to verifying
  • Tester changed from Nick Draper to Wenduo Zhou

comment:12 Changed 7 years ago by Wenduo Zhou

  • Status changed from verifying to verify
  • Tester Wenduo Zhou deleted

comment:13 Changed 7 years ago by Peter Parker

  • Status changed from verify to verifying
  • Tester set to Peter Parker

comment:14 Changed 7 years ago by Peter Parker

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/bugfix/7968_crash_filtering_single_value_time_series'

Full changeset: bc89835c699306696b5bda12e95b2306d927667a

comment:15 Changed 7 years ago by Peter Parker

Tested on Windows 7, in Debug mode.

  • I was able to reproduce the failed debug assertion before the changes.
  • After the fixes, OFFSPEC000023750.nxs loaded fine.
  • I retrieved offspec.py from the script repo and the script in the description ran without any errors.
  • The unit test covers the previously problematic single-valued filters.

comment:16 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 8813

Note: See TracTickets for help on using tickets.