-
Notifications
You must be signed in to change notification settings - Fork 57
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
splinterdb_insert() hang under concurrent insertion #620
Comments
I just tried to reproduce this bug with |
HI, @chrisxu333 -- When you say : "When I perform concurrent insertion by calling splinterdb_insert(), each time I increase the thread count to be larger than 8, the splinterdb_insert() call seems to hang forever. " ... Do you have a stand-alone repro that you wrote on your own? Or, were you relying on reproducing this issue using Re: "After I add the O_DIRECT flag to the splinterdb_config in large_inserts_stress_test.c, the test will hang on..." I suggest you do not try to use this stress-test and its sub-cases to reproduce the bug you are finding. That stress-test is somewhat in a flux. Many test cases do work reliably but some of the cases in it are currently a bit incomplete and can lead to hang / unpredictable behaviour. I have another revision of this large test-suite that is undergoing review, so until the time that open PR is addressed and integrated, I suggest you please not rely on this test-suite as an exerciser to reproduce your problem. |
Hi @gapisback , So to rephrase the bug, when I run SplinterDB insertion under high concurrency (16 threads for instance), and I used O_DIRECT when I call |
I can repro with It looks like some io completions are not doing what they are supposed to. One deadlock had all threads complete except for one, which was waiting on the Will investigate. As @gapisback mentioned, one outcome of the investigation may be that the test is buggy. In that case it will be helpful to see the code you wrote. But let me try debugging it with Thanks for the report. |
Hi @rtjohnso thanks for the help. Let me know if you need my code :) |
@chrisxu333 -- can you check whether PR #621 fixes your issue? |
@rtjohnso Yes I just ran it with my code and it works perfectly :) Thanks for your help |
Fixed by #621 . |
When I perform concurrent insertion by calling splinterdb_insert(), each time I increase the thread count to be larger than 8, the splinterdb_insert() call seems to hang forever. I suspect that it may have something to do with deadlocks.
Config setup:
.cache_size = 2 * Giga,
.disk_size = 64 * Giga,
.data_cfg = &data_cfg,
.use_shmem = FALSE,
.io_flags = O_RDWR | O_CREAT | O_DIRECT,
Data config setup follows the default by calling
default_data_config_init
with key size of 8..max_key_size = 8,
.key_compare = key_compare,
.key_hash = platform_hash32,
.merge_tuples = NULL,
.merge_tuples_final = NULL,
.key_to_string = key_to_string,
.message_to_string = message_to_string,
Note that when I turned off O_DIRECT, everything works fine and it won't hang anymore.
The text was updated successfully, but these errors were encountered: