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

when we moved to github actions we deleted memory sanitise tests #3609

Closed
donbowman opened this issue Jun 8, 2021 · 12 comments · Fixed by #3731
Closed

when we moved to github actions we deleted memory sanitise tests #3609

donbowman opened this issue Jun 8, 2021 · 12 comments · Fixed by #3731
Assignees
Labels

Comments

@donbowman
Copy link
Contributor

Bug Report

In .github/workflows/unit-tests.yaml we do not have -DFLB_SANITIZE_MEMORY=On nor -DFLB_SANITIZE_THREAD=On

We now have code which is committed that fails and causes SIGSEGV that these tests correctly identify as failed. (see e.g. #3585, #3588)

In our CI, which does have these enabled, master no longer passes, showing things like:

58/64 Test #49: flb-it-input_chunk ...............***Failed   14.39 sec
Test input_chunk_exceed_limit...                free(): double free detected in tcache 2
  Test interrupted by SIGABRT.

In these 3 commits:

7781234f450dce7cbe851ca6d6907f31e0a26c8b ci: switch travis UT to 'xenial', add matrix of clang/gcc for sanitizers (#885)
a6a985aab0f662f1ec8365341850b56e9e583b51 cmake: add sanitizers-cmake
69eee3fe11b46fa5ebfbe9a8c9278588cd3ec12b build: add address/thread/memory sanitizers as option (#792)

I had added support. This was removed for github workflow, please reinstate.

https://github.com/fluent/fluent-bit/pulls?q=is%3Apr+is%3Aclosed

shows that we still merge pull requests even when the existing tests fail. IMHO this is bad practice, bad governance.

We also have direct commits to master, w/ no PR, that fail the CI
e.g.
03f3339

suggest that:

a: we block master for PUSH for 100% of users. All code should go through PR, and pass UT
b: we reinstate the memory tests, we currently have crashes in released code that the tests are finding
c: if it doesn't pass the test, it doesn't merge.

@donbowman
Copy link
Contributor Author

Note: the current memory corruption is in one of the commits on June 4
03f3339
687b08f
3dd43ea
744cf85
e152556
14f00ca

its hard to bisect those tho since some don't compile (e.g. 744cf85)

@nokute78
Copy link
Collaborator

nokute78 commented Jun 9, 2021

The points are

  1. Reinstate -DFLB_SANITIZE_MEMORY=On and -DFLB_SANITIZE_THREAD=On
  2. We block master for PUSH for 100% of users. All code should go through PR, and pass UT

I agree these points.

@niedbalski Could you check the sanitizing configuration?

@edsiper How about blocking direct push to master ?
I believe it is better for this project to go to next step.

@donbowman
Copy link
Contributor Author

i guess no comments

@nokute78
Copy link
Collaborator

nokute78 commented Jul 7, 2021

a: we block master for PUSH for 100% of users. All code should go through PR, and pass UT

From my point of view, recent changes are gone through PR and passed CI.
e.g. #3725 #3724 #3721

@donbowman
Copy link
Contributor Author

most of the recent commits were directly to master w/o PR.
some don't have passing tests
https://github.com/fluent/fluent-bit/commits/master
shows.

5 of the most recent 25 PR don't have passing tests, but those that are passing, the memory tests were commented out in the workflow, so its not really running all of them (which was the original intent of this issue).

so i guess, is there a govenance model for this project? https://github.com/fluent/fluent-bit/blob/master/GOVERNANCE.md doesn't have anthing to say on best practices like:

  • lock and don't commit to master [including maintainers]
  • all code goes through PR process, unit tests pass as a gate before accepting merge

i did the original work to get the unit tests online, and then did that again after they were disregarded and broke, so i'm loathe to step in again if its just not important to the maintainers. My last 3 rebase from the upstream of this project have all resulted in broken code (in 1 case it did not even compile).

@edsiper
Copy link
Member

edsiper commented Jul 7, 2021

most of the recent commits were directly to master w/o PR.
some don't have passing tests
https://github.com/fluent/fluent-bit/commits/master
shows.

actually, all of them have a PR that was rebased and merged after CI passed (except one config file that added a comment).

https://github.com/fluent/fluent-bit/pulls?q=is%3Apr+is%3Aclosed+

@edsiper
Copy link
Member

edsiper commented Jul 7, 2021

I agree with the points to be added to GOVERNANCE and be more strict about that.

@edsiper
Copy link
Member

edsiper commented Jul 7, 2021

@niedbalski

can you take a look at the missing sanitizers mentioned above ?

@niedbalski
Copy link
Collaborator

The points are

  1. Reinstate -DFLB_SANITIZE_MEMORY=On and -DFLB_SANITIZE_THREAD=On
  2. We block master for PUSH for 100% of users. All code should go through PR, and pass UT

I agree these points.

@niedbalski Could you check the sanitizing configuration?

@edsiper How about blocking direct push to master ?
I believe it is better for this project to go to next step.

  1. I will fix this
  2. We can add a branch rule that disallows push for master (including repository admins) without review/pr.

Let me know your thoughts on this.

@edsiper
Copy link
Member

edsiper commented Jul 7, 2021 via email

niedbalski added a commit that referenced this issue Jul 7, 2021
* Re-enable the FLB_SANITIZE_MEMORY and FLB_SANITIZE_THREAD on flags on unit tests.

Fixes #3609
niedbalski added a commit that referenced this issue Jul 7, 2021
* Re-enable the FLB_SANITIZE_MEMORY and FLB_SANITIZE_THREAD on flags on unit tests.

Fixes #3609
@niedbalski niedbalski reopened this Jul 7, 2021
@niedbalski niedbalski added the ci label Jul 7, 2021
@niedbalski
Copy link
Collaborator

@nokute78 @edsiper I made the following changes:

  1. Re-enabled both flags (-DFLB_SANITIZE_MEMORY=On and -DFLB_SANITIZE_THREAD=On) on the unit tests.
  2. Enforced branch protection rules for admins / enabled checks required before merging (github: enforce repository rules to admins. fluent-bit-infra#9)

That should fix this requirement

@nokute78
Copy link
Collaborator

@niedbalski Thank you for updating.

By the way, is "Require branches to be up to date before merging" enabled?
I think it is strict but it is hard to merge pull request for both contributor and maintainer.

In my understanding, if one pull request is merged, any other pull requests can't be merged since they are out-of-date branch.
Other pull request owners have to merge the latest change over and over until it will be merged.

pwhelan pushed a commit to pwhelan/fluent-bit that referenced this issue Jul 19, 2021
* Re-enable the FLB_SANITIZE_MEMORY and FLB_SANITIZE_THREAD on flags on unit tests.

Fixes fluent#3609
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants