1

Did a local install of GNU Parallel on a virtual Ubuntu server:

$uname -a
Linux #### 2.6.32-43-server #97-Ubuntu SMP Wed Sep 5 16:56:41 UTC 2012 x86_64 GNU/Linux

when running parallel, i get the following error on STDERR:

$parallel echo ::: A B C
Error unlinking file ./rTrUcTv2ZS using unlink0 at /home/######/bin/parallel line 5529

Any suggestion on what this means and how to fix it?

Things I have looked into already:

  • permissions I have read write permissions on all files and in the directory.
  • bad install It could be a bad install. To install I used ./configure --prefix=$HOME. Here is the output of configure.log:

    This file contains any messages produced by compilers while
    running configure, to aid debugging if configure makes a mistake.
    
    It was created by parallel configure 20140622, which was
    generated by GNU Autoconf 2.69.  Invocation command line was
    
    $ ./configure --prefix=/home/######
    
    ## --------- ##
    ## Platform. ##
    ## --------- ##
    
    hostname = ######
    uname -m = x86_64
    uname -r = 2.6.32-43-server
    uname -s = Linux
    uname -v = #97-Ubuntu SMP Wed Sep 5 16:56:41 UTC 2012
    
    /usr/bin/uname -p = unknown
    /bin/uname -X     = unknown
    
    /bin/arch              = unknown
    /usr/bin/arch -k       = unknown
    /usr/convex/getsysinfo = unknown
    /usr/bin/hostinfo      = unknown
    /bin/machine           = unknown
    /usr/bin/oslevel       = unknown
    /bin/universe          = unknown
    

Curiously missing is uname -p. lscpu shows:

Architecture:          x86_64
CPU op-mode(s):        64-bit
CPU(s):                48
Thread(s) per core:    1
Core(s) per socket:    12
CPU socket(s):         4
NUMA node(s):          8
Vendor ID:             AuthenticAMD
CPU family:            16
Model:                 9
Stepping:              1
CPU MHz:               800.000
Virtualization:        AMD-V
L1d cache:             64K
L1i cache:             64K 
L2 cache:              512K
L3 cache:              5118K
cms
  • 257
  • 1
  • 11

3 Answers3

1

You have not written which version you use, but the line causing the problem is probably:

        $disk_full_fh = ::tempfile();

Which is later used to see if additional data can be written to the buffering file system.

It is quite surprising that this would cause any problems, as tempfile() is used extensively by GNU Parallel. You may want to follow the procedure for filing a bug report (see LESS=+/^REPORTING man parallel).

My best guess is that $TMPDIR (which defaults to /tmp) is somehow special on your system. Try using --tmpdir and set it to another dir.

Ole Tange
  • 31,768
  • 5
  • 86
  • 104
  • Thank you for the response Tange. I am using the latest version **20140622**. In my home folder, I ran `$mkdir tmp` and `$parallel --tmpdir /home/######/tmp echo ::: A B C` and I get the same error: `Error unlinking file /home/#####/tmp/abGj865_j4 using unlink0 at /home/######/bin/parallel line 5529` I also took your advice and following the bug filing procedure: I downloaded ubuntu Server 10.04.2 from http://virtualboxes.org/images/ubuntu-server/ . I did a local install on that image and **had no error**. – cms Jun 28 '14 at 17:50
  • Also, `$perl -v` shows `This is perl, v5.10.1 (*) built for x86_64-linux-gnu-thread-multi ...` – cms Jun 28 '14 at 18:02
  • So we can conclude the problem on your system cannot be reproduced on a virtualbox. What file system is /home/######/tmp? If that is a file system, where you cannot unlink an open file, that might explain the behaviour. See if you can reproduce the problem on other systems, so we can figure out what is common for those. – Ole Tange Jun 28 '14 at 19:58
  • Thanks again Tange for correctly identifying the problem. My home directory on this system is a **NFS** volume. This explains the unlink error: NFS does not work well with File::Temp module: [http://perldoc.perl.org/File/Temp.html](http://perldoc.perl.org/File/Temp.html). I fixed the issue by setting my $TMPDIR environment variable to something approved by my system admin on an ext4 volume. – cms Jul 08 '14 at 18:47
1

It turns out the unlink error is a conflict between the NFS filesystem of my home directory and parallel's use of the File::Temp module:

> "Finally, on NFS file systems the link count of the file handle does not always go to zero immediately after unlinking. Currently, this command is expected to fail on NFS disks."

PerlDocs File::Temp Module

To fix the situation, I asked my system administrator for a sticky directory on the volume containing the root folder, which was on a ext4 file system. I then added added this to my environment variables under $TMPDIR with:

export TMPDIR=/to/the/directory

I also added this line to .bash_profile

cms
  • 257
  • 1
  • 11
0

I have now been able to reproduce the error. It is fixed in newest git version, and will be included in version 20140922 (the fix is crazy, but it seems to work).

Please test it out.

Ole Tange
  • 31,768
  • 5
  • 86
  • 104