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

circular dependency in quicklist nodes causes deadlock #4294

Open
kostasrim opened this issue Dec 11, 2024 · 8 comments · May be fixed by #4302
Open

circular dependency in quicklist nodes causes deadlock #4294

kostasrim opened this issue Dec 11, 2024 · 8 comments · May be fixed by #4302
Assignees
Labels
bug Something isn't working

Comments

@kostasrim
Copy link
Contributor

It was discovered while pushing huge list entries in one of my PR's. https://github.com/dragonflydb/dragonfly/pull/4262/files#diff-35fc27c757d9b3830899712b367143f5c61f801b8f252b7bfa6e59bfbde6da49R59

It's easy to reproduce in test_replication_all case (2, 2 * [1], dict(key_target=1_000, huge_value_percentage=2), 500)

Screenshot from 2024-12-11 15-34-03

@kostasrim kostasrim added the bug Something isn't working label Dec 11, 2024
@romange
Copy link
Collaborator

romange commented Dec 11, 2024

How can I reproduce exactly?

@kostasrim
Copy link
Contributor Author

How can I reproduce exactly?

https://github.com/dragonflydb/dragonfly/pull/4262/files#diff-f41a28e79426b76916ad0fb750e102f83955a92be0f24dda7ae4fda79d74ca8cR52

Use the test case above ^^ and https://github.com/dragonflydb/dragonfly/pull/4262/files#diff-35fc27c757d9b3830899712b367143f5c61f801b8f252b7bfa6e59bfbde6da49R61 and change

from redis.apcall('LPUSH', key, unpack(randstr_sequence(false))) to
redis.apcall('LPUSH', key, unpack(randstr_sequence(is_huge))) and it will deadlock` after a few runs (for me every 3-4).

Then once it deadlocks pgrep dragon and then gdb -p port_number

@romange
Copy link
Collaborator

romange commented Dec 12, 2024

@kostasrim so I should use the kpr1 branch?

@romange
Copy link
Collaborator

romange commented Dec 12, 2024

I tried to follow instructions and it does not work for me. Can you please create a branch for me where I can run test_replication_all to reproduce it?

Thanks

@kostasrim
Copy link
Contributor Author

@romange yes yes give me a few minutes though

@kostasrim
Copy link
Contributor Author

@romange #4300

@romange
Copy link
Collaborator

romange commented Dec 12, 2024

Thank you!

@kostasrim
Copy link
Contributor Author

Let me know if you have any issue, I tried it locally and it failed immediately

romange added a commit that referenced this issue Dec 12, 2024
fixes #4294

Signed-off-by: Roman Gershman <[email protected]>
@romange romange linked a pull request Dec 12, 2024 that will close this issue
romange added a commit that referenced this issue Dec 12, 2024
fixes #4294

Signed-off-by: Roman Gershman <[email protected]>
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.

2 participants