Local rule-based diagnosis
When a failed job is finalized, rotari examines its scheduler error and output
locally and stores the result in that run's summary.json. It sends no log
content over the network, does not need an API key or model, and never reruns
the job.
The matcher ignores letter case, ANSI terminal color escapes, and repeated
whitespace. Error names, errno constants, and HTTP status codes must appear as
whole words, and status codes only in an HTTP or status context such as
HTTP/1.1 503, HTTPError: 503, status code 503, curl's returned error: 503,
or wget's ERROR 503:; numbers in URLs or file names do not match. Rules are deliberately narrow: no match means rotari has no
rule-based conclusion, not that the job has no diagnosable cause.
Each recognized diagnosis has a stable selector ID formed from its name as a
lowercase hyphenated slug (for example, cuda-gpu-memory-exhausted). The ID
is used by --filter-diagnosis; the display name remains the human-facing
label. Each recognized diagnosis cites the latest line that matches it as evidence.
Diagnoses are listed from the latest evidence to the earliest, so the first one
is usually closest to the failure; earlier entries may come from warnings the
job recovered from. The scheduler error is recorded after the job output and is
therefore listed first. The generic Python exception diagnosis is added only
when no more specific rule already matches the final exception line.
The memory rules (CUDA/GPU memory exhausted, Slurm memory limit exceeded,
LSF memory limit exceeded, Host memory exhausted, Runtime memory
exhausted, and Python memory error) also give the job the failure kind
oom, so --filter-failure-kind oom selects a job whose only sign of
running out of memory is its log. The kind is saved with the diagnosis, so
jobs diagnosed by an older rotari keep the kinds they had.
When nothing in the error or output is recognized, an exit code with a
conventional meaning gives the diagnosis instead, citing exit code N as its
evidence: 127 for a missing command, and 129, 132, 134, 135, 136, 137, 139, and
143 for a job that passed on a child's death by signal. These are listed in the
table below. A job can choose such a code itself, so treat the diagnosis as a
starting point. A cancelled job gets no diagnosis from its exit code.
A scheduler job whose wrapper could not record a status, as when its node
fails, has a result from scheduler accounting: its error is the sacct state,
such as node_fail, and a job ended by a signal records the code a shell would
report, 128+N, from Slurm's 0:N or PBS's 256+N.
This is a historical, informational snapshot; it does not affect job status,
retries, dependencies, or scheduler control. Every finalized failed job records
one of three outcomes in diagnosis_status: matched with its recognized
diagnoses, no_match, or unavailable with the reason in diagnosis_note
when its output cannot be read. When the output was read, last_output_line
keeps its last nonblank line, normally the end of stderr; failure summaries
show it as the example of a cause no rule recognized and rotari recorded no
error for.
The snapshot also records diagnosis_rules, an identifier of the rule set that
produced it. Saved results are not recomputed when rotari's rules change.
show, reports, and the Web UI note when a saved result came from earlier
rules. --filter-diagnosis always evaluates the current rules against the job's
error and output, so it can select a job whose saved result differs.
--filter-failure-cause instead reads the saved result, as failure summaries
do; see Filtering jobs and inspecting failures.
View saved diagnoses in the CLI with rotari show --run-id RUN_ID --job-id
JOB_ID. The Web UI always shows a Diagnosis button beside each job's log
button; it is enabled for finalized failed jobs with saved analysis and opens
the evidence and suggested next steps.
| Diagnosis | Recognized log signatures | Suggested next step |
|---|---|---|
| CUDA/GPU memory exhausted | cuda ... out of memory, torch.cuda.OutOfMemoryError, CUBLAS_STATUS_ALLOC_FAILED, CUDNN_STATUS_ALLOC_FAILED, cudaErrorMemoryAllocation, CUDA_ERROR_OUT_OF_MEMORY, TensorFlow OOM when allocating tensor, JAX RESOURCE_EXHAUSTED: Out of memory, MPS backend out of memory, HIP out of memory |
Reduce batch size or model memory use, select a GPU with more free memory, and check for competing GPU processes. |
| CUDA/GPU unavailable | no CUDA-capable device, insufficient/old NVIDIA driver messages, NVIDIA-SMI has failed, Failed to initialize NVML, CUDA_ERROR_INSUFFICIENT_DRIVER, CUDA_ERROR_SYSTEM_DRIVER_MISMATCH |
Confirm a usable GPU is assigned and the NVIDIA driver and CUDA runtime are compatible. |
| CUDA illegal memory access | CUDA illegal memory access and cudaErrorIllegalAddress/CUDA_ERROR_ILLEGAL_ADDRESS |
Check kernel indexing, tensor bounds, and memory lifetime; use CUDA memory-checking tools and synchronous error reporting to locate the failing operation. |
| CUDA kernel launch/configuration error | CUDA invalid configuration argument, too many resources requested for launch, cudaErrorInvalidConfiguration, cudaErrorLaunchOutOfResources |
Check kernel grid/block dimensions, per-block resource use, and device launch limits. |
| CUDA kernel image/device incompatibility | no kernel image is available for execution on the device, CUDA_ERROR_NO_BINARY_FOR_GPU |
Use a CUDA build that includes code for the assigned GPU architecture, or run on a supported GPU. |
| CUDA device selection/configuration error | CUDA invalid device ordinal, PyTorch mixed-device error mentioning cuda: |
Check the requested GPU index against devices visible to the job and keep tensors and operations on compatible devices. |
| CUDA peer-to-peer access unavailable | CUDA peer access is not supported between these two devices, cudaErrorPeerAccessUnsupported |
Check GPU topology and peer-to-peer capabilities; place communicating work on compatible devices or use another communication path. |
| Docker daemon unavailable | Cannot connect to the Docker daemon, Is the docker daemon running?, Docker socket connection errors |
Check that Docker is available on the execution host, that the daemon is running, and that the job account can access its socket; on managed clusters, use the site's supported container runtime. |
| Container image unavailable or pull failed | Docker pull access denied, manifest unknown, no matching manifest, image-pull failures; Apptainer/Singularity While pulling ... image or Unable to handle docker:// |
Check image URI, tag and target architecture, registry availability and authentication; on restricted compute nodes, pull or cache the image before the job starts. |
| Container creation or mount failed | OCI runtime create failed, failed to create shim task, error during container init, container creation failed, mount-hook or mount failures |
Check the container runtime and bind-mount source paths, permissions and options; confirm the host or cluster permits the requested mounts. |
| Container GPU runtime unavailable | Docker could not select device driver ... with capabilities: [[gpu]], nvidia-container-cli initialization/requirement errors, NVML driver not loaded |
Check host NVIDIA driver/GPU health and NVIDIA Container Toolkit/runtime compatibility; verify the job's GPU request and visible devices. |
| Slurm memory limit exceeded | slurmstepd: error: Detected ... oom-kill, exceeded job memory limit, State=OUT_OF_MEMORY, srun: error: ...: Out Of Memory, the recorded state out_of_memory |
Request more Slurm memory if permitted or reduce memory use; inspect sacct for state and peak memory. |
| Job timeout reached | rotari's own --timeout stop: the job log line rotari: job timed out after DURATION or the recorded error timed out after DURATION |
Raise the timeout with change --timeout if the job needs longer, or find why it was slower than expected, such as waiting on input or a hung process. |
| Slurm time limit exceeded | Slurm messages containing time limit, CANCELLED ... DUE TO TIME LIMIT, State=TIME_LIMIT, the recorded state deadline |
Increase the Slurm time limit if permitted, or reduce runtime and checkpoint before allocation expiry. |
| Slurm node failure | State=NODE_FAIL, State=BOOT_FAIL, DUE TO NODE FAILURE, the recorded states node_fail and boot_fail |
Treat the allocated node as unhealthy: inspect sacct and scheduler node state, report repeated failures to the cluster administrator, and retry on another node. |
| PBS resource or walltime limit exceeded | walltime ... exceeded, exceeded ... walltime, job exceeded ... resource limit, PBS: job killed: ... exceeded limit |
Increase the requested PBS walltime or resource limit if permitted, or reduce runtime and resource use. |
| LSF memory limit exceeded | TERM_MEMLIMIT, TERM_SWAP |
Increase the LSF memory limit if permitted, or reduce memory use. |
| LSF run time limit exceeded | TERM_RUNLIMIT, TERM_CPULIMIT |
Increase the LSF run or CPU time limit if permitted, or reduce runtime and checkpoint. |
| SGE resource limit exceeded | qmaster enforced h_rt, h_cpu, or h_vmem limit, exceeds job hard limit |
Increase the requested SGE runtime or memory limit, such as h_rt or h_vmem, if permitted, or reduce runtime and memory use; inspect qacct for the job. |
| Scheduler submission failed | sbatch: error:, srun/salloc allocation, step, and submit failures, scheduler-error forms of qsub: / bsub:, SGE Unable to run job: |
Check the scheduler command, account/project, partition/queue, requested resources, and submission permissions. |
| Invalid scheduler resource request | Invalid qos specification, Invalid partition, invalid account, invalid generic resource, PBS/LSF invalid-resource messages |
Check partition/queue, account, QOS, GPU/resource names, and requested limits. |
| Scheduler cancelled job | Slurm CANCELLED state or slurmstepd ... cancelled, PBS job-deletion messages, LSF TERM_OWNER, TERM_ADMIN, TERM_PREEMPT, the recorded state preempted |
Inspect scheduler accounting for the cancellation reason and actor; resolve policy, preemption, dependency, or administrator-cancellation conditions before retrying. |
| Host memory exhausted | out of memory: kill process, oom-kill, memory cgroup out of memory, Killed process ... out of memory |
Request more host memory or reduce use; inspect scheduler memory limits and kernel OOM messages. |
| JavaScript runtime error | TypeError: Cannot read properties of undefined/null, TypeError: ... is not a function, SyntaxError: Unexpected token, ReferenceError: ... is not defined |
Inspect the JavaScript stack trace and the failing value or input; check for undefined values and malformed JSON or source. |
| Runtime memory exhausted | JVM OutOfMemoryError, Go fatal error: out of memory, Node.js JavaScript-heap exhaustion, Rust allocation failure, Cannot allocate memory, ENOMEM, std::bad_alloc, PyTorch DefaultCPUAllocator |
Reduce application memory use or concurrency, and request a larger memory limit if permitted. |
| Stack overflow | JVM StackOverflowError, Node.js Maximum call stack size exceeded, Go fatal error: stack overflow |
Inspect recursive calls and stack usage; fix unintended recursion or reduce stack-heavy work before retrying. |
| Process killed | A log line consisting of Killed or Killed PID, a shell report such as line 1: PID Killed COMMAND or [1]+ Killed COMMAND, or exit code 137 |
Inspect scheduler accounting and host logs; SIGKILL can be OOM, a scheduler limit, or explicit cancellation. |
| Process terminated by signal | Exit code 129 or 143 and no recognized output; a Terminated line alone does not match, because the shell also prints it when rotari stops a job |
A signal asked the process to stop, usually preemption, a cancel, a host shutdown, or a closed session; inspect scheduler accounting and host logs for the sender. |
| Kernel panic or kernel fault | kernel panic, BUG: unable to handle kernel, Oops: NNNN, general protection fault, watchdog hard/soft lockup, RCU stall |
Treat the compute node as unhealthy: inspect kernel logs and scheduler node health, report it to the cluster administrator, and retry on another node if appropriate. |
| Application panic | A log line beginning panic: or Rust thread ... panicked at ... |
Inspect the application stack trace and failing invariant; fix the application error before retrying. |
| Unhandled application exception | JVM Exception in thread ..., Node.js UncaughtException/UnhandledPromiseRejection, C++ terminate called after throwing an instance of ... |
Inspect the runtime's exception or rejection details and stack trace; handle the failure or fix the application before retrying. |
| Application dependency or module missing | Go missing-module messages, JVM ClassNotFoundException/NoClassDefFoundError, Node.js Cannot find module, Rust undeclared crate/module, npm ERESOLVE/E404/ETARGET |
Check that the required package, crate, class, or module is declared, installed, and available on the runtime or build search path. |
| Segmentation fault | segmentation fault, SIGSEGV, signal 11, or exit code 139 |
Inspect native extensions, shared-library and driver compatibility, and a core dump or debugger backtrace if available. |
| Process aborted | A log line consisting of Aborted or Aborted (core dumped), a shell report such as line 1: PID Aborted COMMAND, Fatal Python error: Aborted, SIGABRT, or exit code 134 |
The process ended itself, usually after a failed assertion, an uncaught exception, or detected memory corruption; inspect the lines before it and a core dump or debugger backtrace. |
| Native heap or stack corruption | double free or corruption, glibc free():/malloc():/realloc():/munmap_chunk(): errors, corrupted size vs. prev_size, stack smashing detected |
Inspect native code and extensions for out-of-bounds writes or invalid frees; rerun under Valgrind or AddressSanitizer, and check shared-library compatibility. |
| Bus error | A log line consisting of Bus error or Bus error (core dumped), a shell report such as line 1: PID Bus error COMMAND, SIGBUS, or exit code 135 |
Check for a truncated or removed memory-mapped file, exhausted /dev/shm, and network-filesystem health. |
| Illegal instruction | illegal instruction, SIGILL, or exit code 132 |
The binary likely uses CPU features the host lacks, such as AVX; use a build for this CPU or constrain the job to compatible hosts. |
| Floating point exception | floating point exception, SIGFPE, or exit code 136 |
Check native code for integer division by zero or overflow, and for empty or zero-sized inputs that reach a division. |
| NVIDIA GPU driver/device error | NVRM: Xid, GPU has fallen off the bus, uncorrectable ECC errors |
Inspect GPU/node health and NVIDIA kernel logs; retry on another GPU/node if appropriate. |
| CUDA device-side assert | device-side assert triggered |
Check tensor shapes, labels, and index ranges passed to CUDA kernels; rerun with synchronous CUDA error reporting if needed. |
| Shared memory or data loader failure | insufficient shared memory, PyTorch DataLoader worker ... is killed by signal or ... exited unexpectedly |
Check /dev/shm capacity on the host, enlarge the container's shared memory, such as docker run --shm-size, or reduce DataLoader num_workers, batch size, or prefetching; also check the job's memory limit. |
| Distributed training worker failed | PyTorch ChildFailedError, DistBackendError |
This only reports that a worker failed: find the first failing rank's own error in the log, then fix that error before retrying. |
| NCCL failure | NCCL error, NCCL WARN lines that report an error, failure, abort, or timeout, NCCL ... unhandled system error |
Check GPU/node connectivity, NCCL configuration, network-interface selection, and distributed-rank consistency. |
| MPI runtime failure | MPI_ABORT, PMI errors, mpirun/mpiexec fatal/error/abort messages |
Check MPI/runtime compatibility, ranks, host allocation, and launcher configuration. |
| Disk space or quota exhausted | no space left on device, disk quota exceeded |
Free space or files, or use a filesystem with sufficient capacity and quota. |
| Storage device I/O error | input/output error, EIO, blk_update_request, Buffer I/O error, I/O error, dev |
Inspect kernel and storage-service logs, then check the affected disk or network filesystem with the storage administrator before retrying writes. |
| Read-only filesystem | read-only file system, EROFS |
Check mount state and write location; use a writable filesystem. |
| Network filesystem or mount disconnected | stale file handle, ESTALE, transport endpoint is not connected, nfs: server ... not responding |
Check the NFS or FUSE mount on the execution host and whether files were replaced from another host; remount or retry on another node, and report repeated failures to the storage administrator. |
| File or directory not found | no such file or directory other than a compiler's missing header, FileNotFoundError, ENOENT |
Check the path, working directory, mounted filesystems, and whether an earlier job produced the required file. |
| Permission denied | permission denied, EACCES |
Check ownership, file and directory permissions, mount options, and the account used by the job. |
| Shell syntax error | Shell syntax error near unexpected token, syntax error: ... unexpected, unterminated-quote unexpected EOF |
Check the reported script line and nearby quoting, delimiters, conditionals, and command substitutions; run the script through the intended shell's syntax checker. |
| Shell unset variable under nounset | unbound variable, parameter not set (commonly with set -u) |
Check that the variable is initialized or exported before use; for optional values, use a default expansion such as ${VAR-} or ${VAR:-default}. |
| Command or executable not found | command not found, executable file not found, the shell's exec: COMMAND: not found, or exit code 127 |
Check the command spelling and PATH, or use an absolute path and ensure the executable is installed on the execution host. |
| Executable incompatible with host | Exec format error, cannot execute binary file, ENOEXEC |
The file is for another CPU architecture or OS, or is not a program; check it with file and uname -m, and use a build or container image for this host, or constrain the job to compatible hosts. |
| Source compilation or build failed | C, C++, Fortran, Go, Java, and Rust compiler errors with a source location or error code, make: *** No rule to make target, CMake Error; not make's *** [target] Error N, which any failing recipe prints |
Inspect the first compiler error in the log, since later ones often follow from it, then fix the source or install the missing headers and packages on the execution host. |
| Native linking failed | undefined reference to, ld: cannot find, multiple definition of, linker-command failure |
Check linker inputs, library search paths, and library names; ensure required symbols and libraries are available and compatible. |
| Shared library or ABI mismatch | undefined symbol, symbol lookup error, missing GLIBC_*/GLIBCXX_*/CXXABI_*, cannot open shared object file, wrong ELF class |
Check ldd, LD_LIBRARY_PATH, and loaded .so files; align compiler, libstdc++, CUDA, and Python-extension ABI versions with the runtime host. |
| Python import or module missing | ModuleNotFoundError, ImportError, cannot import name |
Check the Python environment, PYTHONPATH, package installation, and version compatibility. |
| Python dependency or version conflict | requires ... but ... is installed, dependency-resolver conflicts, incompatible-version messages, pip's Could not find a version and No matching distribution, except on warning lines |
Check package versions and the environment lockfile or requirements, then install a compatible set. |
| Conda environment or package unavailable | PackagesNotFoundError, ResolvePackageNotFound, UnsatisfiableError, EnvironmentNameNotFound, EnvironmentLocationNotFound, Could not find conda environment |
Check the environment name and that the job's host can see it with conda env list; check the package name, channels, and platform; create the environment before submitting. |
| Environment module unavailable | Lmod has detected the following error, Unable to locate a modulefile for |
Check the module name and version with module avail on the execution host, and any module use paths the job needs. |
| Python syntax or indentation error | SyntaxError other than the JavaScript form above, IndentationError, TabError |
Inspect the reported source line for invalid syntax, indentation, tabs, or an incompatible Python language feature. |
| Python missing name or attribute | NameError, UnboundLocalError, AttributeError |
Check spelling, imports, object types, and variable initialization along the failing code path. |
| Python type or value error | TypeError other than the JavaScript forms above, ValueError |
Check function arguments, input shapes and formats, and conversions at the reported traceback location. |
| Python key or index error | KeyError, IndexError |
Validate dictionary keys, list or array bounds, and assumptions about input or intermediate data. |
| Python assertion failed | AssertionError |
Inspect the failed assertion and the input or invariant it checks; preserve relevant values in the job log if needed. |
| Python memory error | MemoryError, NumPy _ArrayMemoryError |
Reduce in-memory data or worker concurrency, stream or batch input, and confirm the scheduler memory limit is sufficient. |
| Python recursion limit exceeded | RecursionError, maximum recursion depth exceeded |
Check for unintended recursion or cycles; rewrite iteratively or adjust recursion depth only when safe. |
| Python exception | A traceback followed by a final ...Error: or ...Exception: line that no more specific rule matches |
Save the final exception line as evidence; inspect the traceback for the failing call. |
| File descriptor limit exceeded | too many open files, EMFILE |
Check file descriptor limits and close leaked descriptors; inspect ulimit -n. |
| Process or thread limit exceeded | fork: retry, fork ... resource temporarily unavailable, thread/process EAGAIN |
Check process/thread limits, then reduce worker count or request a suitable scheduler limit. |
| DNS lookup failed | temporary failure in name resolution, could not resolve host, no such host, name or service not known, nodename nor servname provided, getaddrinfo failed/ENOTFOUND |
Check the hostname, DNS resolver configuration, and compute-node DNS access. |
| Network unreachable | no route to host, network is unreachable, EHOSTUNREACH, ENETUNREACH |
Check the compute node's route to the destination, its network interfaces and firewall rules, and whether outbound access requires a proxy. |
| Network port already in use | address already in use, EADDRINUSE |
Find what holds the port with ss or lsof, stop it, or pick a free port; for concurrent jobs on one host, give each its own port, such as MASTER_PORT for distributed training. |
| Network connection refused | connection refused, ECONNREFUSED |
Check the destination host and port, service availability, and firewall rules. |
| Network connection timed out | connection timed out, i/o timeout, ETIMEDOUT |
Check routing, firewall rules, VPN or proxy requirements, and destination load. |
| Network connection reset or closed | connection reset by peer, ECONNRESET, broken pipe, unexpected EOF other than tar's Unexpected EOF in archive, SSH Connection closed by ADDRESS port PORT, kex_exchange_identification: ... Connection closed |
Inspect remote-service restarts or crashes and proxy/load-balancer timeouts. |
| TLS certificate or handshake failure | certificate verify failed, x509: certificate, tls handshake timeout |
Check the system clock, certificate chain, CA configuration, and TLS-intercepting proxies. |
| HTTP authentication or authorization failed | HTTP or status-code context for 401/403, 401 Unauthorized, 403 Forbidden |
Check credentials, access tokens, scopes, and the target service's authorization policy. |
| HTTP resource not found | HTTP or status-code context for 404, 404 Not Found |
Check the URL, including its version, file name, and spelling, and that the resource still exists; some services also answer 404 when a token lacks access. |
| HTTP bad request | HTTP or status-code context for 400, 400 Bad Request |
Check the request's parameters, headers, and body against the service's API, and read the response body for the reason. |
| HTTP rate limited | HTTP or status-code context for 429, 429 Too Many Requests, rate limit exceeded |
Wait or apply exponential backoff, reduce request concurrency, and check quota or rate-limit policy. |
| HTTP service unavailable | HTTP or status-code context for 503, 503 Service Unavailable, upstream unavailable |
Retry after a delay; if it persists, check service health, maintenance notices, and proxy/load-balancer upstreams. |
| HTTP server or bad gateway error | HTTP or status-code context for 500/502, 500 Internal Server Error, 502 Bad Gateway |
Retry transient requests and inspect target-service and proxy/load-balancer logs for the upstream failure. |
| HTTP gateway timeout | HTTP or status-code context for 504, 504 Gateway Timeout |
Check target-service latency and proxy timeout settings; retry with backoff when safe. |
| Git repository unavailable or authentication failed | fatal: repository ... does not exist/not found, fatal: not a git repository, fatal: Authentication failed for, fatal: could not read Username/Password for, fatal: Could not read from remote repository |
Check the repository path or URL and the credentials the job uses; compute nodes have no terminal for prompts, so configure a credential helper, token, or SSH key, and run the command inside a clone. |
| SSH authentication or host verification failed | permission denied (publickey), host key verification failed |
Check SSH keys and permissions, known_hosts, and server access controls. |