I found the root cause of the problem. use encoding "utf8" caused the segmentation fault. I removed it. Problem is gone. However, I got "corrupted double-linked list" at run time. It does not always happen. Sometimes the program works fine. Sometimes, I got "corrupted double-linked list". Program died when it happened. Below are the messages. I have no clue what causes it. Any idea?

*** glibc detected *** /usr/bin/perl: corrupted double-linked list: 0x +000000000bbec430 *** ======= Backtrace: ========= /lib64/libc.so.6[0x366cc70583] /lib64/libc.so.6[0x366cc7222c] /lib64/libc.so.6(cfree+0x4b)[0x366cc7273b] /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE/libperl.so(perl_ +destruct+0xffa)[0x366dc3966a] /usr/bin/perl(main+0xb3)[0x401773] /lib64/libc.so.6(__libc_start_main+0xf4)[0x366cc1d994] /usr/bin/perl[0x401609] ======= Memory map: ======== 00400000-00403000 r-xp 00000000 08:03 75519 + /usr/bin/perl 00602000-00604000 rw-p 00002000 08:03 75519 + /usr/bin/perl 0a327000-0c5c3000 rw-p 0a327000 00:00 0 + [heap] 422bd000-422be000 ---p 422bd000 00:00 0 422be000-42cbe000 rw-p 422be000 00:00 0 42cbe000-42cbf000 ---p 42cbe000 00:00 0 42cbf000-436bf000 rw-p 42cbf000 00:00 0 436bf000-436c0000 ---p 436bf000 00:00 0 436c0000-440c0000 rw-p 436c0000 00:00 0 3513c00000-3513d38000 r-xp 00000000 08:03 2523842 + /usr/lib/libxml2.so.2.7.8 3513d38000-3513f37000 ---p 00138000 08:03 2523842 + /usr/lib/libxml2.so.2.7.8 3513f37000-3513f41000 rw-p 00137000 08:03 2523842 + /usr/lib/libxml2.so.2.7.8 3513f41000-3513f42000 rw-p 3513f41000 00:00 0 366c800000-366c81c000 r-xp 00000000 08:03 1638708 + /lib64/ld-2.5.so 366ca1b000-366ca1c000 r--p 0001b000 08:03 1638708 + /lib64/ld-2.5.so 366ca1c000-366ca1d000 rw-p 0001c000 08:03 1638708 + /lib64/ld-2.5.so 366cc00000-366cd4d000 r-xp 00000000 08:03 1638709 + /lib64/libc-2.5.so 366cd4d000-366cf4d000 ---p 0014d000 08:03 1638709 + /lib64/libc-2.5.so 366cf4d000-366cf51000 r--p 0014d000 08:03 1638709 + /lib64/libc-2.5.so 366cf51000-366cf52000 rw-p 00151000 08:03 1638709 + /lib64/libc-2.5.so 366cf52000-366cf57000 rw-p 366cf52000 00:00 0 366d000000-366d082000 r-xp 00000000 08:03 1638712 + /lib64/libm-2.5.so 366d082000-366d281000 ---p 00082000 08:03 1638712 + /lib64/libm-2.5.so 366d281000-366d282000 r--p 00081000 08:03 1638712 + /lib64/libm-2.5.so 366d282000-366d283000 rw-p 00082000 08:03 1638712 + /lib64/libm-2.5.so 366d400000-366d402000 r-xp 00000000 08:03 1638608 + /lib64/libdl-2.5.so 366d402000-366d602000 ---p 00002000 08:03 1638608 + /lib64/libdl-2.5.so 366d602000-366d603000 r--p 00002000 08:03 1638608 + /lib64/libdl-2.5.so 366d603000-366d604000 rw-p 00003000 08:03 1638608 + /lib64/libdl-2.5.so 366d800000-366d816000 r-xp 00000000 08:03 1638711 + /lib64/libpthread-2.5.so 366d816000-366da15000 ---p 00016000 08:03 1638711 + /lib64/libpthread-2.5.so 366da15000-366da16000 r--p 00015000 08:03 1638711 + /lib64/libpthread-2.5.so 366da16000-366da17000 rw-p 00016000 08:03 1638711 + /lib64/libpthread-2.5.so 366da17000-366da1b000 rw-p 366da17000 00:00 0 366dc00000-366dd2b000 r-xp 00000000 08:03 202553 + /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE/libperl.so 366dd2b000-366df2b000 ---p 0012b000 08:03 202553 + /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE/libperl.so 366df2b000-366df34000 rw-p 0012b000 08:03 202553 + /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE/libperl.so 366df34000-366df36000 rw-p 366df34000 00:00 0 3670000000-367000d000 r-xp 00000000 08:03 1638714 + /lib64/libgcc_s-4.1.2-20080825.so.1 367000d000-367020d000 ---p 0000d000 08:03 1638714 + /lib64/libgcc_s-4.1.2-20080825.so.1 367020d000-367020e000 rw-p 0000d000 08:03 1638714 + /lib64/libgcc_s-4.1.2-20080825.so.1 3673800000-3673815000 r-xp 00000000 08:03 1638453 + /lib64/libnsl-2.5.so 3673815000-3673a14000 ---p 00015000 08:03 1638453 + /lib64/libnsl-2.5.so 3673a14000-3673a15000 r--p 0Abort


Here is my system info:
uname -a
Linux 2.6.18-164.el5 #1 SMP Tue Aug 18 15:51:48 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
perl -v
This is perl, v5.8.8 built for x86_64-linux-thread-multi
Copyright 1987-2006, Larry Wall
Modules I used

use strict; use warnings; use threads; use Scalar::Util 'reftype'; use Data::Dumper; use CGI qw(:standard Vars); use LWP::UserAgent; use XML::Simple;


In reply to Re^8: Parallel Modules ? by Gary Yang
in thread Parallel Modules ? by Gary Yang

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.