Operating System - HP-UX
1832978 Members
2774 Online
110048 Solutions
New Discussion

core file is not being generated

 
Scott Kolb
New Member

core file is not being generated

I have an executable running under HP-UX11 that is terminating abnormally but is not generating a core file to allow me to debug it. Other applications do create a core file. All of them were compiled using the aCC compiler but this is the only multi-threaded application. Any suggestions?
3 REPLIES 3
A. Clay Stephenson
Acclaimed Contributor

Re: core file is not being generated

Not all program terminations result in a core file being generated. It also depends upon the signal handler that is in effect for a given signal for the process at the time. The very first thing to check is if you have write permissions in the CWD of the process. Bear in mind, it is possible for the application to do a chdir() so the directory that you started the process in might not be the CWD. One approach would be to use tusc to attach to the process. That should get you in the neighborhood of the problem though admittedly not as well as a stack trace would.
If it ain't broke, I can fix that.
Scott Kolb
New Member

Re: core file is not being generated

Thanks for your reply.

The application does have write permission in the CWD. I have used gdb to attach to the process and dump a core. Unfortunately, this problem only occurs after running for several hours under high load and it is intermittent. Application tracing does not show anything unusual but then it suddenly stops and the process exits.

My signal handlers print the signal before exiting but I'm not getting any of that output. Under Solaris, the signal handlers do show the signals and generate a core. I'm thinking that I'm missing some OS patch or compile time option but I've been unable to find anything.

I forgot about tusc and will try it. The output file will be huge but it is something.
Dennis Handly
Acclaimed Contributor

Re: core file is not being generated

>Application tracing does not show anything unusual but then it suddenly stops and the process exits.

In a debugger you can put breakpoints at exit, _exit and abort, etc., so you can catch those.