[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#575731: marked as done (tex/pdftex -recorder works incorrectly on parrallel TeX runs (race, breaks make -j))



Your message dated Sat, 08 May 2010 21:48:47 +0000
with message-id <E1OArt9-0000om-63@ries.debian.org>
and subject line Bug#575731: fixed in texlive-bin 2009-6
has caused the Debian Bug report #575731,
regarding tex/pdftex -recorder works incorrectly on parrallel TeX runs (race, breaks make -j)
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
575731: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=575731
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: texlive-binaries
Version: 2009-5
Severity: normal
File: /usr/bin/pdftex

Hello,

I use -recorder option in my TeX makefile in order to automatically
generate TeX dependencies (a-la gcc -MD) and discovered that -recorder
does not work correctly for parallel TeX runs. Look e.g. here:

    $ cat 1.tex
    Hello World
    \end

    $ strace tex -recorder 1.tex 2>&1 | grep fls
    open("tex.fls", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 4
    rename("tex.fls", "1.fls")              = 0

    $ strace pdftex -recorder 1.tex 2>&1 | grep fls
    open("pdftex.fls", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 4
    rename("pdftex.fls", "1.fls")           = 0


As can bee seen both tex/pdftex first use intermediate temporary file
(tex.fls / pdftex.fls) and only then rename it to $(jobname).fls

So the problem here is that when I try to compile both 1.tex and 2.tex
_simultaneously_ (e.g. through make -j2) there is a good chance that
both tex runs will open the same pdftex.fls and then oops, resulting
.fls will be wrong.

texk/web2c/lib/openclose.c suggests mkstemp would be a better option
instead of using intermediate <program>.fls :

    /* Helpers for the filename recorder... */
    /* Start the recorder */
    static void
    recorder_start(void)
    {
        /* Alas, while we might want to use mkstemp it is not portable.
           So we have to be content with using a default name... */
        string cwd;
    
        recorder_name = (string)xmalloc(strlen(kpse_program_name)+5);
        strcpy(recorder_name, kpse_program_name);
        strcat(recorder_name, ".fls");

    ...


    /* Change the name of the recorder file. */
    void
    recorder_change_filename (string new_name)
    {
       if (!recorder_file)
         return;
       rename(recorder_name, new_name);
       free(recorder_name);
       recorder_name = xstrdup(new_name);
    }


but I wonder, why use intermediate file for recorder at all? Why not to
open $(jobname).fls in the first place?


Thanks,
Kirill


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

Kernel: Linux 2.6.32.10-roro (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages texlive-binaries depends on:
ii  libc6                   2.10.2-6         Embedded GNU C Library: Shared lib
ii  libfontconfig1          2.8.0-2          generic font configuration library
ii  libfreetype6            2.3.11-1         FreeType 2 font engine, shared lib
ii  libgcc1                 1:4.4.2-9        GCC support library
ii  libkpathsea5            2009-5           TeX Live: path search library for 
ii  libncurses5             5.7+20100313-1   shared libraries for terminal hand
ii  libpng12-0              1.2.43-1         PNG library - runtime
ii  libpoppler5             0.12.2-2         PDF rendering library
ii  libstdc++6              4.4.2-9          The GNU Standard C++ Library v3
ii  libx11-6                2:1.3.3-2        X11 client-side library
ii  libxaw7                 2:1.0.7-1        X11 Athena Widget library
ii  libxmu6                 2:1.0.5-1        X11 miscellaneous utility library
ii  libxpm4                 1:3.5.8-1        X11 pixmap library
ii  libxt6                  1:1.0.7-1        X11 toolkit intrinsics library
ii  tex-common              2.07             common infrastructure for building
ii  zlib1g                  1:1.2.3.4.dfsg-3 compression library - runtime

texlive-binaries recommends no packages.

texlive-binaries suggests no packages.

-- no debconf information



--- End Message ---
--- Begin Message ---
Source: texlive-bin
Source-Version: 2009-6

We believe that the bug you reported is fixed in the latest version of
texlive-bin, which is due to be installed in the Debian FTP archive:

libkpathsea-dev_2009-6_amd64.deb
  to main/t/texlive-bin/libkpathsea-dev_2009-6_amd64.deb
libkpathsea5_2009-6_amd64.deb
  to main/t/texlive-bin/libkpathsea5_2009-6_amd64.deb
texlive-bin_2009-6.diff.gz
  to main/t/texlive-bin/texlive-bin_2009-6.diff.gz
texlive-bin_2009-6.dsc
  to main/t/texlive-bin/texlive-bin_2009-6.dsc
texlive-binaries_2009-6_amd64.deb
  to main/t/texlive-bin/texlive-binaries_2009-6_amd64.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 575731@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Norbert Preining <preining@debian.org> (supplier of updated texlive-bin package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Sat, 01 May 2010 02:17:20 +0900
Source: texlive-bin
Binary: texlive-binaries libkpathsea5 libkpathsea-dev
Architecture: source amd64
Version: 2009-6
Distribution: unstable
Urgency: high
Maintainer: Debian TeX Maintainers <debian-tex-maint@lists.debian.org>
Changed-By: Norbert Preining <preining@debian.org>
Description: 
 libkpathsea-dev - TeX Live: path search library for TeX (development part)
 libkpathsea5 - TeX Live: path search library for TeX (runtime part)
 texlive-binaries - Binaries for TeX Live
Closes: 575731 577684
Changes: 
 texlive-bin (2009-6) unstable; urgency=high
 .
   [ Frank Küster ]
   * include a patch that allows texconfig to handle more default paper
     settings.  This is intended to be submitted upstream, and to be used
     to address #402994 (libpaper integration) [fk]
 .
   [ Norbert Preining ]
   * include (lost) man pages for texconfig-dialog, devnag, bibtex8,
     omfonts, otangle, pdfopen (no bug, but see #574796)
   * add a patch upstream-web2c-tmpfilewithpid that fixes overwriting
     files with -recorder in parallel builds (Closes: #575731).
   * bump standards version to 3.8.4, no changes necessary
   * bump build-dep on libpoppler to 0.12.4 (against my will!!)
     (Closes: #577684)
   * Fix CVE-2010-1440: this overrides the incomplete fix for CVE-2010-0793.
 .
   [ Security Team ]
   Fixed in 2009-5+nmu1
   * Fix CVE-2010-0827: buffer overflow in dvips (virtualfont.c).
Checksums-Sha1: 
 c8413be264470e60659b0d4fe3c92b81d3f19924 1379 texlive-bin_2009-6.dsc
 695749780f05636addf26bc72bdc7dbc49172ed3 69377 texlive-bin_2009-6.diff.gz
 7cc6a527360a80b4d5a3f7965d09ae633bad0315 8081050 texlive-binaries_2009-6_amd64.deb
 7e4c706da93e4c82f4a3c76edd521508824e7854 134308 libkpathsea5_2009-6_amd64.deb
 e116218a4473d3fc790c278962abd610500c6f9a 178024 libkpathsea-dev_2009-6_amd64.deb
Checksums-Sha256: 
 34a6831664c7adbfe812c5fb795ba70716fd9a31d23321a9b529892507aaa7e0 1379 texlive-bin_2009-6.dsc
 42afd7cd31067c2e5bf2b97f7053342da70e58a2f811115f2ad3772a9ae0f34a 69377 texlive-bin_2009-6.diff.gz
 7bf2f4ae5fbe10ac8168c735e8334116e67c22accf4a0b5f3dba5b72d52e4690 8081050 texlive-binaries_2009-6_amd64.deb
 fbeef0044700345e30123937f84a080cb630811668893ada1150fa2ad8ce5da2 134308 libkpathsea5_2009-6_amd64.deb
 7ab4ddca643da1034b6d9487f8756307a6b6b7ec71e314ae2b9d1974bb9b7e01 178024 libkpathsea-dev_2009-6_amd64.deb
Files: 
 6b7284c7965220ce4b1948a448d3afab 1379 tex optional texlive-bin_2009-6.dsc
 20a1131a7d389bc9c9da18bc27d55254 69377 tex optional texlive-bin_2009-6.diff.gz
 19ac1a42ec14cbf919149cd3766340f1 8081050 tex optional texlive-binaries_2009-6_amd64.deb
 9aa548b384d3a699528ebf37619da6e0 134308 libs optional libkpathsea5_2009-6_amd64.deb
 51254a5627e273a637fd8c5cf0c4c1b5 178024 libdevel optional libkpathsea-dev_2009-6_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iD8DBQFL2x490r9KownFsJQRAu7UAJ4/p1lnga5/KjvV3AqfL88Zg+xDmQCeMi0p
iMKSAC6ledjygw+jWO9PWwk=
=M4W0
-----END PGP SIGNATURE-----



--- End Message ---

Reply to: