Script succeeded, but build is still running until it times out (+10min)

My script section finished (exited with 0), but Travis was still thinking that build is running and job was spinning for 10 more minutes until it was killed because there was no new output.

The job took almost 9 minutes, and it was killed after 18min 51sec (so +10min).

Can I change something in script section to prevent this, or this is a bug in Windows worker?

I’ve observed the same issue, but I’m not sure if my build fails during the caching step or afterwards:

This looks a lot like this issue: Build doesn't finish after completing tests.

Your build starts a subprocess that doesn’t get reaped when the build ends.