Hi and thanks,
grep '= -1 E' /tmp/strace.out shows this as the final message:
5215  clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7fc213c1b780) = -1 ENOMEM (Cannot allocate memory)
$? and $! report:
Before array setup: $?=0x0 $!=Operation not permitted
After array setup: $?=0x0 $!=Cannot allocate memory

For details of free memory via free -m see below. Also ulimit -a

So my problem appears to be memory. I have 4Gb RAM and 2.4 Gb swap. I thought that on 64 bit the array would be swapped out to allow the system command to run. Seems it isn't.

On 32 bit there is just enough memory to allow the system command to run.

I do have in mind a crude workaround for the problem, involving a simple daemon to replace the system call to run PovRay, but I am still interested to understand why the system thinks it can't allocate memory when there's Gbytes of swap available.

Cheers, Peter

free -m before and after array setup
64 bit
Before:
total used free shared buffers cached Mem: 3948 1202 2746 0 63 418 -/+ buffers/cache: 720 3228 Swap: 2392 0 2392
After:
total used free shared buffers cached Mem: 3948 3931 17 0 3 93 -/+ buffers/cache: 3834 114 Swap: 2392 51 2341

32 bit
Before:
total used free shared buffers cached Mem: 3549 954 2594 0 77 362 -/+ buffers/cache: 514 3034 Swap: 2392 0 2392
After:
total used free shared buffers cached Mem: 3549 3437 111 0 81 359 -/+ buffers/cache: 2996 553 Swap: 2392 0 2392
64 bit:
ulimit -a core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited file size (blocks, -f) unlimited pending signals (-i) 36864 max locked memory (kbytes, -l) 64 max memory size (kbytes, -m) unlimited open files (-n) 1024 pipe size (512 bytes, -p) 8 POSIX message queues (bytes, -q) 819200 stack size (kbytes, -s) 8192 cpu time (seconds, -t) unlimited max user processes (-u) 36864 virtual memory (kbytes, -v) unlimited file locks (-x) unlimited

In reply to Re^5: system command - OK on 32 bit, fails on 64 bit Linux - why? by geep999
in thread system command - OK on 32 bit, fails on 64 bit Linux - why? by geep999

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.