unsafe caching of .fmt files
Han-Wen Nienhuys
hanwenn at gmail.com
Mon Mar 9 09:38:10 CET 2020
On Sun, Mar 8, 2020 at 11:56 PM Karl Berry <karl at freefriends.org> wrote:
>
> Hi Han-Wen - neither fmt generation nor any other runtime generation has
> ever been parallel-safe. Even if I added locking to mktexfmt (I guess
> you are making use of the dynamic fmt creation), something I am not at
> all anxious to do, the failed simultaneous runs that would result
> doesn't sound like a good outcome for you.
I'm trying to suggest
write fmt to temp file; close
rename temp file to destination
in a parallel situation, this will do double work, but the final
cached file will be correct.
> Instead, I think you need to generate the formats you need before
> starting the parallelism, either with multiple mktexfmt foo.fmt calls or
> fmtutil-user <something> (or fmtutil-sys, but if you want ~/.texlive2019
> to be used instead of /usr/local/texlive/... or whatever, that sounds
> like fmtutil-user), depending on your needs.
Thanks for the advice, but I can work around it. It did cost me an
hour or so to debug, and I am reporting this problem so others don't
have to spend the same amount of time.
--
Han-Wen Nienhuys - hanwenn at gmail.com - http://www.xs4all.nl/~hanwen
More information about the tex-live
mailing list.