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 in main branch Docker Unit Tests #7898

Closed
github-actions bot opened this issue Nov 2, 2023 · 9 comments · Fixed by #8088 or #8107
Closed

Segmentation fault in main branch Docker Unit Tests #7898

github-actions bot opened this issue Nov 2, 2023 · 9 comments · Fixed by #8088 or #8107
Assignees
Labels
I-crash Zebra crashes (without a panic) I-integration-fail Continuous integration fails, including build and test failures S-needs-investigation Status: Needs further investigation S-needs-triage Status: A bug report needs triage

Comments

@github-actions
Copy link

github-actions bot commented Nov 2, 2023

Motivation

In the main branch config tests, Docker exited with status 139:
https://github.com/ZcashFoundation/zebra/actions/runs/6737581570/job/18315670392#step:5:229

Which is a memory safety error in Docker (or perhaps Zebra):
https://www.airplane.dev/blog/sigsegv-segmentation-fault-linux-containers-exit-code-139

This could be a hardware fault, or a Docker bug.

Auto-Opened Issue

GitHub Actions workflow Docker Unit Tests #247 failed.

Event: push
Branch: main
Commit: a1e476ec618943ce24a5e17d5016c3300259215e

Created by jayqi/failed-build-issue-action

@github-actions github-actions bot added the S-ci-fail-auto-issue Status: Auto opened issue for a CI failure. This label is auto-assigned. label Nov 2, 2023
@teor2345 teor2345 added S-needs-triage Status: A bug report needs triage S-needs-investigation Status: Needs further investigation I-integration-fail Continuous integration fails, including build and test failures labels Nov 3, 2023
@teor2345 teor2345 changed the title main branch CI failed: push in Docker Unit Tests Segmentation fault in main branch Docker Unit Tests Nov 3, 2023
@teor2345 teor2345 added P-Medium ⚡ I-crash Zebra crashes (without a panic) and removed S-ci-fail-auto-issue Status: Auto opened issue for a CI failure. This label is auto-assigned. labels Nov 3, 2023
@mpguerra
Copy link
Contributor

mpguerra commented Nov 8, 2023

@gustavovalverde we've had 2 of these failures in the last 2 weeks. Is this something you can look into?

@gustavovalverde
Copy link
Member

@mpguerra yes, sure.

@teor2345
Copy link
Contributor

teor2345 commented Nov 8, 2023

I deleted this part of the ticket, because the bug is still happening after we launched Zebra correctly in the tests:

possibly related to stopping the container during startup (see PR #7900 for details).

@teor2345
Copy link
Contributor

teor2345 commented Nov 8, 2023

We're also seeing exit code 137 (out of memory or SIGTERM) in the same tests in PR #7923:
https://github.com/ZcashFoundation/zebra/actions/runs/6802937935/job/18497528956?pr=7923#step:5:277

There's nothing in the Zebra config or on the Rust side that could cause this issue, and all the other similar tests are passing.

So here are some possibilities:

  • the config file mapping into the Docker image is causing a memory error because Zebra still has it open when the container is shut down
  • using exec in the entrypoint script is applying the bash process memory limits to Zebra, but Zebra needs different limits
  • Zebra is using more memory on startup after we put the parameters in the binary

We could try sleeping before docker stop, or removing exec from the entrypoint?

@teor2345
Copy link
Contributor

teor2345 commented Nov 8, 2023

Exit 137 (OOM?) happened again on the main branch:
https://github.com/ZcashFoundation/zebra/actions/runs/6804547600

@mpguerra
Copy link
Contributor

I've increased the priority on this one as it seems to be happening fairly regularly

@teor2345
Copy link
Contributor

teor2345 commented Dec 5, 2023

Error 137 and 139 in two separate main branch runs, details in #8004

@teor2345
Copy link
Contributor

@teor2345 teor2345 reopened this Dec 12, 2023
@teor2345
Copy link
Contributor

Failed in the merge queue in:
https://github.com/ZcashFoundation/zebra/actions/runs/7200413180/job/19614737572?pr=8103#step:5:261

I think we could just ignore this error for now, because it's not actually impacting our ability to test, and we can't reproduce it outside this environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-crash Zebra crashes (without a panic) I-integration-fail Continuous integration fails, including build and test failures S-needs-investigation Status: Needs further investigation S-needs-triage Status: A bug report needs triage
Projects
None yet
3 participants