We took a look into this issue. Let me please share our observations:
Issue happens with always with the same job (CI_JOB_NAME=x86_64-mingw).
AppVeyor build worker image was last updated before this started happening.
There are no specific Hyper-V node where it happens.
External dependency downloaded are the same between recent "green" and "red" jobs.
Per my understanding exit code 259 means that caller started child process, and exiting without waiting that child process to complete, as described in this discussion.
AppVeyor interprets any exit code other than zero as error.
It can be that some external dependency specific to this CI_JOB_NAME=x86_64-mingw changed. Those two builds which mention are the first ones who failed this way? Can you think of specific downloadable dependency to check?
As a workaround you can catch exit code 259 and return 0 as 259 is not really a failure.
Side note: we recently implemented RE-RUN INCOMPLETE button so you can rerun build failed this way and only failed and cancelled jobs will be executed.
Hm interesting, thanks for the info! Since this is a spurious error, it may also be the case that a previous update to the image didn't show up until now. Looking more into this though, we print the "test run finished successfully" message at the end, and then the sequence of events are:
The Python interpreter which ran the whole test suite exits, hopefully with error code 0
An invocation of sh -x -c "$FOO" is now unblocked that $FOO (the python interpreter) has exited
An invocation of bash src/ci/run.sh is then unblocked as the CI run script exits
After that, control is yielded back to AppVeyor as we don't have any further items configured in the test_script section of our appveyor.yml.
The three components which are reaping processes after the success message is printed are sh.exe, bash.exe, and AppVeyor's runner as well (I think maybe cmd.exe for us?). It's probably not a bug in cmd.exe, so this may just be a bug in sh.exe or bash.exe which we haven't ever run into before.
I think we're using sh.exe and bash.exe from the environment by putting C:\msys64\usr\bin, do you know if those have changed at all recently?
Apart from that I'm not really sure where this could be showing up :(. AFAIK nothing we download could have changed to have caused this, but I've been wrong before!
My apologies, missed this message. Do you still have this issue? Did it happen during last day (asking in hope that recent update somehow fixed it)? And can you try to use C:\Program Files\Git\usr\bin\sh.exe (which is default on AppVeyor image) to execute run.sh.
Sorry for "try this and that" approach -- It is the kind of issue we have no clear idea...