Ticket #9971 (closed: fixed)

Opened 6 years ago

Last modified 5 years ago

SofQW3 crashes Mantid when logs are set to Debug level (at least on large files)

Reported by: Alex Buts Owned by: Martyn Gigg
Priority: major Milestone: Release 3.2.1
Component: Framework Keywords:
Cc: Blocked By:
Blocking: #10126 Tester: Alex Buts

Description (last modified by Alex Buts) (diff)

The script below works fine when logs are in Notice mode: Produces reasonably looking file in 35 seconds:

SofQW3 started SofQW3 successful, Duration 34.91 seconds

######################################################################
#Python Script Generated by GeneratePythonScript Algorithm
######################################################################
Load(Filename=r'D:\Data\Fe\Fe_Mantid\MAP15052.nxspe',OutputWorkspace='MAP15052')
SofQW3(InputWorkspace='MAP15052',OutputWorkspace='MAP15052MD',QAxisBinning='0,0.1,14',EMode='Direct')


Trying the same job when logs are on debug level: after 5 minutes of doing something (the program immediately becomes unresponsive), Mantid crashes.

The file can be found in /babylon5/Public/abuts/Fe

Manitd 2.5 (and I suspect 3.1 was working in debug mode just fine)

Change History

comment:1 Changed 6 years ago by Alex Buts

  • Description modified (diff)

comment:2 Changed 6 years ago by Alex Buts

  • Description modified (diff)

comment:3 Changed 6 years ago by Alex Buts

  • Description modified (diff)
  • Summary changed from SofQW3 crashes Mantid in Debug mode (at least on large files) to SofQW3 crashes Mantid when logs are set to Debug level (at least on large files)

comment:4 Changed 6 years ago by Nick Draper

  • Status changed from new to assigned

comment:5 Changed 6 years ago by Alex Buts

  • Keywords PatchCandidate added

comment:6 Changed 6 years ago by Martyn Gigg

  • Status changed from assigned to inprogress

Speed up the debug logging in SofQW3

It now accumulates the debug messages and logs per spectrum rather than calling the logger for every spectrum & bin. Refs #9971

Changeset: df740772715ead4dd63a239b640708a5be709eb7

comment:7 Changed 6 years ago by Martyn Gigg

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

Branch: bugfix/9971_sofw_crash_debug_log

Tester: Run the script in the description with log level at debug. It will run, albeit very slowly and it didn't crash for me.

comment:8 Changed 6 years ago by Alex Buts

  • Status changed from verify to verifying
  • Tester set to Alex Buts

comment:9 Changed 6 years ago by Peter Peterson

  • Keywords PatchCandidate removed
  • Milestone changed from Release 3.3 to Release 3.2.1

comment:10 Changed 6 years ago by Alex Buts

  • Status changed from verifying to closed

There is improvement to behaviour of SofQW3 -- The Mantid does not die, so it worth including the solution in the patch. Despite that, the problem has not been entirely solved and new ticket is #10126 created to describe it.

I suspect the issue is not with SofQW3 but with thread safety of the logs. As I has not been able to identify other algorithm with sufficient amount of logging, this becomes lower priority problem.

Strange behaviour of ISISDirectReduction script run with the logs on debug level observed with Matid3.2, but I can not clearly associate it with logging.

Last edited 6 years ago by Alex Buts (previous) (diff)

comment:11 Changed 6 years ago by Alex Buts

Merge remote-tracking branch 'origin/bugfix/9971_sofw_crash_debug_log'

Full changeset: 38ea8a99619a2e843124bfcdf9216e27080260e1

comment:12 Changed 6 years ago by Alex Buts

  • Blocking 10126 added

comment:13 Changed 6 years ago by Martyn Gigg

Cherry-pick fixes from bugfix/9971_sofw_crash_debug_log into next

Changes:

Speed up the debug logging in SofQW3

It now accumulates the debug messages and logs per spectrum rather than calling the logger for every spectrum & bin. Refs #9971 (cherry picked from commit df740772715ead4dd63a239b640708a5be709eb7)

Changeset: 09df75e84748ff8b7044c25cc444af72ac8e4f59

comment:14 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 10813

Note: See TracTickets for help on using tickets.