Hi Monks,

I have a Perl program which is part of batch job. This looks like below

#!/usr/bin/perl # # runModule.pl # Run a DexNet module in the Integreation Environment # Usage: ./runModule.pl PROPERTY_FILE # Create the property file to mimic PTM/PTM_205_Properties.txt use lib ('/home/matlab/Build/Scheduler/Perl/lib'); use DBI; use Util::Scheduler; use Util::Runner; use Symbol; eval { die "Usage: $0 [SQL_SERVER_PROPERTIES_FILE] [APPLICATION_ID] [APPL +ICATION_NAME]\n" unless $ARGV[2]; my $properties_file = $ARGV[0]; my $id = $ARGV[1]; my $name = $ARGV[2]; my $ADNET = Util::Helper->readPropertiesFromFile($properties_file) +; my $properties = Util::Helper->readPropertiesFromDatabase($ADNET, +$id); my $runner = Util::Runner->new($ADNET, $id, $name); my $wait_timeout = $properties->{'wait.timeout'}; my $lock_timeout = $properties->{'lock.timeout'}; Util::Scheduler->begin($ADNET, $id, $wait_timeout, $lock_timeout); $runner->initialize; $runner->runAll; Util::Scheduler->end($ADNET, $id); }; if ($@) { exit(1); } else { exit(0); }

This program in turn execute a set of SQL code stored in a form of stored procedure.

The problem is sometime the program fails and throws a Segmentation fault like below.

78481 Segmentation fault (core dumped) perl runScheduledModule.pl ~/Run/conf/adnet.db.properties $1 "$2

Could you please suggest us a possible ways to overcome such issue to occur in recurring basis.


In reply to Segmentattion fault by arijitsantra

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.