# What does it mean when I get a “Bus Error” in my job?

**URL:** <https://ask.cyberinfrastructure.org/t/what-does-it-mean-when-i-get-a-bus-error-in-my-job/1101>\
**Category:** Yale\
**Tags:** memory\
**Created:** [October 23, 2019, 3:23pm UTC](https://ask.cyberinfrastructure.org/t/what-does-it-mean-when-i-get-a-bus-error-in-my-job/1101 "2019-10-23T15:23:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kaylea](https://ask.cyberinfrastructure.org/letter_avatar_proxy/v4/letter/k/858c86/32.png) [@kaylea](https://ask.cyberinfrastructure.org/u/kaylea)\
**Post date:** [October 23, 2019, 3:23pm UTC](https://ask.cyberinfrastructure.org/t/what-does-it-mean-when-i-get-a-bus-error-in-my-job/1101/1 "2019-10-23T15:23:25Z")

</div>

My job recently failed and the error log says “Bus Error”. What happened and how do I fix the issue?

---

<div class="post-metadata">

**Author:** ![brevans](https://ask.cyberinfrastructure.org/user_avatar/ask.cyberinfrastructure.org/brevans/32/332_2.png) [@brevans](https://ask.cyberinfrastructure.org/u/brevans)\
**Post date:** [October 23, 2019, 5:29pm UTC](https://ask.cyberinfrastructure.org/t/what-does-it-mean-when-i-get-a-bus-error-in-my-job/1101/2 "2019-10-23T17:29:38Z")

</div>

On the Yale clusters, a bus error usually means your job ran out of memory (RAM). If you cannot reduce the memory usage of your code, you can request additional memory for your job using the `--mem-per-cpu` or `--mem` Slurm flags:

[https://docs.ycrc.yale.edu/clusters-at-yale/job-scheduling/#directives](https://docs.ycrc.yale.edu/clusters-at-yale/job-scheduling/#directives)

More details: Your program can run into this fault because of the way we manage memory with [cgroups](https://en.wikipedia.org/wiki/Cgroups) so that many jobs can be run on the same physical machine without interfering with one another. If a process inside a job tries to access memory “outside” what was allocated to that job, _e.g._ more than what you requested, the operating system tells your program that address is invalid with the fault Bus Error, aka SIGBUS, exit(10). A similar fault you might be more familiar with is a Segmentation Fault, aka SIGSEGV, exit(11) which usually results from a program incorrectly trying to access a valid memory address.
