Spurious file errors on script running many wine processes

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
janw
Newbie
Newbie
Posts: 2
Joined: Tue Jun 15, 2021 2:31 am

Spurious file errors on script running many wine processes

Post by janw »

I build SWI-Prolog (https://www.swi-prolog.org) for Windows using the MinGW cross-compiler from a Docker container. This container also contains wine to run the (many) build steps that run the cross-compiled Prolog binary (swipl.exe). The build is configured using CMake and executed using Ninja. As a result there are bursts when Ninja starts lots of `wine swipl.exe arg ...` There are also moments that all active build steps involve other programs.

About half the times all works fine, but the other half swipl.exe reports a file missing or a permission error opening some file (for reading). Both are clearly wrong. The concerned files have been created much earlier in the build process and their permission is fine and is not changed. In fact, earlier runs of swipl.exe already used the very same file.

My working hypothesis is that I might be dealing with some race condition that concerns wineserver. Does this make sense? I tried to work around that by having the docker command run

wineserver -p && cmake option .. && ninja

But strangely enough that causes the whole build to hang when it starts running swipl.exe. Using wineserver -p60 causes the build to hang for a minute and then continue (leading to the same issues as above).

Are there any known problems or reasons to suspect wine to fail for this scenario? Any hints for debugging or work-around?
janw
Newbie
Newbie
Posts: 2
Joined: Tue Jun 15, 2021 2:31 am

Re: Spurious file errors on script running many wine processes

Post by janw »

Quick update: running `ninja -j 1`, making the build only run one process at a time seems to "fix" the problem. Ten builds succeeded without errors. Only takes 45 mins per build, which is a pity as the machine has 12 cores :(
Locked