-
Notifications
You must be signed in to change notification settings - Fork 452
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
Fix ZRANGESTORE arity -4 crash the server #1593
Merged
PragmaTwice
merged 1 commit into
apache:unstable
from
enjoy-binbin:fix_zrangestore_crash
Jul 14, 2023
Merged
Fix ZRANGESTORE arity -4 crash the server #1593
PragmaTwice
merged 1 commit into
apache:unstable
from
enjoy-binbin:fix_zrangestore_crash
Jul 14, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ZRANGESTORE arity should be -5, the code wrongtly sets it to -4, when passing 4 arguments, server will trigger a Segmentation fault and result a crash: ``` 127.0.0.1:6666> zrangestore dstzset srczset 0 Error: Server closed the connection not connected> ``` server logs: ``` E20230714 12:12:07.295455 20224 main.cc:84] ======= Ooops! kvrocks unstable (commit 46862ea) got signal: Segmentation fault (11) ======= E20230714 12:12:07.303087 20224 main.cc:101] /lib64/libpthread.so.0(+0xf5d0) [0x7f2359e1c5d0] E20230714 12:12:07.306125 20224 main.cc:99] ./build/kvrocks() [0x56d0c5] redis::CommandZRangeStore::Parse() E20230714 12:12:07.306392 20224 main.cc:99] ./build/kvrocks() [0x501a27] redis::Commander::Parse() E20230714 12:12:07.306795 20224 main.cc:99] ./build/kvrocks() [0x591c27] redis::Connection::ExecuteCommands() E20230714 12:12:07.307207 20224 main.cc:99] ./build/kvrocks() [0x593720] redis::Connection::OnRead() E20230714 12:12:07.307349 20224 main.cc:99] ./build/kvrocks() [0xb9220e] bufferevent_run_deferred_callbacks_unlocked E20230714 12:12:07.307488 20224 main.cc:99] ./build/kvrocks() [0xb994cc] event_process_active_single_queue.isra.0 E20230714 12:12:07.308138 20224 main.cc:99] ./build/kvrocks() [0xb99bbf] event_base_loop E20230714 12:12:07.308470 20224 main.cc:99] ./build/kvrocks() [0x5bc769] Worker::Run() E20230714 12:12:07.308689 20224 main.cc:99] ./build/kvrocks() [0xd95da0] execute_native_thread_routine E20230714 12:12:07.308856 20224 main.cc:99] /lib64/libpthread.so.0(+0x7dd5) [0x7f2359e14dd5] start_thread E20230714 12:12:07.314087 20224 main.cc:99] /lib64/libc.so.6(clone+0x6d) [0x7f235983bead] __clone Segmentation fault ```
ping @git-hulk @PragmaTwice |
git-hulk
approved these changes
Jul 14, 2023
PragmaTwice
approved these changes
Jul 14, 2023
Thanks for your catch! |
git-hulk
pushed a commit
to git-hulk/kvrocks
that referenced
this pull request
Jul 30, 2023
ZRANGESTORE arity should be -5, the code wrongtly sets it to -4, when passing 4 arguments, server will trigger a Segmentation fault and result a crash: ``` 127.0.0.1:6666> zrangestore dstzset srczset 0 Error: Server closed the connection not connected> ```
Merged
git-hulk
pushed a commit
that referenced
this pull request
Aug 1, 2023
ZRANGESTORE arity should be -5, the code wrongtly sets it to -4, when passing 4 arguments, server will trigger a Segmentation fault and result a crash: ``` 127.0.0.1:6666> zrangestore dstzset srczset 0 Error: Server closed the connection not connected> ```
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ZRANGESTORE arity should be -5, the code wrongtly sets it to -4,
when passing 4 arguments, server will trigger a Segmentation fault
and result a crash:
server logs: