Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.10.0
-
None
Description
The ConsumeWindowsEvenLog processor causes a stack overflow when it fails to subscribe to a log.
Sadly I cannot provide logs (working under an NDA).
Since I cannot provide logs I will try to describe the flow:
1. isSubscribed function is called and the subscription fails (line 242)
2. isSubscribed calls unsubscribe function (line 250)
3. unsubscribe function calls isSubscribed (line 290)
4. repeat
The second line causes the issue:
private boolean isSubscribed() { final boolean subscribed = subscriptionHandle != null && subscriptionHandle.getPointer() != null; final boolean subscriptionFailed = evtSubscribeCallback != null && ((EventSubscribeXmlRenderingCallback) evtSubscribeCallback).isSubscriptionFailed(); final boolean subscribing = subscribed && !subscriptionFailed; getLogger().debug("subscribing? {}, subscribed={}, subscriptionFailed={}", new Object[]{subscribing, subscribed, subscriptionFailed}); if (subscriptionFailed) { getLogger().info("Canceling a failed subscription."); unsubscribe(); } return subscribing; }
If evtSubscribeCallback is null we're stuck in a stackoverflow, the isSubscriptionFailed function in EventSubscribeXmlRenderingCallback returns a boolean called subscriptionFailed which is private and set to true when it fails to subscribe, nowhere in the class is it set back to false.
Attachments
Issue Links
- is related to
-
NIFI-6507 ConsumeWindowsEventLog should renew failed subscription
- Resolved
- links to