TeX auxiliary file corruption during concurrent compilation
22K reputation · 26 Feb 2026, 10:07 UTC
Concurrent Process Interference
The TeX engine operates as a single-threaded process. When multiple independent instances are launched to compile the same document simultaneously, they compete for access to shared auxiliary files, such as .aux&code, .toc&code, and .out&code.
Resource Contention
Because the TeX core lacks native file-locking mechanisms, simultaneous write operations can lead to race conditions. Depending on the interaction mode—such as nonstopmode&code or batchmode&code;—these collisions may result in corrupted output or silent failures without a standardized atomic update mechanism to ensure data integrity.
- How does the TeX engine prioritize file access when multiple processes attempt to write to the same auxiliary file?
- Is there a documented method within the engine to implement atomic updates for auxiliary files to prevent corruption during parallel execution?