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

XGROUP HELP crashes the server #854

Closed
talbii opened this issue Feb 21, 2023 · 0 comments · Fixed by #1159
Closed

XGROUP HELP crashes the server #854

talbii opened this issue Feb 21, 2023 · 0 comments · Fixed by #1159
Assignees
Labels
API-5 Redis API 5 bug Something isn't working docs-fixit

Comments

@talbii
Copy link
Contributor

talbii commented Feb 21, 2023

Description & Reproducing

Run Dragonfly, and send the XGROUP HELP command, which normally should list the available XGROUP xyz commands. Dragonfly (debug, optimized builds) then crashes, with the following output:

F20230221 17:27:20.083921 83220 transaction.cc:104] Check failed: absl::StartsWith(cid_->name(), "EVAL") 
*** Check failure stack trace: ***
    @     0x5620bf86975f  google::LogMessage::Fail()
    @     0x5620bf8696a5  google::LogMessage::SendToLog()
    @     0x5620bf868e7a  google::LogMessage::Flush()
    @     0x5620bf86ccf2  google::LogMessageFatal::~LogMessageFatal()
    @     0x5620bf2caf6f  dfly::Transaction::InitByArgs()
    @     0x5620be84df3a  dfly::Service::DispatchCommand()
    @     0x5620bf3fea24  facade::Connection::ParseRedis()
    @     0x5620bf402097  facade::Connection::IoLoop()
    @     0x5620bf3fb021  facade::Connection::ConnectionFlow()
    @     0x5620bf3f67c7  facade::Connection::HandleRequests()
    @     0x5620bf7546c9  util::ListenerInterface::RunSingleConnection()
    @     0x5620bf7501a7  _ZZN4util17ListenerInterface13RunAcceptLoopEvENKUlvE0_clEv
    @     0x5620bf768e0d  _ZSt13__invoke_implIvZN4util17ListenerInterface13RunAcceptLoopEvEUlvE0_JEET_St14__invoke_otherOT0_DpOT1_
    @     0x5620bf766c7d  _ZSt8__invokeIZN4util17ListenerInterface13RunAcceptLoopEvEUlvE0_JEENSt15__invoke_resultIT_JDpT0_EE4typeEOS4_DpOS5_
    @     0x5620bf763451  _ZSt12__apply_implIZN4util17ListenerInterface13RunAcceptLoopEvEUlvE0_St5tupleIJEEJEEDcOT_OT0_St16integer_sequenceImJXspT1_EEE
    @     0x5620bf7634ce  _ZSt5applyIZN4util17ListenerInterface13RunAcceptLoopEvEUlvE0_St5tupleIJEEEDcOT_OT0_
    @     0x5620bf763713  _ZN5boost6fibers14worker_contextIZN4util17ListenerInterface13RunAcceptLoopEvEUlvE0_JEE4run_EONS_7context5fiberE
    @     0x5620bf774014  _ZSt13__invoke_implIN5boost7context5fiberERMNS0_6fibers14worker_contextIZN4util17ListenerInterface13RunAcceptLoopEvEUlvE0_JEEEFS2_OS2_ERPS8_JS2_EET_St21__invoke_memfun_derefOT0_OT1_DpOT2_
    @     0x5620bf77342b  _ZSt8__invokeIRMN5boost6fibers14worker_contextIZN4util17ListenerInterface13RunAcceptLoopEvEUlvE0_JEEEFNS0_7context5fiberEOS8_EJRPS6_S8_EENSt15__invoke_resultIT_JDpT0_EE4typeEOSG_DpOSH_
    @     0x5620bf772e54  _ZNSt5_BindIFMN5boost6fibers14worker_contextIZN4util17ListenerInterface13RunAcceptLoopEvEUlvE0_JEEEFNS0_7context5fiberEOS8_EPS6_St12_PlaceholderILi1EEEE6__callIS8_JS9_EJLm0ELm1EEEET_OSt5tupleIJDpT0_EESt12_Index_tupleIJXspT1_EEE
    @     0x5620bf772843  _ZNSt5_BindIFMN5boost6fibers14worker_contextIZN4util17ListenerInterface13RunAcceptLoopEvEUlvE0_JEEEFNS0_7context5fiberEOS8_EPS6_St12_PlaceholderILi1EEEEclIJS8_ES8_EET0_DpOT_
    @     0x5620bf771a7e  _ZSt13__invoke_implIN5boost7context5fiberERSt5_BindIFMNS0_6fibers14worker_contextIZN4util17ListenerInterface13RunAcceptLoopEvEUlvE0_JEEEFS2_OS2_EPS9_St12_PlaceholderILi1EEEEJS2_EET_St14__invoke_otherOT0_DpOT1_
    @     0x5620bf770dfb  _ZSt8__invokeIRSt5_BindIFMN5boost6fibers14worker_contextIZN4util17ListenerInterface13RunAcceptLoopEvEUlvE0_JEEEFNS1_7context5fiberEOS9_EPS7_St12_PlaceholderILi1EEEEJS9_EENSt15__invoke_resultIT_JDpT0_EE4typeEOSK_DpOSL_
    @     0x5620bf76ee5b  _ZSt6invokeIRSt5_BindIFMN5boost6fibers14worker_contextIZN4util17ListenerInterface13RunAcceptLoopEvEUlvE0_JEEEFNS1_7context5fiberEOS9_EPS7_St12_PlaceholderILi1EEEEJS9_EENSt13invoke_resultIT_JDpT0_EE4typeEOSK_DpOSL_
    @     0x5620bf76c23d  _ZN5boost7context6detail12fiber_recordINS0_5fiberENS0_21basic_fixedsize_stackINS0_12stack_traitsEEESt5_BindIFMNS_6fibers14worker_contextIZN4util17ListenerInterface13RunAcceptLoopEvEUlvE0_JEEEFS3_OS3_EPSD_St12_PlaceholderILi1EEEEE3runEPv
    @     0x5620bf7695b8  _ZN5boost7context6detail11fiber_entryINS1_12fiber_recordINS0_5fiberENS0_21basic_fixedsize_stackINS0_12stack_traitsEEESt5_BindIFMNS_6fibers14worker_contextIZN4util17ListenerInterface13RunAcceptLoopEvEUlvE0_JEEEFS4_OS4_EPSE_St12_PlaceholderILi1EEEEEEEEvNS1_10transfer_tE
    @     0x7f4843fa324f  make_fcontext
*** SIGABRT received at time=1676993240 on cpu 0 ***
PC: @     0x7f4843488a7c  (unknown)  pthread_kill
    @     0x5620bf8bd4db         64  absl::lts_20230125::WriteFailureInfo()
    @     0x5620bf8bd6e5         96  absl::lts_20230125::AbslFailureSignalHandler()
    @     0x7f4843434520  (unknown)  (unknown)
[1]    83219 IOT instruction (core dumped)  ./dragonfly --logtostderr

System info

  • OS: Linux Mint 21.1 (Vera)
  • Kernel: 5.15.0-60-generic
@talbii talbii added bug Something isn't working docs-fixit labels Feb 21, 2023
@romange romange added good first issue Good for newcomers API-5 Redis API 5 labels Apr 29, 2023
romange added a commit that referenced this issue Apr 29, 2023
Along the way, performs small cleanups in command handling code.

Fixes #854.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
romange added a commit that referenced this issue Apr 29, 2023
Along the way, performs small cleanups in command handling code.
XGROUP HELP is special because it falls out of Dragonfly command taxonomy design,
where a command name determines where its key is located. All other XGROUP subcommands
expect to see XGROUP <subcmd> <key> and this one obviously does not need any key.
I fix it by working around the issue and introduce a dedicated dummy command for this combination.

Fixes #854.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
@romange romange self-assigned this Apr 29, 2023
@romange romange removed the good first issue Good for newcomers label Apr 29, 2023
romange added a commit that referenced this issue Apr 29, 2023
Along the way, performs small cleanups in command handling code.
XGROUP HELP is special because it falls out of Dragonfly command taxonomy design,
where a command name determines where its key is located. All other XGROUP subcommands
expect to see XGROUP <subcmd> <key> and this one obviously does not need any key.
I fix it by working around the issue and introduce a dedicated dummy command for this combination.

Fixes #854.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
romange added a commit that referenced this issue Apr 30, 2023
Along the way, performs small cleanups in command handling code.
XGROUP HELP is special because it falls out of Dragonfly command taxonomy design,
where a command name determines where its key is located. All other XGROUP subcommands
expect to see XGROUP <subcmd> <key> and this one obviously does not need any key.
I fix it by working around the issue and introduce a dedicated dummy command for this combination.

Fixes #854.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API-5 Redis API 5 bug Something isn't working docs-fixit
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants