Thread was being aborted

Lately I have been encountering crashes during running actions, usually it’s python. It’s executed late in build process, too many logs ?

I don’t see any event log entries for this.

Even though action itself finishes with success, this error at the beginning of the script is shown, script finished and action is set to failed.

I believe we have found a possible cause for this - and a fix - however it’s going to take a while to figure out a test scenario for this - we need to be able to reproduce it so we can confirm the fix.

any progress on this issue ?

We have not been able to reproduce this here, however we have been testing a potential fix for this - so far we have not seen any side effects. The fix will be in the next update (next week).

I think we figured out what the problem is. Last night for 20 builds, 15 failed with this error so we started to investigate. It seems the culprit is the import of junit to Continua.

Before we use Continua action to load junit (which a blocking action), but now we use custom message in python script [@@continuacontinuacontinuacontinua[importUnitTestResults]. Before it took a long time (even couple of minutes) as we have around 20k of testcases. Right now from script perspective it takes 0s, as it’s only “logged”, so it moves on, but probably a thread is created for the import. Then when the stage ends (last action) I think you are terminating any still existing threads and that’s where it crashes.

P.S. On closer look, it crashes on ending the same action not stage. So python script executes tests, logs this custom messages, then exits, this crashes the thread.

Nice catch, this does sound like a possible cause. We’ll investigate.

Are there any events in the continua eventlog for these errors? If so and they have a stack trace can you send it to us.

After further investigation, it looks like this is fixed by the changes we made a few weeks ago. We did some more work on this today, adding some more unit testing around the offending code.

The issue was that the I/O threads that handle process output were timing out before the process was done - that was causing the ThreadAborted exception.

https://downloads.finalbuilder.com/downloads/continua/1.9.2/ContinuaCI.Server.Setup_x64_1.9.2.1718.exe

https://downloads.finalbuilder.com/downloads/continua/1.9.2/ContinuaCI.Agent.Setup_x64_1.9.2.1718.exe

You will need to update your agents.

I did not see any events for this, also, this error message was actually presented in last action of the stage.

When do you plan official release ?

Probably next week - unless anything comes up between now and next week, that will be the build that gets released.

do you know when official release will be done ?

The plan is to do an official release tomorrow

Official release is out - v1.9.2.2022

Hopefully this will resolve the issue you are seeing.