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

I have a perl program which is called by a shell program(.sh). The perl has many logical entities which are executed sequentially and some of the entities are multi threaded. I am getting segmentation fault in one of the multi threaded entity. The frequency of occurance became maximum after we upgrade the Perl version from 5.8.5 to 5.8.8. So, i tried to downgrade the version again to 5.8.5 to check if it resolves the issue. However, it dindnt. The Segmentation fault is encountered either in thread creation or thread join. The frequency of occurance is maximum only in Production environment. In Prod like and Development environment, the Segmentation fault rarely occurs. Any comment/advice on this will be highly appreciated. Thanks in advance!

Replies are listed 'Best First'.
Re: Segmentation Fault in Perl Program
by bulk88 (Priest) on Aug 14, 2012 at 22:58 UTC
    You are using a very old version of Perl. Threads are alpha quality in Perls that old. Can you post a short example that will reproduce the crash? Your problem probably is caused by one of a million things, and the magic ball is currently away for polishing at PerlMonks. See How do I post a question effectively?.
Re: Segmentation Fault in Perl Program
by NetWallah (Canon) on Aug 14, 2012 at 19:05 UTC
    I have seen perl segfault when there is insufficient swap space. I resolved mine by increasing the swap size.

                 I hope life isn't a big joke, because I don't get it.
                       -SNL

    >
      Thanks for your response! The used swap space is very negligible. free -m gave the following output: Swap: 8191 724 7467 Only 724 MB is used out of 8191 MB.
Re: Segmentation Fault in Perl Program
by Anonymous Monk on Aug 15, 2012 at 01:12 UTC

    Hi,

    Check for any differences between the 3 environments. I would guess that Production differs in some way from the other 2.

    Did you thoroughly test the Perl upgrade in the development and test environments? What happened?

    If it all went well I would think the Perl bit is OK and the problem lies elsewhere.

    Mind you I agree, even 5.8.8 is getting on a bit.

    J.C.