# "exit 0" cannot exit successfully on ARM

**URL:** <https://travis-ci.community/t/exit-0-cannot-exit-successfully-on-arm/5731>\
**Category:** Multi CPU Architecture\
**Tags:** build-env, travis-build, bug\
**Created:** [October 30, 2019, 5:18am UTC](https://travis-ci.community/t/exit-0-cannot-exit-successfully-on-arm/5731 "2019-10-30T05:18:24Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![chendave](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/chendave/32/5328_2.png) [@chendave](https://travis-ci.community/u/chendave)\
**Post date:** [October 30, 2019, 5:18am UTC](https://travis-ci.community/t/exit-0-cannot-exit-successfully-on-arm/5731/1 "2019-10-30T05:18:24Z")

</div>

Hi,

Here is the check in the “before\_install” section, which will check whether the change is doc only, if this is true, it will exit.

```auto
before_install:
  - |
      if ! git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(\.md)|(\.png)|(\.pdf)|(\.html)|^(LICENSE)|^(docs)'
      then
        echo "Only doc files were updated, skip running the CI."
        exit
      fi

```

This is okay on AMD64 when the change is doc only, the travis CI will return successfully, but it will not exit and looks like wait something to output on ARM,

```auto
$ if xxx
  then
    echo "Only doc files were updated, skip running the CI."
    exit 0
  fi
  
Only doc files were updated, skip running the CI.
No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.
Check the details on how to adjust your build configuration on: https://docs.travis-ci.com/user/common-build-problems/#build-times-out-because-no-output-was-received
The build has been terminated

```

I have checked this script inside of the lxd, there is nothing wrong found, I suspect this is a Travis issue.

could anyone take a look at this issue? anyway to workaround the issue?

BR,  
Dave

---

<div class="post-metadata">

**Author:** ![chendave](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/chendave/32/5328_2.png) [@chendave](https://travis-ci.community/u/chendave)\
**Post date:** [October 30, 2019, 5:21am UTC](https://travis-ci.community/t/exit-0-cannot-exit-successfully-on-arm/5731/2 "2019-10-30T05:21:14Z")

</div>

Here is the link of the traivs jobs,  
[https://travis-ci.com/chendave/kubeedge/jobs/250891483](https://travis-ci.com/chendave/kubeedge/jobs/250891483)

but it might be invalid some day after the change in the code base.

---

<div class="post-metadata">

**Author:** ![chendave](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/chendave/32/5328_2.png) [@chendave](https://travis-ci.community/u/chendave)\
**Post date:** [November 1, 2019, 2:38am UTC](https://travis-ci.community/t/exit-0-cannot-exit-successfully-on-arm/5731/3 "2019-11-01T02:38:40Z")

</div>

Is there any one looking into this issue?

---

<div class="post-metadata">

**Author:** ![junaruga](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/junaruga/32/8943_2.png) [@junaruga](https://travis-ci.community/u/junaruga)\
**Post date:** [November 4, 2019, 1:24pm UTC](https://travis-ci.community/t/exit-0-cannot-exit-successfully-on-arm/5731/4 "2019-11-04T13:24:05Z")

</div>

I faced this issue with `exit 1` too.  
How about using `false` command instead of that?

---

<div class="post-metadata">

**Author:** ![BanzaiMan](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/banzaiman/32/67_2.png) [@BanzaiMan](https://travis-ci.community/u/BanzaiMan)\
**Post date:** [November 4, 2019, 9:35pm UTC](https://travis-ci.community/t/exit-0-cannot-exit-successfully-on-arm/5731/5 "2019-11-04T21:35:45Z")

</div>

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:** ![zorrorffm](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/zorrorffm/32/5744_2.png) [@zorrorffm](https://travis-ci.community/u/zorrorffm)\
**Post date:** [November 29, 2019, 6:40am UTC](https://travis-ci.community/t/exit-0-cannot-exit-successfully-on-arm/5731/6 "2019-11-29T06:40:13Z")

</div>

I am facing the same issue which impact my patch merged into OpenSSL project. Any further investigation on this? See travis log in linke : [https://travis-ci.org/openssl/openssl/jobs/617019724?utm\_medium=notification&utm\_source=github\_status](https://travis-ci.org/openssl/openssl/jobs/617019724?utm_medium=notification&utm_source=github_status)

---

<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:** [November 29, 2019, 1:03pm UTC](https://travis-ci.community/t/exit-0-cannot-exit-successfully-on-arm/5731/7 "2019-11-29T13:03:58Z")

</div>

I think it’d be more productive to just outlaw `exit`, or override it to call `travis_terminate`.

Since with ungraceful `exit`, any background activity that may be present (including the logging facility) is not finalized properly, so you cannot guarantee any predictable results anyway.

> <https://github.com/travis-ci/travis-build/pull/1816>

---

<div class="post-metadata">

**Author:** ![zorrorffm](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/zorrorffm/32/5744_2.png) [@zorrorffm](https://travis-ci.community/u/zorrorffm)\
**Post date:** [December 2, 2019, 7:19am UTC](https://travis-ci.community/t/exit-0-cannot-exit-successfully-on-arm/5731/8 "2019-12-02T07:19:05Z")

</div>

Thanks for your explanatin. I will try to replace exit with travis\_terminate.

BTW, whether your patch will take effect for all projects immediately after being merged?

---

<div class="post-metadata">

**Author:** ![szeder](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/szeder/32/3177_2.png) [@szeder](https://travis-ci.community/u/szeder)\
**Post date:** [December 2, 2019, 10:43am UTC](https://travis-ci.community/t/exit-0-cannot-exit-successfully-on-arm/5731/9 "2019-12-02T10:43:45Z")

</div>

> [@native-api](#):
>
> I think it’d be more productive to just outlaw `exit` , or override it to call `travis_terminate` .

I don’t like this idea. What would `(exit 1)` do with the proposed change?

---

<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:** [December 2, 2019, 5:55pm UTC](https://travis-ci.community/t/exit-0-cannot-exit-successfully-on-arm/5731/10 "2019-12-02T17:55:12Z")

</div>

That’s fixable (fixed). Please do a code review in the pull request – that way is more productive to point out and address any flaws in implementation.
