Solved

Bus error in shared memory

Posted on 2008-06-13
4
873 Views
Last Modified: 2013-12-21
Hii
I am developing an application that uses posix shared memory to share some data between the different process.
It worked well for quite some days but then when i ran it again after a couple of days , it showed me bus error whenever i tried to fill the shared memory with data.
i wrote a number of different programs earlier for shared memory but i am not able to run a single program now and every program is giving the same bus error.
pls suggest some way to resolve this
0
Comment
Question by:parmarparveen
  • 2
  • 2
4 Comments
 
LVL 43

Expert Comment

by:ravenpl
ID: 21779935
bus error usually means broken memory/motherboard or the linux kernel.
bus error(the SIGBUS i assume) is reported when MMU reports some kind of error.
Test Your memory with http://memtest.org/ for the start
0
 

Author Comment

by:parmarparveen
ID: 21781104
The behaviour is very unpredictable. now one of my program which is allocating shared memory of size 1000 bytes is working fine while another program which is allocating 500000 bytes is giving the bus error . Is there any restriction on the size of shared memory??
0
 
LVL 43

Accepted Solution

by:
ravenpl earned 500 total points
ID: 21781374
Please test the memory, and replace kernel image first(update).
There are limits put on sizes of shared memory, but You should encounter SEGV not BUS.
Current limits can be found at /proc/sys/kernel/shm*
0
 

Author Comment

by:parmarparveen
ID: 21785262
The problem which i am facing is actully faced y other ppl too. It is because i am trying to mmap very large size of memory. The mmap is not returning  any error though but still whenevr i try to access the memory(read and write) after a specified no of bytes(4096),its giving bus error.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now