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

ci: use full ASAN #2231

Merged
merged 2 commits into from
Oct 23, 2023
Merged

ci: use full ASAN #2231

merged 2 commits into from
Oct 23, 2023

Conversation

Riolku
Copy link
Collaborator

@Riolku Riolku commented Oct 18, 2023

Previously we used LD_PRELOAD to add ASAN to our build. This is at best
imperfect, since the full benefits of ASAN can only be realized by
adding compiler instrumentation.

This does not run the python, nodejs, or java tests with ASAN. Though
Python can be run with ASAN using LD_PRELOAD, it is super slow, and
would need parallelized testing to be viable (which is not worth it
IMO).

Nodejs and Java just die spectacularly. Overall I think the APIs need
ASAN much less.

@Riolku Riolku marked this pull request as ready for review October 18, 2023 14:05
@codecov
Copy link

codecov bot commented Oct 18, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (3fe7e20) 89.71% compared to head (6b7eab2) 89.71%.

❗ Current head 6b7eab2 differs from pull request most recent head 34671ef. Consider uploading reports for the commit 34671ef to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2231      +/-   ##
==========================================
- Coverage   89.71%   89.71%   -0.01%     
==========================================
  Files        1012     1013       +1     
  Lines       35919    35933      +14     
==========================================
+ Hits        32226    32238      +12     
- Misses       3693     3695       +2     
Files Coverage Δ
...rc/include/storage/buffer_manager/buffer_manager.h 100.00% <100.00%> (ø)
src/include/storage/buffer_manager/locked_queue.h 100.00% <100.00%> (ø)
src/storage/buffer_manager/buffer_manager.cpp 94.78% <100.00%> (+0.09%) ⬆️

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

The lock-free queue is the source of an ASAN failure. Specifically, the
queue does not guarantee strict FIFO circumstances in the name of speed.
This means that our code that loops through the queue is incorrect.

The goal is to replace this queue-based design soon regardless, and
hence we don't want to spend more time on this.

Also, this commit removes a useless logger in the buffer manager.
@Riolku
Copy link
Collaborator Author

Riolku commented Oct 19, 2023

The lock-free queue is the source of an ASAN failure. Specifically, the
queue does not guarantee strict FIFO circumstances in the name of speed.
This means that our code that loops through the queue is incorrect.

The goal is to replace this queue-based design soon regardless, and
hence we don't want to spend more time on this.

Also, this commit removes a useless logger in the buffer manager.

Previously we used LD_PRELOAD to add ASAN to our build. This is at best
imperfect, since the full benefits of ASAN can only be realized by
adding compiler instrumentation.

This does not run the python, nodejs, or java tests with ASAN. Though
Python can be run with ASAN using LD_PRELOAD, it is super slow, and
would need parallelized testing to be viable (which is not worth it
IMO).

Nodejs and Java just die spectacularly. Overall I think the APIs need
ASAN much less.
@@ -113,24 +113,20 @@ clang-tidy-ci:
$(call mkdirp,build/release) && cd build/release && \
cmake $(GENERATOR) $(FORCE_COLOR) $(SANITIZER_FLAG) -DCMAKE_EXPORT_COMPILE_COMMANDS=1 ../..

pytest:
$(MAKE) release
pytest: release
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we make this change, will it still rerun make release every time whenmake pytest is run? Since release does not have file dependencies configured and is simply a shortcut to invoke CMake, I am not sure if it will rebuild automatically if the code is changed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

release is a dummy target, so Make will run it everytime pytest is run

Copy link
Collaborator

@mewim mewim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CI changes LGTM

Copy link
Contributor

@ray6080 ray6080 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change to queue is indeed decreasing the performance of BM, as each unpin now gets to lock the queue. This should be fixed with issue #2137 , so we move away from the queue-based solution. As for now, we decide to merge this first to get CI asan correctly, and fix it later before the next release.

@Riolku Riolku merged commit 9ebc7f1 into master Oct 23, 2023
10 checks passed
@Riolku Riolku deleted the asan-ci branch October 23, 2023 14:57
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 this pull request may close these issues.

None yet

3 participants