Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SignTool.exe Sporadically Fails with Exit Code 1

As part of our build system, we use signtool.exe with a certificate to sign our binaries once they've been built. Occasionally (it's hard to tell when it will strike), the signing fails:

 error MSB3073: The command "C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\bin\signtool.exe" [...] exited with code 1.

According to the MSDN, an exit code of 1 means that there was an error signing the file. I can verify that the file didn't get signed.

I've also noticed that occasionally, the timestamp portion times out with a different error message, albeit that the file still gets signed (without the timestamp).

How can I troubleshoot and fix these seemingly random, inconsistent signature failures?

like image 429
ashes999 Avatar asked Feb 21 '12 16:02

ashes999


2 Answers

I strongly suspect a failing connection to the timestamp server being responsible for occasional failures. Perhaps you check your system event log for lost connections at the time in question.

like image 77
The Chairman Avatar answered Oct 09 '22 05:10

The Chairman


I had the same problem. It happens because MS antimalware process MsMpEng.exe check the binary and don't let anyone access it. To solve the problem, I build binary on RAM disk and it worked.

like image 43
user1309871 Avatar answered Oct 09 '22 05:10

user1309871