You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Momo Adc (Jira)" <ji...@apache.org> on 2020/01/09 13:26:00 UTC
[jira] [Created] (NIFI-6996) ConsumeWindowsEventLog leads to a
stackoverflow when subscription fails
Momo Adc created NIFI-6996:
------------------------------
Summary: ConsumeWindowsEventLog leads to a stackoverflow when subscription fails
Key: NIFI-6996
URL: https://issues.apache.org/jira/browse/NIFI-6996
Project: Apache NiFi
Issue Type: Bug
Components: Extensions
Affects Versions: 1.10.0
Reporter: Momo Adc
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:
{code:java}
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;
}{code}
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.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)