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

Assertion failures trip in clockcache.c due to off-by-1 issues handling MAX_THREADS. #509

Closed
gapisback opened this issue Dec 22, 2022 · 0 comments · Fixed by #510
Closed
Assignees
Labels
bug Something isn't working

Comments

@gapisback
Copy link
Collaborator

Couple of spots in clockcache.c trip with assertions when running max # of configured threads, 63. These issues were discovered while running integration tests with large # of configured threads.

These are easily reproduced using driver_test splinter_test --perf --num-insert-threads 63.

Here is the 1st instance:

sdb-fdb-build:[8] $ ./build/debug/bin/driver_test splinter_test --perf --num-insert-threads 63 --tree-size-gib 1
./build/debug/bin/driver_test: splinterdb_build_version f070c377
Dispatch test splinter_test
Fingerprint size 29 too large, max value size is 5, setting to 27
filter-index-size: 256 is too small, setting to 512
Bumped up IO queue size to 4032
Bumped up IO queue size to 4032
Running splinter_test with 1 caches
splinter_test: SplinterDB performance test started with 1 tables
splinter_perf_inserts() starting num_insert_threads=63, num_threads=63, num_inserts=13594624 (~13 million) ...
Thread 55 inserting   0% complete for table 0 ... OS-pid=3418189, OS-tid=3418245, Thread-ID=63, Assertion failed at src/clockcache.c:1669:clockcache_get_free_page(): "(tid < (64) - 1)". Invalid tid=63

Aborted (core dumped)

The extra message reporting Invalid tid=63 is added to /main to see what's going wrong.

Once having fixed this instance, we next fail here:

sdb-fdb-build:[9] $ ./build/debug/bin/driver_test splinter_test --perf --num-insert-threads 63 --tree-size-gib 1
./build/debug/bin/driver_test: splinterdb_build_version f070c377
Dispatch test splinter_test
Fingerprint size 29 too large, max value size is 5, setting to 27
filter-index-size: 256 is too small, setting to 512
Bumped up IO queue size to 4032
Bumped up IO queue size to 4032
Running splinter_test with 1 caches
splinter_test: SplinterDB performance test started with 1 tables
splinter_perf_inserts() starting num_insert_threads=63, num_threads=63, num_inserts=13594624 (~13 million) ...
Thread 19 inserting   0% complete for table 0 ...
Thread 60 inserting   0% complete for table 0 ...
Thread 62 inserting   0% complete for table 0 ... OS-pid=3418392, OS-tid=3418455, Thread-ID=63, Assertion failed at src/clockcache.c:1382:clockcache_batch_start_writeback(): "(tid < (64) - 1)". Invalid tid=63
@gapisback gapisback self-assigned this Dec 22, 2022
@gapisback gapisback added the bug Something isn't working label Dec 22, 2022
gapisback added a commit that referenced this issue Dec 22, 2022
This commit fixes off-by-1 issues checking MAX_THREADS value
in assertions in clockcache.c . These problems are easily
reproduced with driver_test splinter_test with max # of
threads. A new test execution with --num-insert-threads 63
is added to nightly runs, in test.sh .
@gapisback gapisback linked a pull request Dec 22, 2022 that will close this issue
gapisback added a commit that referenced this issue Dec 22, 2022
This commit fixes off-by-1 issues checking MAX_THREADS value
in assertions in clockcache.c . These problems are easily
reproduced with driver_test splinter_test with max # of
threads. A new test execution with --num-insert-threads 63
is added to nightly runs, in test.sh .
gapisback added a commit that referenced this issue Dec 25, 2022
This commit fixes off-by-1 issues checking MAX_THREADS value
in assertions in clockcache.c . These problems are easily
reproduced with driver_test splinter_test with max # of
threads. A new test execution with --num-insert-threads 63
is added to nightly runs, in test.sh .
gapisback added a commit that referenced this issue Jan 6, 2023
This commit fixes off-by-1 issues checking MAX_THREADS value
in assertions in clockcache.c . These problems are easily
reproduced with driver_test splinter_test with max # of
threads. A new test execution with --num-insert-threads 63
is added to nightly runs, in test.sh .
gapisback added a commit that referenced this issue Jan 6, 2023
This commit fixes off-by-1 issues when checking MAX_THREADS
value in assertions in clockcache.c . These problems are easily
reproduced with driver_test splinter_test with max # of
threads. A new test execution with --num-insert-threads 63
is added to nightly runs, in test.sh .
gapisback added a commit that referenced this issue Jan 7, 2023
This commit fixes off-by-1 issues when checking MAX_THREADS
value in assertions in clockcache.c . These problems are easily
reproduced with driver_test splinter_test with max # of
threads. A new test execution with --num-insert-threads 63
is added to nightly runs, in test.sh .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant