kiran146179 has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks,
I am facing a problem when running a perl profiler. when i run the below command i get
-bash-3.00$ sudo perl -d:DProf /opt/finance/cgi-bin/fundsummary 188 Segmentation Fault (core dumped) -bash-3.00$
This perl profiling has worked in the last week but now suddenly the above error is popped up.
I have tried in different servers but the same error occurs.
I strongly believe this is OS related error.
Can some help me out in solving this problem asap.
Found a Solution
Yeah use other module Devel::NYTProf which has given feature rich profilers. This Helped me a lot. Hi all thanks for the information. regards, kiran kommineni

Replies are listed 'Best First'.
Re: Perl Profilers - ERROR: Segmentation Fault (core dumped)
by choroba (Cardinal) on Apr 13, 2011 at 16:08 UTC
    If you change the parameter to 187, the problem will go away.
    But seriously, without showing us a sole line of the code, how do you think we can help you? If it is "OS related", you might consider telling us what OS your machine is running.
Re: Perl Profilers - ERROR: Segmentation Fault (core dumped)
by Eliya (Vicar) on Apr 13, 2011 at 16:35 UTC

    Do you get the segfault also for a "dummy script", such as

    $ sudo perl -d:DProf -e1

    If so, maybe an incompatible DProf.so is being loaded (for example due to some inappropriate PERL5LIB setting, or some such).  You can check with

    $ sudo strace -eopen perl -d:DProf -e1 ... open("/usr/local/perl/5.12.2/lib/5.12.2/x86_64-linux-thread-multi/Deve +l/DProf.pm", O_RDONLY) = 4 open("/usr/local/perl/5.12.2/lib/5.12.2/XSLoader.pm", O_RDONLY) = 5 open("/usr/local/perl/5.12.2/lib/5.12.2/x86_64-linux-thread-multi/auto +/Devel/DProf/DProf.so", O_RDONLY) = 4 open("tmon.out", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 4

    The path the module is being loaded from should match the version of the perl binary you're using (what 'sudo which perl' says).

      Hi Eliya
      I dont get any such error message when i run it with a dummy script. It is only when i work with bulk processing files.
Re: Perl Profilers - ERROR: Segmentation Fault (core dumped)
by jethro (Monsignor) on Apr 14, 2011 at 09:02 UTC

    Try to find out where the fault occurs with strace (or gdb)

    Try to find out what changes happened to your machine. Did an automatic update of the OS happen before the problem started? Or did you change anything in the script