apache/cassandra · error · RuntimeException
Exception occured while executing
Error message
Exception occured while executing %s
What it means
Variant of executeTask (without prePopulateSnapshots) that wraps any Throwable from task.call() into a RuntimeException 'Exception occured while executing <task>'. The real failure is always in the cause chain.
Solutions
- Read the 'Caused by' exception; fix the underlying issue it reports.
- Check disk space and permissions on data/snapshot directories for create failures.
- Re-run the specific snapshot command after remediation.
- For recurring scheduled failures, add cause-aware logging around executeTask callers.
Example fix
// before String msg = ex.getMessage(); // "Exception occured while executing ..." // after Throwable root = ex; while (root.getCause() != null) root = root.getCause(); log.error(root.getMessage());
Defensive patterns
Strategy: try-catch
Try / catch
try { result = executeTask(task); } catch (RuntimeException e) { Throwable root = e; while (root.getCause() != null) root = root.getCause(); log.error("Root cause: {}", root.getMessage()); } Prevention
- Unwrap cause chains when triaging snapshot failures
- Pre-check disk space and permissions before scheduled snapshot runs
- Add alerts on repeated snapshot task failures
When it happens
Trigger: Any AbstractSnapshotTask executed via this overload that throws — e.g. disk I/O failure while creating or clearing snapshots — is rethrown with this message.
Common situations: Snapshot creation/clearing invoked over JMX or scheduled (start, clearExpiredSnapshots) fails; the log shows this generic message instead of the root cause at top level.
Understand the failure class
Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.
Related errors
- Exception occured while executing
- Error while loading snapshots from
- can not take ephemeral snapshot
- Cannot snapshot until bootstrap completes
- Cannot take a snapshot on secondary index or invalid column…
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/727d073970c2e3ad.
Report an issue: GitHub.
Appendix: source
Thrown at src/java/org/apache/cassandra/service/snapshot/SnapshotManager.java:556
prePopulateSnapshots(task);
return task.call();
}
catch (Throwable t)
{
throw new RuntimeException(String.format("Exception occured while executing %s: %s", task.toString(), t.getMessage()), t);
}
}
@VisibleForTesting
<T> T executeTask(AbstractSnapshotTask<T> task)
{
try
{
return task.call();
}
catch (Throwable t)
{
throw new RuntimeException(String.format("Exception occured while executing %s", task.toString()), t);
}
}
/**
* Add table snapshots to snaphots cow list in advance in order to be sure that the snapshots to be created
* are not existing already. "executeTask" method can be invoked by multiple threads, and they hit
* this synchronized method which populates snapshots so next thread will fail to advance (exception is thrown)
* if table snapshots of some other tasks are already present in snapshots cow list.
*
* Added snapshots to snapshot list are at this point "incomplete", they will not appear in listing output
* until they are indeed taken and exist on disk, otherwise we would see "phantom" snapshots in listings,
* they would be present but in fact they are just going through the process of being taken.
*
* @param task task to process
*/
private synchronized void prePopulateSnapshots(TakeSnapshotTask task)
{
Map<ColumnFamilyStore, TableSnapshot> snapshotsToCreate = task.getSnapshotsToCreate();View on GitHub (pinned to 88fd0f6a0e)