{"record":{"id":"37cd2c088093710a","repo":"apache/cassandra","slug":"failed-to-run-startup-check-post-action-on","errorCode":null,"errorMessage":"Failed to run startup check post-action on ","messagePattern":"Failed to run startup check post-action on ","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/java/org/apache/cassandra/service/StartupChecks.java","lineNumber":238,"sourceCode":"     * Run the configured tests and return a report detailing the results.\n     * @throws StartupException if any test determines that the\n     * system is not in an valid state to startup\n     * @param options options to pass to respective checks for their configration\n     */\n    public void verify(StartupChecksConfiguration options) throws StartupException\n    {\n        for (StartupCheck test : preFlightChecks)\n            test.execute(options);\n\n        for (StartupCheck test : preFlightChecks)\n        {\n            try\n            {\n                test.postAction(options);\n            }\n            catch (Throwable t)\n            {\n                logger.warn(\"Failed to run startup check post-action on \" + test.name());\n            }\n        }\n    }\n\n    // https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1057843\n    public static final StartupCheck checkKernelBug1057843 = new StartupCheck()\n    {\n        @Override\n        public String name()\n        {\n            return \"kernel_bug_1057843\";\n        }\n\n        @Override\n        public void execute(StartupChecksConfiguration configuration) throws StartupException\n        {\n            if (configuration.isDisabled(name()))\n                return;","sourceCodeStart":220,"sourceCodeEnd":256,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/service/StartupChecks.java#L220-L256","documentation":"A WARN log (not an exception) from StartupChecks.verify (the post-action pass). After all startup checks pass, each check's postAction(options) is run; if any postAction throws a Throwable, Cassandra catches it and logs 'Failed to run startup check post-action on <check name>' and continues startup. The thrown cause is intentionally swallowed here, so the log gives only the check name, not the underlying error.","triggerScenarios":"Any StartupCheck registered with verifySuccess whose postAction(StartupChecks.Options) throws (e.g. a check mutating JVM options or applying a fix-up fails at runtime) during StartupChecks.verify() at node startup.","commonSituations":"OS/JVM environments where a check's post-action side effect fails (e.g. setting rlimits, applying kernel-bug workarounds); misconfigured options passed to startup checks; partially provisioned containers where post-action commands fail.","solutions":["Identify the check by its name in the log message and reproduce its postAction failure manually","Fix the underlying environment/config the post-action depends on (permissions, options, OS settings)","If startup still succeeds but the check's effect is required, treat this as a real failure: file/investigate the swallowed Throwable by running the check with debug logging or under a debugger"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Verify startup-check post-actions succeed in a pre-flight run\nfor (StartupCheck check : StartupChecks.getStartupChecks()) {\n    try { check.postAction(options); }\n    catch (Throwable t) { System.err.println(\"Pre-flight post-action failed on \" + check.name() + \": \" + t); }\n}","typeGuard":null,"tryCatchPattern":"try {\n    checks.verify(options);\n} catch (Throwable t) {\n    // startup itself failed; but note post-action failures only WARN and swallow the cause\n    logger.error(\"Startup checks failed\", t);\n}","preventionTips":["Watch for this log line post-upgrade; the cause is swallowed, so reproduce the postAction manually","Keep OS permissions and options the post-actions depend on consistent across environments","Add the failing check name to your runbook and run startup checks in CI-like pre-flight"],"tags":["startup-checks","swallowed-exception","post-action","logging"],"backgroundTag":"internal-invariant-violation","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}