Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation fault when running (make) localnet-start on linux/arm64 (Apple M1 Chip) #10258

Closed
4 tasks
9M6 opened this issue Sep 29, 2021 · 1 comment · Fixed by #10279
Closed
4 tasks

Segmentation fault when running (make) localnet-start on linux/arm64 (Apple M1 Chip) #10258

9M6 opened this issue Sep 29, 2021 · 1 comment · Fixed by #10279

Comments

@9M6
Copy link
Contributor

9M6 commented Sep 29, 2021

Summary of Bug

When building a docker image on a Macbook with M1 Chipset (arm64 arch), the built image and binary does not
run correctly and ocassionaly would run into a qemu: uncaught target signal 11 (Segmentation fault) - core dumped

Version

v0.44.0

Steps to Reproduce

  1. Macbook Pro with M1 Chip
  2. make localnet-start
  3. Output Error

qemu: uncaught target signal 11 (Segmentation fault) - core dumped Segmentation fault make: *** [localnet-start] Error 139


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@9M6
Copy link
Contributor Author

9M6 commented Sep 29, 2021

When I remove the GOARCH the binaries compile without a problem.

Though there's a problem when using: make targetlocalnet-start: build-linux localnet-stop.

Seems the image that is built has as a default command simd L42 I am not sure its behavior in previous docker version, but as of now what I can see is that when the container is docker runed it does not accept additional commands.

Current non working code:

cosmossdk/simd-env testnet --v 4 -o . --starting-ip-address 192.168.10.2 --keyring-backend=test

Fixed:

cosmossdk/simd-env simd testnet --v 4 -o . --starting-ip-address 192.168.10.2 --keyring-backend=test

Also as a final note, when the specific code gets executed in the make targetlocalnet-start: build-linux localnet-stop, the node files and gentex are not generated, there are some permission issues, I'm assuming related to the docker arguments.

Also, when docker-compose up -d it simply creates the containers, but does nothing to start the network, also, since the container has a default CMD to simd it does not do anything besides outputting the help page.

9M6 added a commit to 9M6/cosmos-sdk that referenced this issue Oct 1, 2021
@mergify mergify bot closed this as completed in #10279 Oct 20, 2021
mergify bot pushed a commit that referenced this issue Oct 20, 2021
<!--
The default pull request template is for types feat, fix, or refactor.
For other templates, add one of the following parameters to the url:
- template=docs.md
- template=other.md
-->

## Description

Closes: #10258

<!-- Add a description of the changes that this PR introduces and the files that
are the most critical to review. -->
fixed an issue where the makefile target `build-linux` would build a faulty binary file on a mac m1, since the compilation target
was AMD64, but it was needed to be ARM64.

---

### Author Checklist

*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*

I have...

- [x] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [x] added `!` to the type prefix if API or client breaking change
- [x] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting))
- [x] provided a link to the relevant issue or specification
- [x] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules)
- [x] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing)
- [x] added a changelog entry to `CHANGELOG.md`
- [x] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [x] updated the relevant documentation or specification
- [x] reviewed "Files changed" and left comments if necessary
- [ ] confirmed all CI checks have passed

### Reviewers Checklist

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

- [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed 
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant