1827882 Members
1144 Online
109969 Solutions
New Discussion

Memory fault(core dump)

 
sathis kumar
Frequent Advisor

Memory fault(core dump)

Hi,

I am facing a strange problem.
I have migrated code from HP-UX11.11 to HP-UX11.23. We compiled the code successfully and created the new shared libraries.

For sanity testing of my application, I have a c program which takes batch number as an input and give the result as bathes.
For eg. If the input file is having 25 products, batch size is 5 ( Result is sucessful).
batch size is 4 (Result is successful).. Here it is taking entire file into 7 batches(last batch is having only one) in this case also result is successful.
In case last batch is having less than the batch size and more than one product.. the following error is coming.(eg: batch size is 7)

First 3 batches are successful
first product in last batch is successful.
Memory fault(core dump)

Note: In the old m/c, the same program or same executable very well working. No matter how many products are there in the input file, what is batch size.

But in the new m/c(HP-UX11.23), I am confused with the surprising behavior.

Anybody else is facing this kind of problem?.
Please advise me on this. Do I install any patches to avoid this error?

Please let me know in case you require any further information..

Regards,
Sathis.
4 REPLIES 4
Andrew Merritt_2
Honored Contributor

Re: Memory fault(core dump)

Hi Sathis,
A number of points. As most of your questions are related to C code and libraries, I would suggest posting these in the "Languages and Scripting" sub-forum. I've moved your recent posts here to keep them together.

Please review the answers you've been given to your earlier posts and assign points to them. That both rewards the posters and lets others with similar problem assess how useful the answers may be to them. If you don't do this, and you don't give feedback to the suggestions you've received, you may find that the people who could help you lose interest in doing so.

Regarding the specific question, the description seems to have got garbled somehow, but if you are seeing a core dump, that is almost always a sign of a coding error. There are always differences between different architectures, and a coding error on one may cause a core dump and not on another. I suggest running a debugger on the core or on the program while its running to see which statement is causing the core dump; if for some reason you can't do that, add trace statements around the point at which it crashes to display all the variables at each stage; standard debugging procedures, in fact.

Andrew


HGN
Honored Contributor

Re: Memory fault(core dump)

Hi

If you feel this issue is resolved, assign points and close this thread.
You have not assigned any points 0 out of 41 responses, hope you understand that people spend their valuable time helping you. Also read the forum guidelines in assigning points.

Rgds

HGN
A. Clay Stephenson
Acclaimed Contributor

Re: Memory fault(core dump)

There are many things which could cause exactly your problem -- especially if the 11.11 perogram were a 32-bit executable and the new one is 64-bit. The good news is that your problem should be rather easy to find. Compile the program with the -g option; execute it and allow it to crash. You can then use a debugger such as gdb to get a stack trace and with the -g option, you ought to be able to pinpoint the offending source code line.
If it ain't broke, I can fix that.
Dennis Handly
Acclaimed Contributor

Re: Memory fault(core dump)

Is your 11.23 system Integrity? You need to mention this on EVERY thread you create.

Clay is correct, you need to get a stack trace and use a debugger to see where the problem is.