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.
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. Indeed, in this situation, I also suggest that you explicitly disable any mktex* creation. MKTEXFMT=0; export MKTEXFMT; MKTEXTFM=0; export MKTEXTFM; MKTEXMF=0; export MKTEXMF; MKTEXPK=0; export MKTEXPK Alternative: you could set TEXMFVAR or TEXMFSYSVAR to a per-process directory. But then every TeX run will need to create its own .fmt, which sounds like an awful waste of time. --best, karl.