# Non-AMD64 builds timing out if script: does exit 0

**URL:** <https://travis-ci.community/t/non-amd64-builds-timing-out-if-script-does-exit-0/10996>\
**Category:** macOS\
**Created:** [January 8, 2021, 9:50pm UTC](https://travis-ci.community/t/non-amd64-builds-timing-out-if-script-does-exit-0/10996 "2021-01-08T21:50:37Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![guyharris](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/guyharris/32/6000_2.png) [@guyharris](https://travis-ci.community/u/guyharris)\
**Post date:** [January 8, 2021, 9:50pm UTC](https://travis-ci.community/t/non-amd64-builds-timing-out-if-script-does-exit-0/10996/1 "2021-01-08T21:50:37Z")

</div>

For [tcpdump](https://github.com/the-tcpdump-group/tcpdump) and [libpcap](https://github.com/the-tcpdump-group/libpcap), we’re using the Travis CI integration stuff for Coverity.

Both projects have a build matrix testing with several different options on several platforms, including Linux on AMD64, ppc64le, s390x, and Arm64, as well as macOS on AMD64.

The build script in our .travis.yml file doesn’t need to run for Coverity builds, so it beings with

```
- if ["$COVERITY_SCAN_BRANCH" = 1]; then exit 0; fi

```

The coverity\_scan branch builds on Linux/AMD64 and macOS/AMD64 are succeeding (most of them do nothing, because our Coverity script stops them early; we only need one cell of the matrix to do a Coverity build). However all the non-AMD64 Linux builds terminate with “No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.”

I did a test in which I added

```
- if ["$COVERITY_SCAN_BRANCH" = 0]; then exit 0; fi

```

to libpcap’s script; the Linux/AMD64 and macOS/AMD64 master branch builds succeeded (doing nothing, as would be expected), and the ppc64le and s390x Linux builds failed (I cancelled the build before the Arm64 builds were run). See the build at [Travis CI - Test and Deploy Your Code with Confidence](https://travis-ci.org/github/the-tcpdump-group/libpcap/builds/753516381).

Those builds do _not_ fail without that “exit 0”, as per, for example, the build at [Travis CI - Test and Deploy Your Code with Confidence](https://travis-ci.org/github/the-tcpdump-group/libpcap/builds/753524864).

Is there something we’re doing wrong, or is this a bug in the non-AMD64 Linux build infrastructure?

---

<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:** [January 9, 2021, 1:03am UTC](https://travis-ci.community/t/non-amd64-builds-timing-out-if-script-does-exit-0/10996/2 "2021-01-09T01:03:00Z")

</div>

> [@"exit 0" cannot exit successfully on ARM](https://travis-ci.community/t/exit-0-cannot-exit-successfully-on-arm/5731/5):
>
> We’ve confirmed the issue, and at the moment, are not clear as to what causes it. It seems, however, using the helper function travis\_terminate 1 (or whatever the code) seems to work.

---

<div class="post-metadata">

**Author:** ![guyharris](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/guyharris/32/6000_2.png) [@guyharris](https://travis-ci.community/u/guyharris)\
**Post date:** [January 9, 2021, 7:15pm UTC](https://travis-ci.community/t/non-amd64-builds-timing-out-if-script-does-exit-0/10996/3 "2021-01-09T19:15:56Z")

</div>

> using the helper function travis\_terminate 1 (or whatever the code) seems to work.

However, it seems to be _causing_ the problem to occur on macOS builds, as per, for example, [this build](https://travis-ci.org/github/the-tcpdump-group/tcpdump/jobs/753653361)

---

<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:** [January 9, 2021, 8:43pm UTC](https://travis-ci.community/t/non-amd64-builds-timing-out-if-script-does-exit-0/10996/4 "2021-01-09T20:43:41Z")

</div>

[WFM.](https://travis-ci.com/github/native-api/tcpdump/builds/212566052) Looks like smth else is hanging or [Build delays for open source project - #26 by native-api](https://travis-ci.community/t/build-delays-for-open-source-project/10272/26)

Try tracing like I did:

```auto
env:
  global:
    - "PS4='+(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'"
script:
  - set -x; <command>
 # you will see trace from both your commands and Travis machinery
  <...>
  - set +x # once you no longer want to see trace

```

---

<div class="post-metadata">

**Author:** ![guyharris](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/guyharris/32/6000_2.png) [@guyharris](https://travis-ci.community/u/guyharris)\
**Post date:** [January 9, 2021, 10:14pm UTC](https://travis-ci.community/t/non-amd64-builds-timing-out-if-script-does-exit-0/10996/5 "2021-01-09T22:14:31Z")

</div>

For what it’s worth, doing

```
- if ["$COVERITY_SCAN_BRANCH" = 1]; then if ["$TRAVIS_OS_NAME" = linux]; then travis_terminate 0; else exit 0; fi; fi

```

fixed it, as per [this build](https://travis-ci.org/github/the-tcpdump-group/libpcap/builds/753729561).

I’ll try removing that and putting the debugging stuff in next.

---

<div class="post-metadata">

**Author:** ![guyharris](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/guyharris/32/6000_2.png) [@guyharris](https://travis-ci.community/u/guyharris)\
**Post date:** [January 15, 2021, 11:23pm UTC](https://travis-ci.community/t/non-amd64-builds-timing-out-if-script-does-exit-0/10996/6 "2021-01-15T23:23:20Z")

</div>

> I’ll try removing that and putting the debugging stuff in next.

So here’s [a macOS build, with the debugging stuff, that failed](https://travis-ci.org/github/the-tcpdump-group/libpcap/jobs/753737098).

---

<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:** [January 16, 2021, 12:11am UTC](https://travis-ci.community/t/non-amd64-builds-timing-out-if-script-does-exit-0/10996/7 "2021-01-16T00:11:26Z")

</div>

Okay, this does show that it’s `exit` that hangs (or rather, the job termination sequence it seems).

Since it’s .org, I suggest

> [@Build delays for open source project](https://travis-ci.community/t/build-delays-for-open-source-project/10272/26):
>
> As was pointed out in [Builds hang in queued state - #6 by Montana](https://travis-ci.community/t/builds-hang-in-queued-state/10250/6) linked to earlier in this topic, Travis is moving workers from [travis-ci.org](http://travis-ci.org) to [travis-ci.com](http://travis-ci.com) in preparation to fully close .org (or rather, make it read-only) around the New Year. So you need to migrate to .com to stop experiencing delays. Note the caveats:

since [MacOS builds on .org also show other malfunctions](https://travis-ci.community/t/ruby-2-0-2-3-fails-to-install-at-macos-10-13/11024/2).

---

<div class="post-metadata">

**Author:** ![guyharris](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/guyharris/32/6000_2.png) [@guyharris](https://travis-ci.community/u/guyharris)\
**Post date:** [January 16, 2021, 12:47am UTC](https://travis-ci.community/t/non-amd64-builds-timing-out-if-script-does-exit-0/10996/8 "2021-01-16T00:47:24Z")

</div>

So if, for example, libpcap/tcpdump apply, as an open-source project, for build credits, that’s not a one-time chunk of credits that would force us, once those credits are used, we’d have to join a not-for-free tier, right? Instead, there would be a fixed number of builds that can be done over a certain time period, rather than a fixed number of builds ever?

---

<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:** [January 16, 2021, 1:08am UTC](https://travis-ci.community/t/non-amd64-builds-timing-out-if-script-does-exit-0/10996/9 "2021-01-16T01:08:11Z")

</div>

Check out

> [@.org -\> .com migration unexpectedly comes with a plan change for OSS. What exactly is the new deal?](https://travis-ci.community/t/org-com-migration-unexpectedly-comes-with-a-plan-change-for-oss-what-exactly-is-the-new-deal/10567):
>
> Oh hey though. I just realized, it turns out that open source will no longer be offered free service on [travis-ci.com](http://travis-ci.com) either. In case some of you had missed the announcement. I had realized my builds stopped working on .org [1] , and was moving them all over to .com – where they started working as expected again – but I hadn’t realized that was just buying me a tiny bit of time. It looks like legacy open source accounts on .com will get a certain number of hours credit, and after those are…

for this info.
