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

lookup would crash storaged where there's an index on a nullable property #4230

Closed
xiajingchun opened this issue May 5, 2022 · 0 comments
Closed
Assignees
Labels
type/bug Type: something is unexpected
Milestone

Comments

@xiajingchun
Copy link

xiajingchun commented May 5, 2022

Please check the FAQ documentation before raising an issue

Describe the bug (required)

When a tag has a nullable bool property with an index on it, run a lookup query without where condition would crash the storaged. See the reproduce steps for more details.

Your Environments (required)

  • OS: Centos 7
  • Compiler: g++ --version or clang++ --version
  • CPU: lscpu
  • Commit id (e.g. a3ffc7d8) v3.1.0 - 33fd35e

How To Reproduce(required)

Steps to reproduce the behavior:

Use below schema to create a space.

drop space test;
create space test(partition_num=10,replica_factor=1,vid_type=fixed_string(32));
:sleep 20
use test;
create tag v(flag bool NULL);
:sleep 20
create tag index v_index_0 on v(flag);
:sleep 20
insert vertex v(flag) values "001":(true);
insert vertex v() values "002":();

The run a lookup query like below:

lookup on v yield id(vertex) as vid;

Storaged will then crash.

Expected behavior

Additional context

Core dump is like:

(gdb) bt
#0  0x00007ff424a9b387 in raise () from /lib64/libc.so.6
#1  0x00007ff424a9ca78 in abort () from /lib64/libc.so.6
#2  0x00000000025b4dca in google::LogMessage::Fail() ()
#3  0x00000000025b7ec4 in google::LogMessage::SendToLog() ()
#4  0x00000000025b4899 in google::LogMessage::Flush() ()
#5  0x00000000025b8579 in google::LogMessageFatal::~LogMessageFatal() ()
#6  0x000000000150580e in apache::thrift::detail::validate_bool(unsigned char) [clone .part.0] ()
#7  0x000000000152f399 in apache::thrift::CompactProtocolWriter::writeBool(bool) ()
#8  0x000000000156a769 in unsigned int apache::thrift::Cpp2Ops<nebula::Value, void>::write<apache::thrift::CompactProtocolWriter>(apache::thrift::CompactProtocolWriter*, nebula::Value const*) ()
#9  0x000000000156ab6f in unsigned int apache::thrift::Cpp2Ops<nebula::List, void>::write<apache::thrift::CompactProtocolWriter>(apache::thrift::CompactProtocolWriter*, nebula::List const*) ()
#10 0x000000000156ad1f in unsigned int apache::thrift::Cpp2Ops<nebula::DataSet, void>::write<apache::thrift::CompactProtocolWriter>(apache::thrift::CompactProtocolWriter*, nebula::DataSet const*) ()
#11 0x000000000156b236 in unsigned int nebula::storage::cpp2::LookupIndexResp::write<apache::thrift::CompactProtocolWriter>(apache::thrift::CompactProtocolWriter*) const ()
#12 0x00000000015cbfa4 in apache::thrift::SerializedResponse apache::thrift::GeneratedAsyncProcessor::serializeResponseImpl<apache::thrift::SerializedResponse, apache::thrift::CompactProtocolWriter, apache::thrift::ThriftPresult<true, apache::thrift::FieldData<(short)0, apache::thrift::type_class::structure, nebula::storage::cpp2::LookupIndexResp*> > >(char const*, apache::thrift::CompactProtocolWriter*, int, apache::thrift::ContextStack*, apache::thrift::ThriftPresult<true, apache::thrift::FieldData<(short)0, apache::thrift::type_class::structure, nebula::storage::cpp2::LookupIndexResp*> > const&) ()
#13 0x00000000015cc1a0 in apache::thrift::SerializedResponse nebula::storage::cpp2::GraphStorageServiceAsyncProcessor::return_lookupIndex<apache::thrift::CompactProtocolReader, apache::thrift::CompactProtocolWriter>(apache::thrift::ContextStack*, nebula::storage::cpp2::LookupIndexResp const&) ()
#14 0x00000000015a0212 in apache::thrift::HandlerCallback<nebula::storage::cpp2::LookupIndexResp>::doResult(nebula::storage::cpp2::LookupIndexResp const&) ()
#15 0x00000000015d4e3e in apache::thrift::HandlerCallback<nebula::storage::cpp2::LookupIndexResp>::complete(folly::Try<nebula::storage::cpp2::LookupIndexResp>&&) ()
#16 0x00000000015d517f in _ZN5folly6detail8function14FunctionTraitsIFvRNS_7futures6detail8CoreBaseEONS_8Executor9KeepAliveIS7_EEPNS_17exception_wrapperEEE9callSmallIZNS4_4CoreIN6nebula7storage4cpp215LookupIndexRespEE11setCallbackIZNS4_10FutureBaseISK_E18thenImplementationIZNOS_6FutureISK_E13thenTryInlineIZN6apache6thrift6detail2si15async_tm_futureISK_EEvSt10unique_ptrINSU_15HandlerCallbackIT_EESt14default_deleteIS11_EEONSQ_INS_9lift_unitIS10_E4typeEEEEUlONS_3TryISK_EEE_EENSQ_INS4_17tryCallableResultISK_S10_NSt9enable_ifIX14is_invocable_vIS10_S1C_EEvE4typeEE10value_typeEEEOS10_EUlSA_S1C_E_NS4_25tryExecutorCallableResultISK_S1M_vEEEENS1F_IXntsrNT0_13ReturnsFutureE5valueENS1P_6ReturnEE4typeES1L_S1P_NS4_18InlineContinuationEEUlSA_S1C_E_EEvS1L_OSt10shared_ptrINS_14RequestContextEES1U_EUlS6_SA_SC_E_EEvS6_SA_SC_RNS1_4DataE ()
#17 0x00000000024ec8ec in ?? ()
#18 0x000000000210b527 in virtual thunk to apache::thrift::concurrency::FunctionRunner::run() ()
#19 0x0000000002268548 in apache::thrift::concurrency::ThreadManager::Impl::Worker::run() ()
#20 0x000000000226a64e in apache::thrift::concurrency::PthreadThread::threadMain(void*) ()
#21 0x00007ff424e3aea5 in start_thread () from /lib64/libpthread.so.0
#22 0x00007ff424b63b0d in clone () from /lib64/libc.so.6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Type: something is unexpected
Projects
None yet
Development

No branches or pull requests

3 participants