Skip to content

Commit a4c6786

Browse files
authored
Merge pull request #47646 from smorovic/CMSSW_15_0_2_patchX
[DAQ] fix input source raw file deletion deadlock (15_0_2_patchX)
2 parents 11b84ba + cad7d47 commit a4c6786

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

Diff for: EventFilter/Utilities/interface/FastMonitoringService.h

+1
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ namespace evf {
233233
void setTMicrostate(FastMonState::Microstate m);
234234

235235
static unsigned int getTID() { return tbb::this_task_arena::current_thread_index(); }
236+
bool streamIsIdle(unsigned int i) const;
236237

237238
private:
238239
void doSnapshot(const unsigned int ls, const bool isGlobalEOL);

Diff for: EventFilter/Utilities/src/DAQSource.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,7 @@ void DAQSource::fileDeleter() {
649649
for (unsigned int i = 0; i < streamFileTracker_.size(); i++) {
650650
if (it->first == streamFileTracker_.at(i)) {
651651
//only skip if LS is open
652-
if (fileLSOpen) {
652+
if (fileLSOpen && (!fms_ || !fms_->streamIsIdle(i))) {
653653
fileIsBeingProcessed = true;
654654
break;
655655
}

Diff for: EventFilter/Utilities/src/FastMonitoringService.cc

+5
Original file line numberDiff line numberDiff line change
@@ -1052,4 +1052,9 @@ namespace evf {
10521052
fmt_->jsonMonitor_->snap(ls);
10531053
}
10541054

1055+
bool FastMonitoringService::streamIsIdle(unsigned int i) const {
1056+
auto ms = microstate_.at(i);
1057+
return ms == getmIdle();
1058+
}
1059+
10551060
} //end namespace evf

Diff for: EventFilter/Utilities/src/FedRawDataInputSource.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@ void FedRawDataInputSource::fileDeleter() {
727727
for (unsigned int i = 0; i < streamFileTracker_.size(); i++) {
728728
if (it->first == streamFileTracker_.at(i)) {
729729
//only skip if LS is open
730-
if (fileLSOpen) {
730+
if (fileLSOpen && (!fms_ || !fms_->streamIsIdle(i))) {
731731
fileIsBeingProcessed = true;
732732
break;
733733
}

0 commit comments

Comments
 (0)