Closed wilfwilson closed 1 year ago
The GitHub Actions job uses macOS 11. On my own computer, which runs macOS 12, I do not have any problem.
This basically fails 90% of the time right now :-(.
@ChrisJefferson any idea what might be causing this?
Ohhhh, OK, so we do ForAll([1..3000], x -> IO_SendStringBackground(f, "cheese"));
where f
refers to /dev/null
. And IO_SendStringBackground
forks, and then does IO_IgnorePid
-- but we can only "ignore" 1024 PIDs at a time. If the processes terminate quickly enough, that's fine, but if we spawn them faster than they die off, it is easy to see how this test could overflow that table.
So we could just reduce the 3000 to 1024 (or a bit smaller, to be safe). But perhaps @ChrisJefferson intentionally wanted to "overflow" the 'ignore pid' list??? but how is that supposed to work?
We could also sleep a little bit after each call to IO_SendStringBackground
in that test, to increase the chance that the forked jobs can finish in time. But on a machine under heavy load (such as a CI VM...) this would still have a chance of breaking...
Looking back, I think various tests were designed to check we "clean up" properly -- of course if we go too fast I can see how things won't get cleaned up properly.
I'd prefer fixing the failures, we could hypothetically make another test to check if things are "cleaned up" properly, which would probably have to have a bunch of 'waits' in it, to try to make sure the OS is given the chance to clean up. finished processes.
Example 1, Example 2: