-
Notifications
You must be signed in to change notification settings - Fork 456
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
BUG: Data race reported by TSan in kvrocks #639
Comments
I think maybe it's a false leak report. Coz the main thread will write the memtable HDYT? @ShooterIT @PragmaTwice @tisonkun |
Seems the writing in kvrocks main thread and the reading in rocksdb background thread occurs at the same time and in the same memory location? Won't this be a problem? |
Yes, background thread will read the immutable memory table only which the main thread won't write after it become immutable. |
RocksDB will only have one "writeable" memtable, on default, it will be a lock-free skiplist. And when it's full, it will be "frozen" and only readable. Frozen memtable will only be read by user or compaction, it will never be modified. I think the case strange, the memory is created by Maybe TSAN thinks Memtable is protected by I'm not familiar with TSAN, maybe I made some mistakes. @PragmaTwice |
I may know the root cause of this problem, it may be a false positive due to the rocksdb library not being instrumented by TSan. Did not notice this when I refactor cmake files. I will fix it later. 😢 |
Solved by #759. |
Thanks for @PragmaTwice great help, we finally got the TSAN and ASAN in CI. |
Search before asking
Version
unstable, linux
Minimal reproduce step
What did you expect to see?
No TSan report.
What did you see instead?
Selected TSan log in unittest:
For more details check https://github.com/apache/incubator-kvrocks/runs/6922999327 or reproduce in your side.
Anything Else?
As in #630 (comment), we create an issue for this bug to reference easily.
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: