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

(1) I have isolated the failing PAR 0.89/t/2-pp.t test case here:

Can't load '/tmp/par-andrew/temp-9575/14504270.so' for module IO: /tmp +/par-andrew/temp-9575/14504270.so: failed to map segment from shared +object: Operation not permitted at /usr/lib/perl5/i386-linux/DynaLoad +er.pm line 206. at ../blib/lib/PAR/Heavy.pm line 81

(2) I think I was told this may have something to do with something called perl-devel, but I have no idea what that is. ? I have no apt-get command?

(3) I do not have root access to the machine, I am running as a user in my /home/andrew directory, could that have something to do with it?

-Andrew.


Andrew Tomazos  |  andrew@tomazos.com  |  www.tomazos.com

Replies are listed 'Best First'.
Re: PAR::Heavy failed to map segment
by jettero (Monsignor) on Jul 13, 2005 at 17:31 UTC
    That's a hard question. For some reason you can't read that so file. I'd start guessing around bad perms or ownership on tmp/par-andrew/temp-9575/14504270.so; or perhaps the disk filled up and DynaLoader.pm is trying to read/write mem it can't get to...
      (4) I have had a look at the tmp/par-andrew directory. It contains several /tmp/par-andrew/temp-(\d+) subdirectories but temp-9575 does not exist. Every time I run the test it gives a different number on the end of temp-. I think this is normal.

      (5) I appear to have ownership and 0755 of the /tmp/par-andrew directory and subdirectories.

      (6) I have checked my disk space with "df -h" and everything is below 50%.

      -Andrew.


      Andrew Tomazos  |  andrew@tomazos.com  |  www.tomazos.com
Re: PAR::Heavy failed to map segment
by mugwumpjism (Hermit) on Jul 14, 2005 at 04:36 UTC

    Looks like some policy stopped the dynamic linker mapping in the object file. Your /tmp might be mounted noexec, for instance. Try using a different temporary path (perhaps there is an environment variable like TEMP or TMP you can use to override the default /tmp - UTSL. If you still get this on the same filesystem that you have other shared objects on, enquire further).

    The perl-devel is just Perl compiled with debugging symbols. apt-get is a command that comes with the Debian Linux distribution that installs new software; they package the debugging version of Perl in that package.

    You should be able to install and use PAR as a normal user.

    $h=$ENV{HOME};my@q=split/\n\n/,`cat $h/.quotes`;$s="$h/." ."signature";$t=`cat $s`;print$t,"\n",$q[rand($#q)],"\n";
      I'm not using debian linux, I guess the reason I do not have apt-get.

      What does UTSL stand for?

      Where would I set the environment variable TEMP or TMP? How do I adjust which /tmp directory PAR uses? I do not see anything in Makefile.PL.

      Update: I looked into the code and found PAR_TEMP. Trying to set that now.

      Shite. Its not working. I've set PAR_TEMP with declare -x PAR_TEMP=/home/andrew/tmp but it doesn't seem to pick it up. It is still trying to write to /tmp exactly as before. It looks like that code was just touched by the author in the last revision, maybe it is still broken? Or maybe I am doing something wrong?

      Update 2: OK, I've finally got it recoginizing the temp directory. Now its passing at least some tests. Still failing 23 of the t/2-pp.t tests.

      Update 3: I've isolated the first failing test here:

      OUTPUT FROM make test TEST_VERBOSE=1 # [420]sub pp_hello_1 cannot open a pipe for ./a.out 2>&1 |

      The code for that is here:

      if (!(open (CMD_STDOUT_AND_STDERR, "$cmd 2>&1 |"))){ close(PIPE_LOGFILE); $$message_ref = "\n\[420\]sub $test_name_string cannot " . "open a pipe for $cmd 2>&1 |\n"; return (EXIT_FAILURE); }

      Added a dump of $! to $$message_ref error string. Gave me

      # [420]sub pp_hello_1 cannot open a pipe for ./a.out 2>&1 | # ($! = Permission denied) #

      Permission denied? Why would you get a permission denied from the open command? -Andrew.


      Andrew Tomazos  |  andrew@tomazos.com  |  www.tomazos.com

        You will find the meaning of UTSL at http://www.dictionary.com/.

        Beats me on the pipe opening issue; put $! into the message to get the system error message - and if that doesn't help, try putting this before the code;

        print "strace -fae -p $$\n"; sleep 10;

        When it prints the "strace" command, cut and paste the line into another window, and you will see all the system calls the program executes over the part you are interested in. There should be one that is failing (will have ESOMETHING in the last column). That should give you a hint as to what is going wrong.

        $h=$ENV{HOME};my@q=split/\n\n/,`cat $h/.quotes`;$s="$h/." ."signature";$t=`cat $s`;print$t,"\n",$q[rand($#q)],"\n";