[Pkg-octave-devel] Bug#550823: octave3.2: Race condition with multiple Octave instances when creating M-files on the fly

Sébastien Villemot sebastien.villemot at ens.fr
Tue Oct 13 09:06:00 UTC 2009


Package: octave3.2
Version: 3.2.3-1
Severity: normal

The problem can be reproduced with the following example, composed of the following
two files:
* foo1.m which does nothing special
* foo2.m which creates foo3.m on the fly, and runs it.


----------------foo1.m------------------
1+1
----------------------------------------

----------------foo2.m------------------
system("echo 1+2 > foo3.m");
foo3;
----------------------------------------


The following shell command will fail most of time (but not always) on my machine:

$ rm -f foo3.m && octave foo1.m && octave foo2.m

When it fails, I get:

error: `foo3' undefined near line 2 column 1
error: called from:
error:   foo2.m at line 2, column 1

This has to do with multiple instances of Octave since the following always works
fine:

$ rm -f foo3.m && octave foo2.m

Introducing a long-enough time delay between the two instances of Octave also
solves the problem:

$ rm -f foo3.m && octave foo1.m && sleep 1 && octave foo2.m


-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.30-2-amd64 (SMP w/8 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages octave3.2 depends on:
ii  libamd2.2.0      1:3.4.0-1               approximate minimum degree orderin
ii  libarpack2       2.1+parpack96.dfsg-2+b1 Fortran77 subroutines to solve lar
ii  libatlas3gf-base 3.6.0-24                Automatically Tuned Linear Algebra
ii  libblas3gf [libb 1.2-2                   Basic Linear Algebra Subroutines 3
ii  libbz2-1.0       1.0.5-3                 high-quality block-sorting file co
ii  libc6            2.9-25                  GNU C Library: Shared libraries
ii  libcamd2.2.0     1:3.4.0-1               symmetric approximate minimum degr
ii  libccolamd2.7.1  1:3.4.0-1               constrained column approximate lib
ii  libcholmod1.7.1  1:3.4.0-1               sparse Cholesky factorization libr
ii  libcolamd2.7.1   1:3.4.0-1               column approximate minimum degree 
ii  libcurl3-gnutls  7.19.5-1.1              Multi-protocol file transfer libra
ii  libcxsparse2.2.3 1:3.4.0-1               concise sparse matrix library (com
ii  libfftw3-3       3.2.1-2.1               library for computing Fast Fourier
ii  libfltk1.1       1.1.9-6                 Fast Light Toolkit - shared librar
ii  libfreetype6     2.3.9-5                 FreeType 2 font engine, shared lib
ii  libftgl2         2.1.3~rc5-2             library to render text in OpenGL u
ii  libgcc1          1:4.4.1-4               GCC support library
ii  libgfortran3     4.4.1-4                 Runtime library for GNU Fortran ap
ii  libgl1-mesa-glx  7.5.1-1                 A free implementation of the OpenG
ii  libglpk0         4.38-1                  linear programming kit with intege
ii  libglu1-mesa [li 7.5.1-1                 The OpenGL utility library (GLU)
ii  libgomp1         4.4.1-4                 GCC OpenMP (GOMP) support library
ii  libgraphicsmagic 1.3.5-5.1               format-independent image processin
ii  libgraphicsmagic 1.3.5-5.1               format-independent image processin
ii  libhdf5-serial-1 1.8.3-2.1               Hierarchical Data Format 5 (HDF5) 
ii  libice6          2:1.0.5-1               X11 Inter-Client Exchange library
ii  libjasper1       1.900.1-6               The JasPer JPEG-2000 runtime libra
ii  libjpeg62        6b-15                   The Independent JPEG Group's JPEG 
ii  liblapack3gf [li 3.2.1-1                 library of linear algebra routines
ii  liblcms1         1.18.dfsg-1             Color management library
ii  libncurses5      5.7+20090803-2          shared libraries for terminal hand
ii  libpcre3         7.8-2                   Perl 5 Compatible Regular Expressi
ii  libpng12-0       1.2.39-1                PNG library - runtime
ii  libqhull5        2009.1-1                calculate convex hulls and related
ii  libqrupdate1     1.0.1-1                 Fast updates of QR and Cholesky de
ii  libreadline6     6.0-5                   GNU readline and history libraries
ii  libsm6           2:1.1.1-1               X11 Session Management library
ii  libstdc++6       4.4.1-4                 The GNU Standard C++ Library v3
ii  libtiff4         3.9.1-1                 Tag Image File Format (TIFF) libra
ii  libumfpack5.4.0  1:3.4.0-1               sparse LU factorization library
ii  libwmf0.2-7      0.2.8.4-6.1             Windows metafile conversion librar
ii  libx11-6         2:1.2.2-1               X11 client-side library
ii  libxext6         2:1.0.4-1               X11 miscellaneous extension librar
ii  libxml2          2.7.5.dfsg-1            GNOME XML library
ii  octave3.2-common 3.2.3-1                 architecture-independent files for
ii  texinfo          4.13a.dfsg.1-5          Documentation system for on-line i
ii  zlib1g           1:1.2.3.3.dfsg-15       compression library - runtime

Versions of packages octave3.2 recommends:
ii  gnuplot                       4.2.6-1    A command-line driven interactive 
ii  libatlas3gf-base              3.6.0-24   Automatically Tuned Linear Algebra

Versions of packages octave3.2 suggests:
ii  octave3.2-doc                 3.2.2-2    PDF documentation on the GNU Octav
ii  octave3.2-emacsen             3.2.3-1    Emacs support for the GNU Octave l
ii  octave3.2-headers             3.2.3-1    header files for the GNU Octave la
ii  octave3.2-htmldoc             3.2.2-2    HTML documentation on the GNU Octa
ii  octave3.2-info                3.2.2-2    GNU Info documentation on the GNU 

-- no debconf information





More information about the Pkg-octave-devel mailing list