1820879 Members
5127 Online
109628 Solutions
New Discussion юеВ

Bus error: core dump

 
Saso Kavcic
New Member

Bus error: core dump

I am working on a program which I have
successfully compiled but now have a problem with. The problem is that it crashes immediately. It receives a SIGBUS and then cores. When debugging I noticed that it cores before it even does anything in main function. If I place a breakpoint before all the commands in main the core still happens. The program has been compiled on other platforms and it creates for threads, but here on HP I suspect that the core happens when the threads get created. The program uses dce and I am linking with libdce.

I would appreciate any help very much.
5 REPLIES 5
John Bolene
Honored Contributor

Re: Bus error: core dump

The bus error is actually a memory refernce that is out of bounds for the program. This is a very confusing error message.

The bus was unable to resolve the memory location that you wanted.

Hope this helps.
It is always a good day when you are launching rockets! http://tripolioklahoma.org, Mostly Missiles http://mostlymissiles.com
Jeremy Lemaire
New Member

Re: Bus error: core dump

Hello,

Are you using aCC? If so you may need to use the -mt command line option in order to use threads. I hope this helps.

http://docs.hp.com/hpux/onlinedocs/dev/aCC/a_03_30/options.htm#option-mt

-Jeremy
Eugeny Brychkov
Honored Contributor

Re: Bus error: core dump

Saso,
to resolve this problem please recompile your source code on this platform. If you'll try to run 2.0 code on 1.0 or 64bit code on 32bit system I guess it will not work
Eugeny
Adam J Markiewicz
Trusted Contributor

Re: Bus error: core dump

Hi.

Problem with DCE comes most probably from thread libraries.
Please have a look:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=73484

Be sure you do not link with libpthread.sl and libcma.sl to the same program (this must be ensured together with all other involved libraries also).

Good luck
Adam
I do everything perfectly, except from my mistakes
Mike Stroyan
Honored Contributor

Re: Bus error: core dump

You really should look at the stack trace at the time of the SIGBUS. A debugger such as wdb can show the stack trace.

Your program will run constructor code for C++ global variables before it starts to run main. You may have a simple problem that can be debugged in your C++ constructors.

People are suggesting many ways to cause a crash. There are indeed very many ways. It would be more efficient to give more information, such as OS version, compiler versions, link line, and stack trace. That would rapidly narrow the search for a cause.