Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
At the suggestion of moritz, I ran the script with strace, the relevant bits of which are as follows:
select(8, [3], NULL, NULL, {180, 0}) = 1 (in [3], left {180, 0} +) read(3, "e_type\":\"all_birthday\",\"ancestor"..., 4096) = 4096 mremap(0xb7a16000, 3756032, 3760128, MREMAP_MAYMOVE) = 0xb7a16000 time(NULL) = 1270142654 select(8, [3], NULL, NULL, {180, 0}) = 1 (in [3], left {180, 0} +) read(3, "us\":\"active\",\"last_modified\":\"20"..., 4096) = 4096 mremap(0xb7a16000, 3760128, 3764224, MREMAP_MAYMOVE) = 0xb7a16000 time(NULL) = 1270142654 select(8, [3], NULL, NULL, {180, 0}) = 1 (in [3], left {180, 0} +) read(3, ",\"text\":\"RUSSELL Nee Viney Nigel"..., 4096) = 4096 mremap(0xb7a16000, 3764224, 3768320, MREMAP_MAYMOVE) = 0xb7a16000 time(NULL) = 1270142654 select(8, [3], NULL, NULL, {180, 0}) = 1 (in [3], left {180, 0} +) read(3, "8\",\"featured\":0,\"sub_type\":\"memo"..., 836) = 836 time(NULL) = 1270142654 time(NULL) = 1270142654 mmap2(NULL, 3768320, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMO +US, -1, 0) = 0xb767e000 munmap(0xb6a62000, 4059136) = 0 mmap2(NULL, 3768320, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMO +US, -1, 0) = 0xb6e88000 munmap(0xb5d2a000, 4059136) = 0 mmap2(NULL, 3768320, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMO +US, -1, 0) = 0xb6af0000 munmap(0xb767e000, 3768320) = 0 munmap(0xb7a16000, 3768320) = 0 write(1, "\n", 1) = 1 write(1, " - objects 225001 .. 230000", 27) = 27 clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID +|SIGCHLD, child_tidptr=0xb7f7db78) = 14233 time(NULL) = 1270142654 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 rt_sigaction(SIGCHLD, NULL, {0xe5c500, [], 0}, 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 nanosleep({1, 0}, 0xbfb45ea4) = ? ERESTART_RESTARTBLOCK +(To be restarted) --- SIGCHLD (Child exited) @ 0 (0) --- sigreturn() = ? (mask now []) time(NULL) = 1270142654 rt_sigprocmask(SIG_BLOCK, [CHLD], NULL, 8) = 0 waitpid(14232, 0xbfb45be8, WNOHANG) = 0 waitpid(14224, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WNOHANG) = + 14224 waitpid(14233, 0xbfb45be8, WNOHANG) = 0 waitpid(14225, 0xbfb45be8, WNOHANG) = 0 waitpid(14228, 0xbfb45be8, WNOHANG) = 0 waitpid(14229, 0xbfb45be8, WNOHANG) = 0 waitpid(14226, 0xbfb45be8, WNOHANG) = 0 waitpid(14230, 0xbfb45be8, WNOHANG) = 0 waitpid(14231, 0xbfb45be8, WNOHANG) = 0 waitpid(14227, 0xbfb45be8, WNOHANG) = 0 rt_sigprocmask(SIG_BLOCK, [CHLD], [CHLD], 8) = 0 rt_sigaction(SIGCHLD, {0xe5c500, [], 0}, {0xe5c500, [], 0}, 8) = 0 rt_sigprocmask(SIG_SETMASK, [CHLD], NULL, 8) = 0 rt_sigprocmask(SIG_UNBLOCK, [CHLD], NULL, 8) = 0 write(1, "\n", 1) = 1

Here is where the parent child makes the request:

select(8, [3], NULL, NULL, {0, 0}) = 0 (Timeout) time(NULL) = 1270142654 select(8, [3], [3], NULL, {180, 0}) = 1 (out [3], left {180, 0 +}) write(3, "GET /ia_object/_search?searchTyp"..., 246) = 246 time(NULL) = 1270142654 select(8, [3], NULL, NULL, {180, 0}) = ? ERESTARTNOHAND (To be +restarted) --- SIGCHLD (Child exited) @ 0 (0) --- sigreturn() = ? (mask now []) rt_sigprocmask(SIG_BLOCK, [CHLD], NULL, 8) = 0 waitpid(14232, 0xbfb45be8, WNOHANG) = 0 waitpid(14233, 0xbfb45be8, WNOHANG) = 0 waitpid(14225, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WNOHANG) = + 14225 waitpid(14228, 0xbfb45be8, WNOHANG) = 0 waitpid(14229, 0xbfb45be8, WNOHANG) = 0 waitpid(14226, 0xbfb45be8, WNOHANG) = 0 waitpid(14230, 0xbfb45be8, WNOHANG) = 0 waitpid(14231, 0xbfb45be8, WNOHANG) = 0 waitpid(14227, 0xbfb45be8, WNOHANG) = 0 rt_sigprocmask(SIG_BLOCK, [CHLD], [CHLD], 8) = 0 rt_sigaction(SIGCHLD, {0xe5c500, [], 0}, {0xe5c500, [], 0}, 8) = 0 rt_sigprocmask(SIG_SETMASK, [CHLD], NULL, 8) = 0 rt_sigprocmask(SIG_UNBLOCK, [CHLD], NULL, 8) = 0 time(NULL) = 1270142662 time(NULL) = 1270142662 select(8, [3], NULL, NULL, {172, 0}) = ? ERESTARTNOHAND (To be +restarted) --- SIGCHLD (Child exited) @ 0 (0) --- sigreturn() = ? (mask now []) rt_sigprocmask(SIG_BLOCK, [CHLD], NULL, 8) = 0 waitpid(14232, 0xbfb45be8, WNOHANG) = 0 waitpid(14233, 0xbfb45be8, WNOHANG) = 0 waitpid(14225, 0xbfb45be8, WNOHANG) = -1 ECHILD (No child proc +esses) waitpid(14228, 0xbfb45be8, WNOHANG) = 0 waitpid(14229, 0xbfb45be8, WNOHANG) = 0 waitpid(14226, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WNOHANG) = + 14226 waitpid(14230, 0xbfb45be8, WNOHANG) = 0 waitpid(14231, 0xbfb45be8, WNOHANG) = 0 waitpid(14227, 0xbfb45be8, WNOHANG) = 0 rt_sigprocmask(SIG_BLOCK, [CHLD], [CHLD], 8) = 0 rt_sigaction(SIGCHLD, {0xe5c500, [], 0}, {0xe5c500, [], 0}, 8) = 0 rt_sigprocmask(SIG_SETMASK, [CHLD], NULL, 8) = 0 rt_sigprocmask(SIG_UNBLOCK, [CHLD], NULL, 8) = 0 close(3) = 0 time(NULL) = 1270142665 time(NULL) = 1270142665 stat64("/opt/apache/sites/IA/perl/HTTP/Headers/Util.pmc", 0xbfb45d +9c) = -1 ENOENT (No such file or directory) stat64("/opt/apache/sites/IA/perl/HTTP/Headers/Util.pm", 0xbfb45cb +0) = -1 ENOENT (No such file or directory) stat64("/opt/apache/sites/Burro/HTTP/Headers/Util.pmc", 0xbfb45d9c +) = -1 ENOENT (No such file or directory) stat64("/opt/apache/sites/Burro/HTTP/Headers/Util.pm", 0xbfb45cb0) + = -1 ENOENT (No such file or directory) stat64("/opt/perl-5.8.9/lib/5.8.9/i686-linux/HTTP/Headers/Util.pmc +", 0xbfb45d9c) = -1 ENOENT (No such file or directory) stat64("/opt/perl-5.8.9/lib/5.8.9/i686-linux/HTTP/Headers/Util.pm" +, 0xbfb45cb0) = -1 ENOENT (No such file or directory) stat64("/opt/perl-5.8.9/lib/5.8.9/HTTP/Headers/Util.pmc", 0xbfb45d +9c) = -1 ENOENT (No such file or directory) stat64("/opt/perl-5.8.9/lib/5.8.9/HTTP/Headers/Util.pm", 0xbfb45cb +0) = -1 ENOENT (No such file or directory) stat64("/opt/perl-5.8.9/lib/site_perl/5.8.9/i686-linux/HTTP/Header +s/Util.pmc", 0xbfb45d9c) = -1 ENOENT (No such file or directory) stat64("/opt/perl-5.8.9/lib/site_perl/5.8.9/i686-linux/HTTP/Header +s/Util.pm", 0xbfb45cb0) = -1 ENOENT (No such file or directory) stat64("/opt/perl-5.8.9/lib/site_perl/5.8.9/HTTP/Headers/Util.pmc" +, 0xbfb45d9c) = -1 ENOENT (No such file or directory) stat64("/opt/perl-5.8.9/lib/site_perl/5.8.9/HTTP/Headers/Util.pm", + {st_mode=S_IFREG|0444, st_size=4887, ...}) = 0 open("/opt/perl-5.8.9/lib/site_perl/5.8.9/HTTP/Headers/Util.pm", O +_RDONLY|O_LARGEFILE) = 3 ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbfb45ad8) = -1 ENOTTY (I +nappropriate ioctl for device) _llseek(3, 0, [0], SEEK_CUR) = 0 read(3, "package HTTP::Headers::Util;\n\nus"..., 4096) = 4096 _llseek(3, 1712, [1712], SEEK_SET) = 0 _llseek(3, 0, [1712], SEEK_CUR) = 0 close(3) = 0 munmap(0xb6af0000, 3768320) = 0 munmap(0xb6e88000, 3768320) = 0

At this stage, my code catches the select failed: no child processes error in an eval, issues a warning, then sleeps before retrying:

write(2, "\nSystem is busy - trying again\n", 31) = 31 time(NULL) = 1270142665 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 rt_sigaction(SIGCHLD, NULL, {0xe5c500, [], 0}, 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 nanosleep({3, 0}, 0xbfb45ea4) = ? ERESTART_RESTARTBLOCK +(To be restarted)

I'm not sure what most of this means, but is the value of $! being set to "no child processes" by one of my waitpid calls, which is interfering with the code in LWP::Protocol::http? Would it help if I localised $! in my reaper sub?


In reply to Re^2: No child processes - system limit? by clinton
in thread No child processes - system limit? by clinton

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!
  • 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, 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, 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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others taking refuge in the Monastery: (7)
    As of 2015-07-29 10:22 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









      Results (263 votes), past polls