-
Notifications
You must be signed in to change notification settings - Fork 2.6k
[Dev] Initialize new buffers with garbage data if DESTROY_UNPINNED_BLOCKS
is set
#11270
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
Conversation
…et on compilation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea. Could we perhaps unify the memset
code? It's now implemented 3x, once in VerifyZeroReaders
, once in RegisterSmallMemory
, and once in RegisterMemory
.
Nightly CI that actually runs the verification here - https://github.com/Tishj/duckdb/actions/runs/8362180952 |
Sneaky CI failure:
Cant reproduce this locally or in my "local" Linux VM (both are ARM)
It looks like it should be deterministic if we look at the values it's triggering on EDIT: Even on x86_64 it seems to be nondeterministic because I cant reproduce it:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks! |
Merge pull request duckdb/duckdb#11270 from Tishj/initialize_with_garbage
This PR extends the use of
DESTROY_UNPINNED_BLOCKS
.What it currently does is replace the buffer of an unpinned block, and fill the old buffer with garbage data, to find issues where buffers were being used after they had been unpinned.
What this PR adds is filling newly allocated buffers with garbage data, to find issues where we implicitly rely on new buffers being clean (zero initialized).
Thankfully it has found no issues when I enabled this and ran the fast tests on release mode, but none the less I think it's good to add this memory verification.