apache/cassandra · warning · IllegalStateException

Async-profiler experience likely affected. Kernel symbols ar

Error message

Async-profiler experience likely affected. Kernel symbols are unavailable due to restrictions. Try 'sysctl kernel.perf_event_paranoid=1' and 'sysctl kernel.kptr_restrict=0' or its variation on your system to resolve the issue.

What it means

StartupChecks verifies kernel perf_event settings (perf_event_paranoid, kptr_restrict) when Async-profiler-based monitoring is available. If the kernel restricts access to kernel symbols or low-privilege profiling, Async-profiler cannot resolve kernel stack frames, so Cassandra throws IllegalStateException (or logs a warning) at startup to signal the profiling experience will be degraded.

Source

Thrown at src/java/org/apache/cassandra/service/StartupChecks.java:1166

        {
            try
            {
                if (!CassandraRelevantProperties.ASYNC_PROFILER_ENABLED.getBoolean())
                    return;

                int perfEventParanoid = readPerfEventParanoid();
                int kptrRestrict = readKptrRestrict();

                if (perfEventParanoid == Integer.MIN_VALUE || kptrRestrict == Integer.MIN_VALUE)
                {
                    logger.debug("Unable to determine values for kernel parameter of " +
                                 "'kernel.perf_event_paranoid' and 'kernel.kptr_restrict' for Async-profiler. " +
                                 "Its usability might be limited.");
                }
                else if (perfEventParanoid > 1 || kptrRestrict != 0)
                {
                    if (shouldThrow)
                        throw new IllegalStateException(MESSAGE);
                    else
                        logger.warn(MESSAGE);
                }
            }
            catch (Throwable t)
            {
                if (shouldThrow)
                    throw t;
            }
        }

        @Override
        public void execute(StartupChecksConfiguration configuration)
        {
            execute(configuration, false);
        }
    }

View on GitHub (pinned to 88fd0f6a0e)

Solutions

  1. Set kernel.perf_event_paranoid=1: sysctl -w kernel.perf_event_paranoid=1 (persist in /etc/sysctl.conf or /etc/sysctl.d/).
  2. Set kernel.kptr_restrict=0: sysctl -w kernel.kptr_restrict=0 (or 1 with CAP_SYSLOG).
  3. Run the Cassandra process with elevated profiling privileges (CAP_SYS_ADMIN / CAP_PERFMON) if sysctls cannot be changed.
  4. If profiling is not needed, keep the warning level (don't force the check to throw) and accept reduced profiler fidelity.

Example fix

// before (host kernel settings)
kernel.perf_event_paranoid = 3
kernel.kptr_restrict = 2
// after
kernel.perf_event_paranoid = 1
kernel.kptr_restrict = 0
Defensive patterns

Strategy: validation

Validate before calling

// host-side pre-check before starting Cassandra
long paranoid = Long.parseLong(Files.readAllLines(Paths.get("/proc/sys/kernel/perf_event_paranoid")).get(0).trim());
long kptr = Long.parseLong(Files.readAllLines(Paths.get("/proc/sys/kernel/kptr_restrict")).get(0).trim());
if (paranoid > 1 || kptr != 0) System.out.println("Fix sysctls: perf_event_paranoid<=1, kptr_restrict=0");

Prevention

When it happens

Trigger: Node startup with Async-profiler enabled on a Linux host where perf_event_paranoid > 1 or /proc/sys/kernel/kptr_restrict != 0, i.e. the kernel blocks unprivileged kernel-level profiling and symbol resolution.

Common situations: Running Cassandra in default-hardened containers or distros where kptr_restrict=2 and perf_event_paranoid=2/3/4; running as non-root without CAP_PERFMON; newer kernels that raised the default paranoid level.

Understand the failure class

Background: "unsupported platform" / "not supported on this platform" errors: what they mean and how to fix them — this error's family across 47 libraries.

Related errors


AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10). Data as JSON: /api/errors/c0ac4cfb7770c25b. Report an issue: GitHub.