Bug 437008 - fmtutil can easily loop upon a misconfiguration
Summary: fmtutil can easily loop upon a misconfiguration
Alias: None
Product: Fedora
Classification: Fedora
Component: texlive
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Jindrich Novy
QA Contact: Fedora Extras Quality Assurance
: 431516 (view as bug list)
Depends On:
Blocks: F9Beta
TreeView+ depends on / blocked
Reported: 2008-03-11 16:43 UTC by Stepan Kasal
Modified: 2013-07-02 23:27 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2008-03-12 17:17:42 UTC

Attachments (Terms of Use)
proposed patch (673 bytes, patch)
2008-03-11 16:43 UTC, Stepan Kasal
no flags Details | Diff

Description Stepan Kasal 2008-03-11 16:43:45 UTC
Description of problem:
automatic format generation (mktexfmt, which is just a symlink to fmtutil these
days) can easily get into in infinite loop and fork new and new processes.
It should abort with an error.

Version-Release number of selected component (if applicable):

To Reproduce:
# mv /usr/share/texmf/tex/latex/latexconfig/latex.ini{,.hide}
# rm /var/lib/texmf/web2c/pdftex/{xml,la}tex.fmt
# fmtutil-sys --byfmt xmltex 2>&1|less

The output looks like this:

fmtutil: running `pdftex -ini   -jobname=xmltex -progname=xmltex &latex
xmltex.ini' ...
This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6) (INITEX)
 %&-line parsing enabled.
kpathsea: Running mktexfmt latex.fmt
Sorry, I can't find the format `latex.fmt'; will try `xmltex.fmt'.
kpathsea: Running mktexfmt xmltex.fmt
fmtutil: running `pdftex -ini   -jobname=xmltex -progname=xmltex &latex
xmltex.ini' ...

Observe that the last verse of the song is exactly the same as the first one:
yes, we are there.

Expected results:
The script should display some politically ioncorrect sentences to express
clearly that it does not feel happy ... and then _quit_.

Comment 1 Stepan Kasal 2008-03-11 16:43:45 UTC
Created attachment 297639 [details]
proposed patch

Comment 2 Jindrich Novy 2008-03-12 17:17:42 UTC
Applied, thanks!

Comment 3 Jesse Keating 2008-03-12 18:31:45 UTC
Putting this on the beta tracker, just for keeping people on the same page. 
Requesting it goes in the beta.

Comment 4 Jindrich Novy 2008-03-12 18:38:20 UTC
*** Bug 431516 has been marked as a duplicate of this bug. ***

Comment 5 Stepan Kasal 2008-03-19 18:32:52 UTC
... and I can proudly announce that Karl Berry accepted this fix for the
upstream TeXlive.  :-)

Note You need to log in before you can comment on or make changes to this bug.