TeamCity Agent is not cancelling the VCS (p4.exe) of is sync, creating next job Failed to start.
Hi,
During a build configuration that we have a vcs attach that need to be clean build on each build (ex: preflight) , if during the updating sources step we have a cancel, the next build COULD (we are not to reproduce it 100%) Failed to start.
We monitor and the only thing we found is that in our case the VCS is p4.exe that is running. And we see that even the agent have cancel the job and that in Teamcity UI the job is stop and cancel. The p4.exe is still running his sync in background.
It's seems that the agent don't want to kill p4 to not corrupt file or whatever reason.. and it's not waiting that the sync is done neither before taking another job.
So this result that we can experiment a sync is not done yet, but another job start from the agent that can try to delete files OR the agent is try to check the consistency of the work folder attach to the vcs and failed to start.
All this is done before any of our step in the build configuration between "Starting the build on the agent..." and "Updating sources: auto checkout" and "Resolving artifact dependencies".
Did you experiment this type of test? Are you aware of this type of issues? Do we have a way to workaround or adding a safety on it?
Thanks
Markus Gauthier
Lead Build and Release Specialist at Ubisoft.
Please sign in to leave a comment.
Hi.. any update on this post please?
Hello Markus,
Actually, this looks like a bug in the process of build cancelling. We had such an issue before but it should have been fixed (https://youtrack.jetbrains.com/issue/TW-16389). Could you please create a bug request in our tracker and provide logs from the buildAgent/log directory for the agent where p4.exe failed to exit? We will need logs for the timeframe of the corresponding build.
Thank you,
Hello Kirill,
We didn't had the situation again, but we wanted to confirm if it's normal that the p4.exe is still synching even if we have a cancel job on the agent?
but your 2 ticket seems really to have exactly the behavior you seems to have fix (https://youtrack.jetbrains.com/issue/TW-34890) . Since you fix it in 2014, we are using version p4 2018.2, is it possible some stuff change from Perforce team that your fix not working after 4 year for any reason?
If it happen again we will try to keep you the log to create the bug ticket.
thanks,
Hello Markus,
I don't think changes made by Perforce team could affect the behaviour of TeamCity.
The situation when p4.exe remains running after build cancellation is not normal, as build stop should stop all build-oriented processes.
I suggest that if you notice such a situation again, collect logs from the bulid agent and create a bug report in our issue tracker. There could be a regression.
Kind regards,