# No debug shell on s390x

**URL:** https://travis-ci.community/t/no-debug-shell-on-s390x/6134
**Category:** Multi CPU Architecture
**Tags:** debug-mode
**Created:** [November 25, 2019, 5:11pm UTC](https://travis-ci.community/t/no-debug-shell-on-s390x/6134 "2019-11-25T17:11:56Z")
**Posts on this page:** 10
**Page:** 1

<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: [November 25, 2019, 5:11pm UTC](https://travis-ci.community/t/no-debug-shell-on-s390x/6134/1 "2019-11-25T17:11:56Z")

</div>

I tried to restart a s390x job in debug mode, but it errored out very early with:

```auto
Setting up debug tools.
cat: write error: Broken pipe
Preparing debug sessions.
/home/travis/.debug/travis_debug.sh: line 42: /home/travis/.debug/tmate: cannot execute binary file: Exec format error

All remaining steps, including caching and deploy, will be skipped.

```

[https://travis-ci.org/szeder/git/jobs/616778307#L40](https://travis-ci.org/szeder/git/jobs/616778307#L40)

---

<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 25, 2019, 8:09pm UTC](https://travis-ci.community/t/no-debug-shell-on-s390x/6134/2 "2019-11-25T20:09:23Z")

</div>

The first step would be to have appropriate [`tmate`](https://github.com/tmate-io/tmate) binaries built.

This can be the start of a long yak shaving; `tmate` uses Alpine docker images to build its binaries, but it also relies on other `apk` packages such as [`zlib` and `ssl`](https://github.com/tmate-io/tmate/blob/5e00bfa5e137e76c81888727712ced2b3fd99f5b/Dockerfile#L6-L9) to be available. My [initial testing](https://travis-ci.org/BanzaiMan/tmate/builds/616858320#L52) suggests to me that some of these packages are not available to Z. And these will have to be resolved before we can offer debug builds.

---

<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: [November 25, 2019, 8:53pm UTC](https://travis-ci.community/t/no-debug-shell-on-s390x/6134/3 "2019-11-25T20:53:16Z")

</div>

You tried to build tmate on arm64, not s390x:

```auto
  - arch: arm64
    env: PLATFORM=s390x

```

[https://travis-ci.org/BanzaiMan/tmate/builds/616858320#L2](https://travis-ci.org/BanzaiMan/tmate/builds/616858320#L2)

---

<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 25, 2019, 8:56pm UTC](https://travis-ci.community/t/no-debug-shell-on-s390x/6134/4 "2019-11-25T20:56:08Z")

</div>

The tests happen on Docker. `arm64` is just the host.

[https://travis-ci.org/BanzaiMan/tmate/builds/616858320#L36](https://travis-ci.org/BanzaiMan/tmate/builds/616858320#L36)

---

<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: [November 25, 2019, 9:23pm UTC](https://travis-ci.community/t/no-debug-shell-on-s390x/6134/5 "2019-11-25T21:23:21Z")

</div>

OK, got it. Thanks for looking into it.

Is arm64 big or little endian?

---

<div class="post-metadata">

### Author: ![Marco](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/marco/32/3441_2.png) [@Marco](https://travis-ci.community/u/Marco)
#### Post date: [November 25, 2019, 9:26pm UTC](https://travis-ci.community/t/no-debug-shell-on-s390x/6134/6 "2019-11-25T21:26:31Z")

</div>

You can use `lscpu` to get the byte order

---

<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: [November 26, 2019, 12:03pm UTC](https://travis-ci.community/t/no-debug-shell-on-s390x/6134/7 "2019-11-26T12:03:36Z")

</div>

`lscpu` reports that arm64 is little endian.

But perhaps this is something worth mentioning in the related documentation?

---

<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: [May 6, 2020, 2:25pm UTC](https://travis-ci.community/t/no-debug-shell-on-s390x/6134/8 "2020-05-06T14:25:12Z")

</div>

We are waiting for the release now.

> <https://github.com/tmate-io/tmate/issues/202>
>
> \#177 added support for these platforms. Can we have a release for these binaries?
> Thank you!

---

<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: [October 21, 2020, 11:55am UTC](https://travis-ci.community/t/no-debug-shell-on-s390x/6134/9 "2020-10-21T11:55:04Z")

</div>

[There is a release now, for Xenial+](https://packages.ubuntu.com/xenial/tmate).

---

<div class="post-metadata">

### Author: ![Rohan-Shinde-98](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/rohan-shinde-98/32/7079_2.png) [@Rohan-Shinde-98](https://travis-ci.community/u/Rohan-Shinde-98)
#### Post date: [September 8, 2021, 6:15am UTC](https://travis-ci.community/t/no-debug-shell-on-s390x/6134/10 "2021-09-08T06:15:20Z")

</div>

I installed the tmate via apt **sudo apt install tmate -y** , but travis-ci fails to create the tmate session on lxd environment.  
I am getting this error on travis-ci **open terminal failed: not a terminal**. Below is the joblink  
[https://app.travis-ci.com/github/Rohan-Shinde-98/test-tmate/builds/236798603](https://app.travis-ci.com/github/Rohan-Shinde-98/test-tmate/builds/236798603)
