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

Bazel / Sanitizer tests (msan) CI failes due to C++ test failure #625

Closed
NoureldinYosri opened this issue Sep 22, 2023 · 7 comments · Fixed by #628
Closed

Bazel / Sanitizer tests (msan) CI failes due to C++ test failure #625

NoureldinYosri opened this issue Sep 22, 2023 · 7 comments · Fixed by #628

Comments

@NoureldinYosri
Copy link
Collaborator

It's not clear why this is happening since other Bazel/Sanitizer tests (basic, sse, avx) pass. The test failes even on PR that don't touch the C++ code.

Example: https://github.com/quantumlib/qsim/actions/runs/5914985907/job/16076067845?pr=621

@95-martin-orion
Copy link
Collaborator

Unlike Cirq, qsim runs its entire CI suite on all PRs. This is mostly a function of qsim having far fewer active contributors than Cirq, rather than any technical limitation; if someone is interested in segmenting qsim CI, they are welcome to take it on (though bear in mind that it is not as friendly as Cirq CI).

@95-martin-orion
Copy link
Collaborator

As for why msan fails and the others don't: msan is a "memory sanitizer test". It's not testing the tests themselves - although it will fail if the tests fail - it's testing whether the memory management in the tests is sound.

@NoureldinYosri
Copy link
Collaborator Author

@95-martin-orion so this CI fails because there is an open PR that modifies the C++ code?

@95-martin-orion
Copy link
Collaborator

@95-martin-orion so this CI fails because there is an open PR that modifies the C++ code?

No - the CI for each PR is self-contained, and should not be affected by other open, unmerged PRs. Given that the PR in question doesn't affect the test, the issue is most likely due to unpinned dependencies advancing to a version which qsim is not compatible with, or which has internal memory leaks. "Dependencies" here could include python dependencies, the C++ compiler, or the sanitizers themselves.

Searching for the error (lsan_init_is_running) finds google/sanitizers#682, which suggests that it may be an LLVM bug.

@95-martin-orion
Copy link
Collaborator

qsim is no longer my main project, so I don't have the availability to root-cause this. @sergeisakov Do you have bandwidth to investigate this? Otherwise, we would happily accept outside contributions to fix the issue.

@sergeisakov
Copy link
Collaborator

I don't really know how to fix this issue. It's not related to the C++ code.

@NoureldinYosri
Copy link
Collaborator Author

The test breaks at compilation step due to an update to the LLVM library https://bugs.llvm.org/show_bug.cgi?id=27310. fix is to update libc-bin which I added to my PR #623

NoureldinYosri added a commit that referenced this issue Oct 18, 2023
fixes #624
the docker CI failes due to a mismatch between system packages scientific libraries (e.g. numpy) installed by `python3-pybind11` and those required by Cirq. Fix by allowing Cirq to override those packages' versions. This is the same as we had before with the `--force` flag which doesn't seem to work anymore, instead I'm using `a virtualenv

---

fixes #625
these were broken due to an update to the LLVM library which broke the compilation step https://bugs.llvm.org/show_bug.cgi?id=27310. Fix is to upgrade libc-bin.

---

fixed #627 internally
This was referenced Oct 18, 2023
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.

3 participants