Operating System - HP-UX
1753521 Members
4971 Online
108795 Solutions
New Discussion юеВ

Re: CORE in PERL process?!?

 
Enrico Venturi
Super Advisor

CORE in PERL process?!?

Hello colleagues,
we run a PERL process, which sometimes calls executable libraries; at a certain moment the process dumps because of a SIGSEGV .... it produces a core file ....
A PERL program can really produce a core?!?
How can I get informations from the core? i.e. where the memory fault occurred.....

Thanks a lot

Enrico
6 REPLIES 6
Steve Steel
Honored Contributor

Re: CORE in PERL process?!?

Hi

Memory Usage - ├в What is using all of the memory├в ?

by:eric.herberholz@hp.com

Last modified: August 19, 2004

Latest version available at external ftp site:

ftp://eh:spear9@hprc.external.hp.com/memory.htm


Look at J


Steve
If you want truly to understand something, try to change it. (Kurt Lewin)
Muthukumar_5
Honored Contributor

Re: CORE in PERL process?!?

SIGSEGV ( signal for segmentation violation ) occurs because of memory access on voildated region and getting signal on that.

You can start to debug core file as,

file core
what core

I hope you knew some informations there on core file. core file is created because of getting signals for the memory problem.

It is good to start with debuggine mode to know the problem more.
Easy to suggest when don't know about the problem!
Enrico Venturi
Super Advisor

Re: CORE in PERL process?!?

unfortunately the problem rarely occurs during the normal process behaviour, then we've to run it more and more times ...
very difficult to run in debug mode...
Enrico Venturi
Super Advisor

Re: CORE in PERL process?!?

for instance, through "xdb" is possible to understand where the fault occur in an executable.....
is there a similar tool for PERL modules?
by file and what I can get very few informations on the core, or better, on what caused the core (the SIGSEGV)
ranganath ramachandra
Esteemed Contributor

Re: CORE in PERL process?!?

as suggested before, use the command 'file core' or 'what core' to see which program dumped the core - it should probably be from perl.

then use a debugger such as gdb to get a stack trace (perl path here is an example):
gdb /opt/perl/bin/perl core

gdb's backtrace (bt) command gives you the stack trace. you can also list the shared libraries loaded using "info sharedlibrary". if the backtrace is unable to list names of functions, you can check the instruction address and try finding out which shared library it was in, using the output of "info sharedlibrary".
 
--
ranga
[i work for hpe]

Accept or Kudo

H.Merijn Brand (procura
Honored Contributor

Re: CORE in PERL process?!?

Since perl loads the modules/libs dynamically, there is nothing that holds you from using dbx or gdb on the running perl process.

A running perl script is nothing more than the perl process that runs the compiled script.

Problems arise when perl forks of other processes that crash, like when using DBI and backend SQL processes are started

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn