Skip to content

Commit fd54f4a

Browse files
authored
DPL: fix device signpost segfaults for o2-dpl-raw-proxy (#15003)
1 parent a979c45 commit fd54f4a

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

Framework/Core/src/DataProcessingDevice.cxx

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1509,9 +1509,8 @@ void DataProcessingDevice::doPrepare(ServiceRegistryRef ref)
15091509

15101510
for (auto sci : pollOrder) {
15111511
auto& info = state.inputChannelInfos[sci];
1512-
auto& channelSpec = spec.inputChannels[sci];
15131512
O2_SIGNPOST_ID_FROM_POINTER(cid, device, &info);
1514-
O2_SIGNPOST_START(device, cid, "channels", "Processing channel %s", channelSpec.name.c_str());
1513+
O2_SIGNPOST_START(device, cid, "channels", "Processing channel %s", info.channel->GetName().c_str());
15151514

15161515
if (info.state != InputChannelState::Completed && info.state != InputChannelState::Pull) {
15171516
context.allDone = false;
@@ -1523,18 +1522,18 @@ void DataProcessingDevice::doPrepare(ServiceRegistryRef ref)
15231522
DataProcessingDevice::handleData(ref, info);
15241523
}
15251524
O2_SIGNPOST_END(device, cid, "channels", "Flushing channel %s which is in state %d and has %zu parts still pending.",
1526-
channelSpec.name.c_str(), (int)info.state, info.parts.Size());
1525+
info.channel->GetName().c_str(), (int)info.state, info.parts.Size());
15271526
continue;
15281527
}
15291528
if (info.channel == nullptr) {
15301529
O2_SIGNPOST_END(device, cid, "channels", "Channel %s which is in state %d is nullptr and has %zu parts still pending.",
1531-
channelSpec.name.c_str(), (int)info.state, info.parts.Size());
1530+
info.channel->GetName().c_str(), (int)info.state, info.parts.Size());
15321531
continue;
15331532
}
15341533
// Only poll DPL channels for now.
15351534
if (info.channelType != ChannelAccountingType::DPL) {
15361535
O2_SIGNPOST_END(device, cid, "channels", "Channel %s which is in state %d is not a DPL channel and has %zu parts still pending.",
1537-
channelSpec.name.c_str(), (int)info.state, info.parts.Size());
1536+
info.channel->GetName().c_str(), (int)info.state, info.parts.Size());
15381537
continue;
15391538
}
15401539
auto& socket = info.channel->GetSocket();
@@ -1546,7 +1545,7 @@ void DataProcessingDevice::doPrepare(ServiceRegistryRef ref)
15461545
socket.Events(&info.hasPendingEvents);
15471546
// If we do not read, we can continue.
15481547
if ((info.hasPendingEvents & 1) == 0 && (info.parts.Size() == 0)) {
1549-
O2_SIGNPOST_END(device, cid, "channels", "No pending events and no remaining parts to process for channel %{public}s", channelSpec.name.c_str());
1548+
O2_SIGNPOST_END(device, cid, "channels", "No pending events and no remaining parts to process for channel %{public}s", info.channel->GetName().c_str());
15501549
continue;
15511550
}
15521551
}
@@ -1564,12 +1563,12 @@ void DataProcessingDevice::doPrepare(ServiceRegistryRef ref)
15641563
bool newMessages = false;
15651564
while (true) {
15661565
O2_SIGNPOST_EVENT_EMIT(device, cid, "channels", "Receiving loop called for channel %{public}s (%d) with oldest possible timeslice %zu",
1567-
channelSpec.name.c_str(), info.id.value, info.oldestForChannel.value);
1566+
info.channel->GetName().c_str(), info.id.value, info.oldestForChannel.value);
15681567
if (info.parts.Size() < 64) {
15691568
fair::mq::Parts parts;
15701569
info.channel->Receive(parts, 0);
15711570
if (parts.Size()) {
1572-
O2_SIGNPOST_EVENT_EMIT(device, cid, "channels", "Received %zu parts from channel %{public}s (%d).", parts.Size(), channelSpec.name.c_str(), info.id.value);
1571+
O2_SIGNPOST_EVENT_EMIT(device, cid, "channels", "Received %zu parts from channel %{public}s (%d).", parts.Size(), info.channel->GetName().c_str(), info.id.value);
15731572
}
15741573
for (auto&& part : parts) {
15751574
info.parts.fParts.emplace_back(std::move(part));
@@ -1598,7 +1597,7 @@ void DataProcessingDevice::doPrepare(ServiceRegistryRef ref)
15981597
}
15991598
}
16001599
O2_SIGNPOST_END(device, cid, "channels", "Done processing channel %{public}s (%d).",
1601-
channelSpec.name.c_str(), info.id.value);
1600+
info.channel->GetName().c_str(), info.id.value);
16021601
}
16031602
}
16041603

0 commit comments

Comments
 (0)