Ádám Markovics created MINIFICPP-1776:
-----------------------------------------
Summary: Parallel heartbeat and flow update can cause crash
Key: MINIFICPP-1776
URL: https://issues.apache.org/jira/browse/MINIFICPP-1776
Project: Apache NiFi MiNiFi C++
Issue Type: Bug
Reporter: Ádám Markovics
Assignee: Ádám Markovics
Performing heartbeat and applying a flow update in parallel can lead to a data
race.
During the flow update old processors are destructed.
While in the heartbeat we are asking information about the processors that are
being destructed or are already destructed.
#0 0x00007f6a5442c0ac in
org::apache::nifi::minifi::state::ProcessorController::getComponentName[abi:cxx11]()
const (this=0x7f6a101f2250) at
/home/fgerlits/src/minifi2/libminifi/include/core/state/ProcessorController.h:46
#1 0x00007f6a542771e0 in
org::apache::nifi::minifi::state::response::AgentStatus::serializeComponents
(this=0x7f6a2effc4d0) at
/home/fgerlits/src/minifi2/libminifi/include/core/state/nodes/AgentInformation.h:509
#2 0x00007f6a54276b15 in
org::apache::nifi::minifi::state::response::AgentStatus::serialize
(this=0x7f6a2effc4d0) at
/home/fgerlits/src/minifi2/libminifi/include/core/state/nodes/AgentInformation.h:447
#3 0x00007f6a54278e4e in
org::apache::nifi::minifi::state::response::AgentNode::getAgentStatus
(this=0x7f6a14007d00) at
/home/fgerlits/src/minifi2/libminifi/include/core/state/nodes/AgentInformation.h:772
#4 0x00007f6a54279298 in
org::apache::nifi::minifi::state::response::AgentInformation::serialize
(this=0x7f6a14007d00) at
/home/fgerlits/src/minifi2/libminifi/include/core/state/nodes/AgentInformation.h:820
#5 0x00007f6a542f20dc in
org::apache::nifi::minifi::c2::C2Agent::performHeartBeat (this=0x55b75c8a93c0)
at /home/fgerlits/src/minifi2/libminifi/src/c2/C2Agent.cpp:242
#6 0x00007f6a542f7ad0 in org::apache::nifi::minifi::c2::C2Agent::produce
(this=0x55b75c8a93c0) at
/home/fgerlits/src/minifi2/libminifi/src/c2/C2Agent.cpp:760
#7 0x00007f6a542efe8d in operator() (__closure=0x7f6a2effcbf0) at
/home/fgerlits/src/minifi2/libminifi/src/c2/C2Agent.cpp:87
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007f6a5442c0ac in
org::apache::nifi::minifi::state::ProcessorController::getComponentName[abi:cxx11]()
const (this=0x7f6a101f2250)
at
/home/fgerlits/src/minifi2/libminifi/include/core/state/ProcessorController.h:46
46 return processor_->getName();
--
This message was sent by Atlassian Jira
(v8.20.1#820001)