# Windows build timeout after success, ps shows "gpg-agent"

Hi,

I have this build https://travis-ci.org/etr/libhttpserver/jobs/579986139 succeeding on Windows (with the shell reporting it as “done” but then not completing the build and failing it.

I saw similar threads (e.g. Build timeout but actually succeeded ) that seem to be referring to the use of Yarn as being a problem. In my case, I am not using Yarn (and just to be sure I am passing the parameter that was supposed to fix but to no avail).

Any way someone has fixed it?

Any background process that’s still running would cause that.

Need to see the diff with a previous process snapshot to pinpoint the culprit, but your process list and earlier commands suggest `bash` background jobs.

I’ve found a bunch of new processes that are there at the end but not at the beginning:

392 0 0 392 ? 0 22:21:35 C:\Windows\System32\svchost.exe
708 4352 4296 2876 ? 197608 22:32:55 /usr/bin/ps
708 4352 4296 2876 ? 197608 22:32:55 /usr/bin/ps
768 0 0 768 ? 0 22:23:33 C:\Windows\System32\wbem\WmiPrvSE.exe
1160 0 0 1160 ? 0 22:21:43 C:\Windows\System32\svchost.exe
1900 0 0 1900 ? 0 22:22:30 C:\Windows\System32\svchost.exe
1936 0 0 1936 ? 0 22:24:44 C:\Program Files\Google\Compute Engine\agent\GCEWindowsAgent.exe
2544 4352 4296 2544 ? 197608 22:32:55 /usr/bin/bash
3556 0 0 3556 ? 0 22:25:50 C:\tools\msys64\usr\lib\gnupg\scdaemon.exe
4360 0 0 4360 ? 0 22:24:59 C:\Windows\System32\dllhost.exe
4700 0 0 4700 ? 0 22:29:36 C:\Program Files\Windows Defender\MpCmdRun.exe
4928 0 0 4928 ? 0 22:25:50 C:\tools\msys64\usr\bin\gpg-agent.exe

From the other threads, I suspect it is the gpg-agent but I am not sure of how this should be terminated in this context not to get the VM complain about it. Are you saying we should just kill it?

#840669 - Need way to avoid agent, or reliable way to kill agent - Debian Bug report logs (the 2nd in Google on “gpg sc-daemon terminate”) suggests

``````gpgconf --kill gpg-agent
``````

That didn’t work but the below did.

``````if [ "\$TRAVIS_OS_NAME" = "windows" ]; then taskkill //F //PID \$(ps -Wla | tr -s ' ' | grep gpg | cut -f2 -d' ') ; fi
``````

A bit violent but works.

Thanks a lot for all the help. Your first answer was correct.