{"record":{"id":"6f265021e566a75b","repo":"apache/beam","slug":"operation-ongoing-in-bundle-for-at-least-without-outputting-6f2650","errorCode":null,"errorMessage":"Operation ongoing in bundle {} for at least {} without outputting or completing:\n  at {}","messagePattern":"Operation ongoing in bundle (.+?) for at least (.+?) without outputting or completing:\n  at (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"sdks/java/harness/src/main/java/org/apache/beam/fn/harness/control/ExecutionStateSampler.java","lineNumber":459,"sourceCode":"          return Optional.of(timeoutMessage);\n        }\n\n        if (lullTimeMs > MAX_LULL_TIME_MS) {\n          if (lullTimeMs < lastLullReport // This must be a new report.\n              || lullTimeMs > 1.2 * lastLullReport // Exponential backoff.\n              || lullTimeMs\n                  > MAX_LULL_TIME_MS + lastLullReport // At least once every MAX_LULL_TIME_MS.\n          ) {\n            lastLullReport = lullTimeMs;\n            Thread thread = trackedThread.get();\n            if (thread == null) {\n              LOG.warn(\n                  \"Operation ongoing in bundle {} for at least {} without outputting \"\n                      + \"or completing (stack trace unable to be generated).\",\n                  processBundleId.get(),\n                  DURATION_FORMATTER.print(Duration.millis(lullTimeMs).toPeriod()));\n            } else if (currentExecutionState == null) {\n              LOG.warn(\n                  \"Operation ongoing in bundle {} for at least {} without outputting \"\n                      + \"or completing:\\n  at {}\",\n                  processBundleId.get(),\n                  DURATION_FORMATTER.print(Duration.millis(lullTimeMs).toPeriod()),\n                  Joiner.on(\"\\n  at \").join(thread.getStackTrace()));\n            } else {\n              LOG.warn(\n                  \"Operation ongoing in bundle {} for PTransform{{id={}, name={}, state={}}} \"\n                      + \"for at least {} without outputting or completing:\\n  at {}\",\n                  processBundleId.get(),\n                  currentExecutionState.ptransformId,\n                  currentExecutionState.ptransformUniqueName,\n                  currentExecutionState.stateName,\n                  DURATION_FORMATTER.print(Duration.millis(lullTimeMs).toPeriod()),\n                  Joiner.on(\"\\n  at \").join(thread.getStackTrace()));\n            }\n          }\n        }","sourceCodeStart":441,"sourceCodeEnd":477,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/harness/src/main/java/org/apache/beam/fn/harness/control/ExecutionStateSampler.java#L441-L477","documentation":"The SDK harness's ExecutionStateSampler emits this warning when a worker thread has been stuck inside a bundle (a 'lull') for longer than the configured sampling threshold, and no PTransform execution state could be attributed to it, so only the thread's stack trace is reported. It is a diagnostic, not a thrown exception; it indicates a pipeline stage that stopped producing output or completing.","triggerScenarios":"A DoFn or user code blocks (I/O wait, deadlock, long sleep, unbounded loop) on a worker thread while a bundle is in progress, the sampler's periodic takeSample() observes the same thread and state for more than the lull threshold, and currentExecutionState is null (state not registered with the sampler).","commonSituations":"User DoFns doing blocking HTTP/DB calls without timeouts; deadlocks between synchronized blocks in user code; external services hanging; too-low --sdkHarnessLogInfoThresholdSec / lull thresholds flagging healthy long-running operations.","solutions":["Inspect the printed stack trace to find the blocked thread and fix the blocking user code (add timeouts, remove deadlock).","Check the external resource the thread is waiting on (network, database) and fix availability/latency.","Increase the lull threshold if the operation is legitimately long-running (e.g. --sdkHarnessLogInfoThresholdSec).","Split long operations into smaller elements to let bundles complete and output elements."],"exampleFix":"// before\nString result = httpClient.execute(request); // no timeout, thread can hang forever\n// after\nRequestConfig cfg = RequestConfig.custom().setSocketTimeout(30000).build();\nCloseableHttpClient client = HttpClients.custom().setDefaultRequestConfig(cfg).build();","handlingStrategy":"validation","validationCode":"// Before long-running work inside a DoFn, ensure calls have timeouts\nif (timeoutMillis <= 0) { throw new IllegalArgumentException(\"Blocking call needs a timeout\"); }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always set timeouts on blocking I/O in DoFns","Avoid synchronized waits without timeout in transforms","Tune lull thresholds to your pipeline's expected element processing time","Monitor lull warnings and the attached stack traces to catch deadlocks early"],"tags":["java","apache-beam","harness","lull-detection"],"backgroundTag":"bundle-lull-detected","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-20T03:17:13.778Z"}