I've got an application which runs for several hours in the same loop
correctly and then exits with SIGBUS.
If I try to start the application again it immediately exits with SIGBUS and
will not work until rebooted.
If I reboot the system it runs for several hours again.
gdb reports
Program received signal SIGBUS, Bus error.
0x401bd354 in memcpy () from /lib/libc.so.6
(gdb) bt
#0 0x401bd354 in memcpy () from /lib/libc.so.6
#1 0x0000929c in capture_file_write ()
#2 0x0fefeb0a in ?? ()
#3 0x0fefeb0a in ?? ()
Any ideas on what causes this error?
How do I go about finding what #2 and #3 are?
This is the application flow:
count = 0 # this is %d
do
outfile = /dev/shm/output.%d.dat
data = read logged.dat for 512kb
unlink outfile if exists
truncate outfile to 512kb
outfile_p = mmap outfile
memcpy data outfile_p
count += 1
if count > MAX; count = 0
advance or rewind logged.dat
loop
AJ ONeal