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

**URL:** <https://travis-ci.community/t/windows-build-timeout-after-success-ps-shows-gpg-agent/4967>\
**Category:** Windows\
**Tags:** bug\
**Created:** [September 2, 2019, 10:10pm UTC](https://travis-ci.community/t/windows-build-timeout-after-success-ps-shows-gpg-agent/4967 "2019-09-02T22:10:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![etr](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/etr/32/1221_2.png) [@etr](https://travis-ci.community/u/etr)\
**Post date:** [September 2, 2019, 10:10pm UTC](https://travis-ci.community/t/windows-build-timeout-after-success-ps-shows-gpg-agent/4967/1 "2019-09-02T22:10:10Z")

</div>

Hi,

I have this build [https://travis-ci.org/etr/libhttpserver/jobs/579986139](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](https://travis-ci.community/t/build-timeout-but-actually-succeeded/2763/3) ) 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?

---

<div class="post-metadata">

**Author:** ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)\
**Post date:** [September 2, 2019, 10:20pm UTC](https://travis-ci.community/t/windows-build-timeout-after-success-ps-shows-gpg-agent/4967/2 "2019-09-02T22:20:17Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![etr](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/etr/32/1221_2.png) [@etr](https://travis-ci.community/u/etr)\
**Post date:** [September 2, 2019, 11:15pm UTC](https://travis-ci.community/t/windows-build-timeout-after-success-ps-shows-gpg-agent/4967/3 "2019-09-02T23:15:46Z")

</div>

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  
1608 0 0 1608 ? 0 22:24:57 C:\Program Files\Google\Compute Engine\vss\GoogleVssAgent.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?

---

<div class="post-metadata">

**Author:** ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)\
**Post date:** [September 2, 2019, 11:51pm UTC](https://travis-ci.community/t/windows-build-timeout-after-success-ps-shows-gpg-agent/4967/4 "2019-09-02T23:51:56Z")

</div>

[#840669 - Need way to avoid agent, or reliable way to kill agent - Debian Bug report logs](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=840669) (the 2nd in Google on “gpg sc-daemon terminate”) suggests

```auto
gpgconf --kill gpg-agent

```

---

<div class="post-metadata">

**Author:** ![etr](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/etr/32/1221_2.png) [@etr](https://travis-ci.community/u/etr)\
**Post date:** [September 3, 2019, 1:14am UTC](https://travis-ci.community/t/windows-build-timeout-after-success-ps-shows-gpg-agent/4967/5 "2019-09-03T01:14:29Z")

</div>

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.
