The SIGBUS signal is sent to a process when it causes a bus error. The conditions that lead to the signal being raised are, for example, incorrect memory access alignment or non-existent physical address.
Questions tagged [sigbus]
65 questions
3
votes
2 answers
ARM Linux: bus error on one particular page of valid virtual memory
I'm working on an embedded ARM Linux system, and occasionally (but not always) I get a bus error in my app when the page at virtual address 0x2b200000 is accessed. Depending on whether the compiler/linker put code or data at that address, I either…

gimmeamilk
- 2,016
- 5
- 24
- 36
2
votes
1 answer
(Apple Silicon) (M1) Inexplicable SIGBUS crash
In some native M1 code I'm working on, calling a particular function raises a SIGBUS fault that makes no sense:
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000280dc7da0
Exception Codes: …

BitCortex
- 3,328
- 1
- 15
- 19
2
votes
0 answers
SIGBUS error code=0x2 while running go test on CI
I'm not sure what could be the best way to explain this but we constantly observe our CI failing because of this SIGBUS issue. The error looks all
internal to Go and we are clueless.
We have run the test cases multiple times on our local boxes in an…

Noobie
- 461
- 1
- 12
- 34
2
votes
1 answer
A possible cause of Bus Error: Nonexistent physical address
This is not a question, but rather an answer for a question I couldn't find here before.
I had an application that kept crashing with the message 'Bus error'. This happened non-deterministically in different parts of my code, usually after a long…

Roman Manevich
- 21
- 1
- 3
2
votes
1 answer
Can invalid Read/Write cause SIGBUS Error?
EDIT 1: Platform is x86_64 for the sample program.
EDIT 2: I am editing this for better understanding. Below are two different questions. First question is can invalid read/write cause SIGBUS? and second question is Will Valgrind be useful for…

CodeWarrior101
- 113
- 9
2
votes
1 answer
Valid read from mmap-ed memory produces SIGBUS under load. Why?
I have a program that copies buffers to files, mmap's them back and then checks their contents. Multiple threads can work on the same file. Occasionally, I am getting SIGBUS when reading, but only under load.
The mappings are MAP_PRIVATE and…

bking
- 275
- 2
- 11
2
votes
0 answers
Handle SIGBUS ERROR ANDROID
I am running a piece of code on android where I am getting the following error in the logcat.
A/libc(18317): Fatal signal 7 (SIGBUS), code 1, fault addr 0x5 in tid 18317 (com.test.1234)
I want to catch or resolve this error.

darshan kodkany
- 51
- 1
- 1
- 8
2
votes
0 answers
R ffdfappend SIGBUS error
I have an R script which uses the ffbase and ff packages. In Windows the script runs fine. In Linux (different box, higher RAM though) it crashes with a bus (SIGBUS) error.
Windows (Version 6.1.7601) session info:
R version 3.1.0…
user444628
2
votes
2 answers
mmap Bus Error writing to MAP_SHARED file over 2Gb
I am trying to create a memory mapped file using MAP_SHARED. I run into issues when the file size reaches 2gb. The code pasted below is what I am using (as a test).
#include
#include
#include
#include…

Praveen Madhav
- 23
- 5
2
votes
1 answer
NSKeyedUnarchiver SIGBUS BUS_ADRALN crash
I unarchive data in a NSFileWrapper with the following method which usually works very well:
- (id)decodeObjectFromWrapperWithPreferredFilename:(NSString *)p {
NSFileWrapper *wrapper = [self.fileWrapper.fileWrappers objectForKey:p];
if…

n.evermind
- 11,944
- 19
- 78
- 122
1
vote
1 answer
What is causing a SIGBUS?
We get a SIGBUS (BUS_ADRALN) and it points to this thread. What is causing this error? Line 68 is either NSString *dateString = [dateFormat stringFromDate:currentTimestamp]; or [dateFormat release];
NSDate *currentTimestamp =…

tjg184
- 4,508
- 1
- 27
- 54
1
vote
1 answer
nanosleep() syscall waking up with bus error?
I'm looking at a core dump from an embedded MIPS Linux app. GDB is reporting SIGBUS, and the thread handling the signal appears to be sat in a syscall for nanosleep - the higher level code basically called sleep(verylongtime);
Assuming another…

gimmeamilk
- 2,016
- 5
- 24
- 36
1
vote
0 answers
Trying to get a more verbose message for "Bus Error" kernel
I'm struggling with a python program, deployed on a Raspberry Pi, that uses tshark to monitor network traffic dumping the result on a separate file on a mounted SSD external disk.
I've tried almost every configuration possible:
writing the output…

David Martin
- 47
- 6
1
vote
3 answers
What is wrong with my code? I get a "Bus Error"
I'm trying to read a file containing raw audio and encode it using FLAC. When I run the program, I get a "Bus Error". What could be wrong?
I'm compiling on OS X 10.6.8 using the following line:
gcc nsFlacEncoder.c -I/opt/local/include -lflac -m32…

qweert
- 51
- 1
- 5
1
vote
0 answers
Bus error from x86_64 assembly anonymous function
I am writing a Lisp compiler that targets x86_64. My current goal is to implement the special form lambda. I recently discovered that you can take the address of a label, store it in a register, and call it from that:
lea rax, [f + rip]
call…

Caspian Ahlberg
- 934
- 10
- 19