Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
Back to tool/Back to issues
#8202·keda

Splunk Observability scaler retains SignalFlow buffer goroutines across repeated queries

Author: pravethaCreated Sep 19, 2026Updated Sep 27, 2026

Report

PR #8134 fixes the SignalFlow client lifecycle problem reported in #8099. Testing its merge commit (0a7815a08da9d139098441db14e2e0ec494aa81f) confirms that client file descriptors now remain bounded.

However, repeated Splunk Observability queries still retain goroutines and heap memory.

This appears to be the known residual mentioned in #8099:

  1. Every SignalFlow Computation starts buffered forwarders for Data, Expirations, Events, and Info.
  2. KEDA's stopAndDrain() consumes only comp.Data().
  3. During shutdown, bufferMessages attempts to flush pending messages to its output channel.
  4. If an output such as comp.Info() has no consumer, that goroutine can remain blocked indefinitely.

A production-like soak with 18 Splunk Observability triggers polling every 15 or 30 seconds produced:

Soak point Working set RSS Heap in-use Goroutines Open FDs
+1 hour 421 MiB 503 MiB 318 MiB 3,200 185
+16h 7m 1,245 MiB 1,326 MiB 1,082 MiB 36,102 183
+17h 24m 1,259 MiB 1,340 MiB 1,065 MiB 37,489 183

The patched build had no restarts or OOMs during this period. FDs stayed flat, showing that #8134 materially improves the original client/socket leak, but goroutines continued growing by roughly 35 per minute and retained memory grew by approximately 51–55 MiB per hour.

The nominal workload creates roughly 50 Splunk query computations per minute, which is the same order as the observed goroutine growth.

Expected Behavior

Once a query computation completes or is canceled, all of its forwarding goroutines should terminate.

Under a fixed polling workload, goroutine count and retained heap should reach a bounded steady state.

Actual Behavior

File descriptors remain bounded after #8134, but goroutines and retained heap continue accumulating across repeated query computations.

The behavior is consistent with one unread SignalFlow buffer goroutine being retained for each computation.

Steps to Reproduce the Problem

  1. Check out commit 0a7815a08da9d139098441db14e2e0ec494aa81f.
  2. Use the SignalFlow fake backend setup from TestSplunkObservabilityCloseReapsClientGoroutines.
  3. Call getQueryResult repeatedly on the same scaler, for example 50–100 times.
  4. Allow each query's cancellation and cleanup to complete.
  5. Count goroutine stacks containing signalflow-client-go or bufferMessages after each iteration.
  6. Observe that the count grows with the number of computations instead of remaining bounded.

The existing single-query regression test permits before + 1 SignalFlow goroutine. It therefore does not detect linear accumulation across repeated queries.

Logs from KEDA operator

No crash log. The operator remained Running with zero restarts or OOMs
during the patched soak. A live pprof endpoint was not exposed.

KEDA Version

Other (0a7815a08da9d139098441db14e2e0ec494aa81f, merge commit of #8134)

Platform

Any

Scaler Details

Splunk Observability (SignalFx)

Would you be open to contributing a fix?

Maybe

Anything else?

Potential fixes include:

  • Consume comp.Info(), comp.Events(), and comp.Expirations() concurrently for the computation lifetime; or
  • Change signalflow-client-go so shutdown cannot block while flushing to an unconsumed output channel.

A regression test should execute many queries and assert that the remaining SignalFlow goroutine count is bounded rather than allowing one additional goroutine per query.

Relevant references:

  • #8099
  • #8134
  • KEDA scaler at the tested commit: https://github.com/kedacore/keda/blob/0a7815a08da9d139098441db14e2e0ec494aa81f/pkg/scalers/splunk_observability_scaler.go
  • SignalFlow computation buffering: https://github.com/signalfx/signalflow-client-go/blob/v2.3.0/signalflow/computation.go

Source: kedacore/keda

View original on GitHubView discussion on GitHub