05-30-2005 12:57 AM
So we compiled exactly the same c-source on another server (hp-ux 10.20, PA 1.1, lets call this server "B") and it runs perfectly on B.
Now we took the executable from B to A and it wil not run: Memory fault(coredump).
And when we take the executable from A to B and it runs perfectly.
So both compiled executables will run: on B. And both executables will not run on A.
FYI: server A has far more memory than server B.
Putting this problem so 'general' as above: does anyone have a good idea where to look first?
(We also compiled on "C" (hp-ux 11.00 PA 2.0) and this has the same effect: the executable will not run on A (memory fault) and it run's on B; it will not run on C)
05-30-2005 01:08 AM
try creating a simple hello world program and see whether it runs on server A. if it is then the more likely issue could be your C program, the way it initiates the program memory.
check for the change log between 10.20 and 11.00 and see whether there is anything specific to memory module is mentioned.
05-30-2005 01:18 AM
It could as well be a shared library that misbehavess, or - in case of (n)curses programs - a misconfigured termcap or terminfo entry
Enjoy, Have FUN! H.Merijn
05-30-2005 01:32 AM
main(1,7F7F094C) from main+8
gdb calc_statistic_lml core produces:
Core was generated by `calc_statistic'.
Program terminated with signal 11, Segmentation fault.
#0 0x1d00c in main (argc=1, argv=0x7f7f094c) at calc_statistic_lml.c:200
200 sessie = 1;
This is all abacadabra to me. To you ?
05-30-2005 02:46 AM
] main(1,7F7F094C) from main+8
Your stack is corrupted
] gdb calc_statistic_lml core produces:
] Core was generated by `calc_statistic'.
] Program terminated with signal 11, Segmentation fault.
] #0 0x1d00c in main (argc=1, argv=0x7f7f094c) at calc_statistic_lml.c:200
] 200 sessie = 1;
] This is all abacadabra to me. To you ?
please show us the function that is defined in calc_statistics_lml.c about line 200 and make sure that it includes the function header. For example
195:int main (int argc, char *argv)
197: short foo;
199: foo = 1;
200: *((long long *)&foo) = 12345678L;
Just to give you an example of what could cause such a core dump
Enjoy, Have FUN! H.Merijn
05-30-2005 02:47 PM
Now I see that there can be one of two reasons for this:
1) There is incompatibility introduced in 11.11, I am not sure how to cathc this or corrcet this.
2) The application has some null dereference statement or unitialized pointer dereference. In this case I would suggest you to use some lint software to see if there is any trivial bug. Verify the printf statements to see that the number of arguments matches with the format string requirements. Similarly look for other varargs statements. This should be straightforward as you already know the function that is causing memory fault.
Having said everything, I am great admirer of gdb and owuld suggest you to continue using that to locate the issue.
07-27-2005 02:29 AM