Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix race condition in DAQ modules when exception is thrown in event processing (only affecting multithreading) - 80X #12202

Closed
wants to merge 318 commits into from

Conversation

smorovic
Copy link
Contributor

Port of #12200 (75X) and #12201 (76X)

A rare race condition occurs when exception is thrown during processing of last few events in a file and LS. In this case, another thread can already request next event from the source. If next event belongs to the next LS, input source reports to the FastMonitoringService a total number of events in previous LS.

Normally in case of exception, we skip writing JSON stream output (catching exception action callback in the FastMonitoringService), and subsequently hltd assigns missing events as error events to close micro-merge of that LS. However, suppression was not happening after input source already reported the total number of events to the FastMonitoringService. This lead to incomplete micromerge for some streams. The problem is present only in multithreading, as in the single-threaded mode source can get a request for next event before exception on currently processed event is thrown (i.e. event requests are aborted and run/LS get closed).

In this update, JSON output is suppressed if exception has been thrown, regardless of input source report.

serval2412 and others added 30 commits October 16, 2015 21:56
Prefer prefix ++/-- operators for non-primitive types
Tracking Reco: tuning of outlier rejection, duplicate merging, pairSeeding
…agger-Retuning

HBHE isolated noise reflagger retuning for Run2
Rename Create Bd_JpsiKPi.dec to Bd_JpsiKPi.dec
Python3 and recent python 2 use sys.maxsize and no sys.maxint
…iseFilter-to-25ns-V2

Switch default HBHENoiseFilter settings to Run2-25ns configuration V2 - 76X
Make them members in Vx3DHLTAnalyzer.
Please test before accepting.
@cvuosalo
Copy link
Contributor

cvuosalo commented Nov 5, 2015

@smorovic: Since #12148 and #12245 have been merged, this PR now has merge conflicts. Please fix the conflicts. This PR is otherwise ready for approval, and the Jenkins tests are OK.

…g, with other thread already requests next event from source. Source can then open next LS (internally) and report event number in past LS to the FastMonitoringService. In this case it is possible to run preEndLumi triggered by exception later than source report, in which case exception check was (incorrectly) being skipped.
compilation fixes

Conflicts:
	EventFilter/Utilities/interface/FedRawDataInputSource.h
…ssw into test81

Conflicts:
	EventFilter/Utilities/interface/FastMonitoringService.h
@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 5, 2015

@smorovic
Copy link
Contributor Author

smorovic commented Nov 5, 2015

Not sure what went wrong in rebase. Closing this one and will make a new PR.

@smorovic smorovic closed this Nov 5, 2015
@smorovic smorovic deleted the exception-eols-fix-80X branch November 13, 2015 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment