{"record":{"id":"2b523522a2babd18","repo":"apache/seatunnel","slug":"kudu-client-executor-did-not-terminate-after-force","errorCode":null,"errorMessage":"Kudu client executor did not terminate after forced shutdown.","messagePattern":"Kudu client executor did not terminate after forced shutdown\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"seatunnel-connectors-v2/connector-kudu/src/main/java/org/apache/seatunnel/connectors/seatunnel/kudu/kuduclient/KuduClientResource.java","lineNumber":74,"sourceCode":"            kuduClient.close();\n        } finally {\n            awaitExecutorTermination();\n        }\n    }\n\n    private void awaitExecutorTermination() {\n        executorService.shutdown();\n        try {\n            if (executorService.awaitTermination(\n                    GRACEFUL_SHUTDOWN_TIMEOUT_SECONDS, TimeUnit.SECONDS)) {\n                return;\n            }\n\n            log.warn(\"Kudu client executor did not terminate gracefully, forcing shutdown.\");\n            executorService.shutdownNow();\n            if (!executorService.awaitTermination(\n                    FORCED_SHUTDOWN_TIMEOUT_SECONDS, TimeUnit.SECONDS)) {\n                log.warn(\"Kudu client executor did not terminate after forced shutdown.\");\n            }\n        } catch (InterruptedException e) {\n            executorService.shutdownNow();\n            Thread.currentThread().interrupt();\n            log.warn(\"Interrupted while waiting for Kudu client executor to terminate.\", e);\n        }\n    }\n}\n","sourceCodeStart":56,"sourceCodeEnd":83,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-kudu/src/main/java/org/apache/seatunnel/connectors/seatunnel/kudu/kuduclient/KuduClientResource.java#L56-L83","documentation":"WARN logged by KuduClientResource.awaitExecutorTermination when the executor still has not terminated after shutdownNow() and the forced-shutdown wait — tasks ignored interruption; resources may leak but close() proceeds.","triggerScenarios":"close() → awaitExecutorTermination: shutdownNow() was issued but the second awaitTermination(FORCED_SHUTDOWN_TIMEOUT_SECONDS) still returns false, so this warning is logged.","commonSituations":"Threads blocked in non-interruptible I/O to unreachable Kudu masters/tablets; hung DNS resolution; native code or locks ignoring interrupts; leaked tasks holding resources.","solutions":["Capture a thread dump at shutdown to find the stuck threads and their stack traces","Check network reachability to Kudu masters/tablet servers from the task nodes","Fix or upgrade code performing blocking I/O on the executor (use timeouts at call sites)","If persistent, consider restarting the TaskManager/node to reclaim leaked threads"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Detect stuck I/O early: bound Kudu RPCs with timeouts\nKuduClient client = new KuduClient.KuduClientBuilder(master)\n    .defaultOperationTimeoutMs(30_000)\n    .defaultAdminOperationTimeoutMs(30_000)\n    .build();","typeGuard":null,"tryCatchPattern":"try {\n    executor.shutdownNow();\n    if (!executor.awaitTermination(FORCED_SECONDS, TimeUnit.SECONDS)) {\n        // threads are stuck ignoring interrupts: trigger thread-dump/alerting hook\n    }\n} catch (InterruptedException ie) {\n    executor.shutdownNow();\n    Thread.currentThread().interrupt();\n}","preventionTips":["Keep Kudu masters/tablet servers reachable — non-interruptible I/O is the main cause","Use operation timeouts on all Kudu calls so tasks can't block forever","Capture thread dumps when this warning fires to identify leaking code paths"],"tags":["kudu","shutdown","thread-leak"],"backgroundTag":"executor-shutdown-timeout","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}