Code inspection build time varies from time to time for same code
Answered
We have a code inspection build that some times finishes after less than 2 minutes and some times after more than 10 minutes.
The comparison is of course done on same agent and same code (unchanged from run to run) :
long run log :
short run log :
and last runs log (some have a little code change , but we can easily see the runtime varies way too much) :
Any pointers of figuring out why this is happening (i guess its not normal) ?
Please sign in to leave a comment.
Hello,
Am I correct to assume you are using Inspections build step here? If yes, could you please enable the debug output (see this section for the details), get two builds where the execution time deviates in a similar fashion, and share the
from the hidden artifacts of both builds? A screenshot below has details on where to find the hidden artifacts for a build:
Thanks for your answer.
I cant really attach the whole log file you asked since it contains too much info about our code.
Attached are the 2 final lines of each log file :
I looked for other changes between the files , except file analyze order between the files , could not found any difference.
I think i found the log of the problem in the build log in TC after enabling the debug output you requested.
On the long build :
Hello!
Sorry for the delayed response here; I have reached out internally to check on the issue above. Could you please upload two resulting logs (for long and short executions) to the https://uploads.jetbrains.com? The service allows to share the data in a private manner, so only JetBrains employees would be able to access that. If that works for you, you could share the upload ID with me so I`ll check with the tool developers further.
Just as a quick follow-up; it may be related to the caches of InspectCode which is used under the hood for this runner. They should be saved at the below path:
You could try to remove the contents of this folder and run the inspections step on the same agent to see if the step always runs for 10 minutes when caches are missing.
Hi,
Thanks for your replies.
I tried clearing the folder :
And run again.
Some new inspection warning popped up (I guess the files were skipped because of the cache) but unfortunately still from time to time the same "wait" problem pops up.
As for uploading full log , i doubt I'll get permission for this but I'll will try.
Thanks for the help so far.
Hello!
Thank you for the update! Just as a quick follow-up, I have meant to check if the longer execution always happens when the caches were cleared prior to the execution (which would prove that they are related to the issue).
Hi ,
I just run the build 5 times and cleared the cache folder and all builds took long time and contained the "TaskBarrier.WaitAll" wait/error on the log.
Thanks for your efforts so far , please let me know if you need anything else (except the full log , if you can point me to a specific part of it i can maybe filter it so it will not contain too much information).
Hello,
Thank you for the update! Just got a word from the development team of the InspectCode tool; unfortunately, we would need the full logs in order to be able to assist further. Is there any chance you could truncate sensitive data (class/method names, et cetera) out of the log files?
Hi, took a little while but i managed to upload the logs to your service.
Upload id: 2021_07_21_SGHSRBwH4CG7Ubgx (files: short.log, long.log)
It contains 2 files , long.log is the long running log , short.log is the short running build (without the error i pointed on earlier post).
Thanks for your help so far , please let me know if you need anything else.
Hello,
Thank you for the data provided! I have reached out to the InspectCode team and will keep you posted on the results.
Hi
Any updates ? any more information needed from our side to help resolve this problem ?
Thanks.
Hello!
Unfortunately, nothing to report yet - InspectCode team is still looking into the problem. All I know so far is that it is an issue with C++ part of the InspectCode. The data you have provided should be sufficient for the investigation, but I will definitely let you know when there is an update, or if any extra details are needed.
Hello!
Just got a word from the InspectCode team; could you please let me know if the latest log you have shared was taken when the caches were cleared manually, or if it has occurred on its own? If possible, may I ask you to:
1) set up an extra step which would print out the contents of
resursively (for example, via dir /s command);
2) collect a "long" run log when it occurs on its own?
The issue is now registered as a bug: https://youtrack.jetbrains.com/issue/RSRP-485566; may I suggest to move our discussion there so the development team is able to see any updates immediately?
About the attached log , i am quite sure i did not clear the caches manually , no special action was taken.
You did not specify if i should add the extra step before inspect code or after , for now i will add step both before and after and wait for "long running" build to happen.
Uploaded long2.txt under attachment id 2021_08_17_J1UcrSF2bdh3Vhet.
It contains dir /s output before and after a "long" run.
Also updated on youtrack link.
The title there is "C++ symbol caches are corrupted, which causes the whole caches rebuilt." , just to be clear our code does not contain c++ code (maybe inspectcode.exe does)
If the cache is indeed the problem , is there a command line parameter to use to avoid using it at all ?
Is it similar to deleting the cache directory previously mentioned before running ?
Uploaded another log , attachment id 2021_08_17_2FgbazWM562eS7oT
This is a build log after clearing the cache folder before running.
Hello,
Thank you a lot! I have reached out to the development team with the data, and as soon as there is an update, it will be posted on the RSRP-485566.