Solved

Bus error in shared memory

Posted on 2008-06-13
4
894 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Powershell Timeout - Exchange 3 123
Check for Linux process in script 7 90
Uniden UDW20055 3 122
[bash] test if filenames  are same 2 14
Background Still having to process all these year-end "csv" files received from all these sources (including Government entities), sometimes we have the need to examine the contents due to data error, etc... As a "Unix" shop, our only readily …
Arrow Electronics was searching for a KVM  (Keyboard/Video/Mouse) switch that could display on one single monitor the current status of all units being tested on the rack.
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…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

752 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