IfwApiCheckTask
uses thread-local variable in coroutine
#10144
Labels
Milestone
IfwApiCheckTask
uses thread-local variable in coroutine
#10144
Random "that can't possibly work" observation while looking for something different:
ReportIfwCheckResult()
inifwapichecktask.cpp
usesCheckable::ExecuteCommandProcessFinishedHandler
:icinga2/lib/methods/ifwapichecktask.cpp
Lines 36 to 49 in 4c6b93d
However,
Checkable::ExecuteCommandProcessFinishedHandler
is defined asthread_local
:icinga2/lib/icinga/checkable.cpp
Line 34 in 4c6b93d
And
ReportIfwCheckResult()
is used from withinDoIfwNetIo()
:icinga2/lib/methods/ifwapichecktask.cpp
Lines 96 to 284 in 4c6b93d
Which in turn is started as a coroutine:
icinga2/lib/methods/ifwapichecktask.cpp
Lines 512 to 530 in 4c6b93d
Thus has no guarantee on which thread it's run, so I don't see how accessing that thread-local variable should do something useful.
The text was updated successfully, but these errors were encountered: