Questions tagged [sigbus]

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.

65 questions
41
votes
7 answers

Bus error vs Segmentation fault

Difference between a bus error and a segmentation fault? Can it happen that a program gives a seg fault and stops for the first time and for the second time it may give a bus error and exit ?
Thunderboltz
  • 1,597
  • 3
  • 14
  • 16
21
votes
9 answers

Debugging SIGBUS on x86 Linux

What can cause SIGBUS (bus error) on a generic x86 userland application in Linux? All of the discussion I've been able to find online is regarding memory alignment errors, which from what I understand doesn't really apply to x86. (My code is…
Josh Kelley
  • 56,064
  • 19
  • 146
  • 246
13
votes
2 answers

Android Fatal Signal 7 (SIGBUS)

I'm getting a few SIGBUS (7) and SIGSEGV (11) crashes that I am having difficult tracking down. The thread that appears to be causing the crash is primarily used for loading images to be displayed which makes sense since the logs indicate something…
Nyx
  • 2,233
  • 1
  • 12
  • 25
10
votes
1 answer

Apache crash report - is_closing_session(): no DBUS_SESSION_BUS_ADDRESS in environment

I've noticed that my system has been producing this crash report. I'm not sure of why and my knowledge of the inner goings of apache is limited. I'm not really sure what is causing this since nothing in particular has changed on the server. Any help…
Arman Jakupovic
  • 141
  • 2
  • 6
9
votes
2 answers

Why do I keep getting this SIGBUS error code on my MacOS when trying to run a JavaFx Project on Netbeans?

Whenever I try to run my JavaFX problem I encounter a MacOS error, My code runs fine on other devices so I am not sure what is wrong. Im using an M1 mac, with Java 17 and JavaFX up to the latest version. When running the JavaFX App, it opens up the…
Reqedd
  • 113
  • 6
8
votes
2 answers

Why does a read operation on a memory mapped zero byte file lead to SIGBUS?

Here is the example code I wrote. #include #include #include #include #include int main() { int fd; long pagesize; char *data; if ((fd = open("foo.txt", O_RDONLY)) == -1) { …
Lone Learner
  • 18,088
  • 20
  • 102
  • 200
8
votes
1 answer

What does "Misaligned address error" mean?

First of all — sorry for the specifics. I generally try to boil my SO questions to generic "class A" stuff with only relevant stuff, but I'm not sure what's the source of the problem here. I have a matrix class template that looks like this (only…
Max Yankov
  • 12,551
  • 12
  • 67
  • 135
6
votes
2 answers

Can I rule out that SIGBUS is raised by a "minor page fault"? (Kernel log has no allocation failure)

Motivation I am trying to improve my understanding of a SIGBUS error in Xwayland. This has been seen by several Fedora Linux users since around the 20th of February 2018, with Xwayland 1.19.6-5.fc27.x86_64 and Linux kernel…
sourcejedi
  • 3,051
  • 2
  • 24
  • 42
5
votes
1 answer

How to understand this crash? : SIGBUS BUS_ADRALN

Thats in the stack trace and i dont understand this error: 0 CoreFoundation 0x30f57648 ___CFBasicHashFindBucket_Linear_NoCollision + 92 1 CoreFoundation 0x30f59688 __CFBasicHashAddValue + 692 2 CoreFoundation 0x30eaff9f…
brush51
  • 5,691
  • 6
  • 39
  • 73
4
votes
4 answers

Structure assignment in Linux fails in ARM but succeeds in x86

I've noticed something really strange. say I've got the following structure defined typedef struct { uint32_t a; uint16_t b; uint32_t c; } foo; This structure is contained in a big buffer I receive from network. The following code works in…
stdcall
  • 27,613
  • 18
  • 81
  • 125
3
votes
2 answers

Non-existent physical address error with mmap

I'm trying to mmap a file, and it seems to succeed but when I access it, I get an SIGBUS error. Code: int main(int argc, char* argv[]) { int pid = getpid(); char cmd [1024]; int file; if (argc != 2) { printf("Wrong arguments\n"); return…
Jords
  • 1,855
  • 3
  • 18
  • 28
3
votes
1 answer

Swift 3 Protocol Oriented Programming results in random SIGBUS crashes

I am responsible of a complete Swift 3 application and one of the crashes that occurs regularly is a SIGBUS signal that I can't understand at all: Thread 0 Crashed: 0 libswiftCore.dylib 0x00000001009b4ac8 0x1007b8000 +2083528 1 LeadingBoards …
Dean
  • 1,512
  • 13
  • 28
3
votes
1 answer

Child process is not generating core ONLY for SIGBUS error and became Zombie process

My child process is trying to access an PCI address space. It works fine most of the times. But, sometimes the child process is going to zombie state. dmesg logs shows the following bus error. [ 501.134156] Caused by (from MCSR=10008): Bus - Read…
Siva Kumar
  • 183
  • 1
  • 2
  • 7
3
votes
2 answers

Does there exist a surefire, cross platform way to reproduce a SIGBUS?

This question is out of pure curiosity; personally I have seen this signal being raised, but only rarely so. I asked on the C chatroom whether there was a reliable way to reproduce it. And on this very room, user @Antti Haapala found one. At least…
fge
  • 119,121
  • 33
  • 254
  • 329
3
votes
0 answers

SIGBUS while doing memcpy from mmap ed buffer which is in RAM as identified by mincore

I am mmapping a block as: mapAddr = mmap((void*) 0, curMapSize, PROT_NONE, MAP_LOCKED|MAP_SHARED, fd, curMapOffset); if this does not fail (mapAddr != MAP_FAILED) I query mincore as: err = mincore((char*) mapAddr, pageSize, &mincoreRet); to find out…
Sameer Mahajan
  • 484
  • 1
  • 8
  • 27
1
2 3 4 5