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

searchd crashes if match string is too long #258

Closed
rlattuad opened this issue Aug 2, 2019 · 3 comments
Closed

searchd crashes if match string is too long #258

rlattuad opened this issue Aug 2, 2019 · 3 comments

Comments

@rlattuad
Copy link

rlattuad commented Aug 2, 2019

Describe the environment

see log below

Describe the problem

searchd crash and connection lost to mysql

Description of the issue:
when I run the following query:
SELECT * FROM myHB_index1 WHERE MATCH (‘ASTRAGALUS PROPINQUUS ROOT UNII: 922OP8YUPF ASTRAGALUS PROPINQUUS ROOT UNII:922OP8YUPF BAPTISIA TINCTORIA UNII: 5K1UO2888YBAPTISIA TINCTORIA UNII:5K1UO2888Y ECHINACEA ANGUSTIFOLIA UNII: VB06AV5US8 ECHINACEA ANGUSTIFOLIA UNII:VB06AV5US8 PHYTOLACCA AMERICANA ROOT UNII: 11E6VI8VEG PHYTOLACCA AMERICANA ROOT UNII:11E6VI8VEG GOLDENSEAL UNII: ZW3Z11D0JV GOLDENSEAL UNII:ZW3Z11D0JV APIS MELLIFERA UNII: 7S82P3R43Z APIS MELLIFERA UNII:7S82P3R43Z ARANEUS DIADEMATUS UNII: 6T6C’) AND (language_code IN (8, 27, 43)) GROUP BY med_id LIMIT 0,100 OPTION max_matches=100, ranker=sph04, field_weights=(name=10, active_ingredient=5);

the server crashes, I have tried limiting the string to 256 chars and the query runs fine, not sure what the actual limit may be.

Steps to reproduce:
Run a query with a very long match string

Messsages from log files:
------- FATAL: CRASH DUMP -------
[Thu Aug 1 12:20:22.334 2019] [ 4326]

--- crashed SphinxQL request dump ---
SELECT *, SNIPPET(leaflet_pil_preview_name, 'PICEA MARIANA RESIN UNII: 71AOV0W131
PICEA MARIANA RESIN UNII:71AOV0W131 ACTIVATED CHARCOAL UNII: 2P3VWU3H10 ACTIVATED
CHARCOAL UNII:2P3VWU3H10 STRYCHNOS NUX VOMICA SEED UNII: 269XH13919 STRYCHNOS
NUX VOMICA SEED UNII:269XH13919 ROBINI', 'load_files=1, html_strip_mode=index,
around=10') AS snippet FROM myHB_index1 WHERE MATCH ('PICEA MARIANA RESIN UNII:
71AOV0W131 PICEA MARIANA RESIN UNII:71AOV0W131 ACTIVATED CHARCOAL UNII: 2P3VWU3H10
ACTIVATED CHARCOAL UNII:2P3VWU3H10 STRYCHNOS NUX VOMICA SEED UNII: 269XH13919
STRYCHNOS NUX VOMICA SEED UNII:269XH13919 ROBINI') AND (language_code IN (8,
27, 43)) GROUP BY med_id LIMIT 0,100 OPTION max_matches=100, ranker=sph04, field_weights=(name=10,
active_ingredient=5)
--- request dump end ---
Manticore 2.8.0 4006794@190128 release
Handling signal 11
-------------- backtrace begins here ---------------
Program compiled with 4.8.5
Configured with flags: Configured by CMake with these definitions: -DCMAKE_BUILD_TYPE=RelWithDebInfo -DDISTR_BUILD=rhel7
-DDL_UNIXODBC=1 -DUNIXODBC_LIB=libodbc.so.2 -DDL_EXPAT=1 -DEXPAT_LIB=libexpat.so.1 -DUSE_LIBICONV=1 -DDL_MYSQL=1 -DMYSQ
L_LIB=libmysqlclient.so.18 -DDL_PGSQL=1 -DPGSQL_LIB=libpq.so.5 -DDATADIR=/var/data -DFULL_SHARE_DIR=/usr/share/manticore
-DSPLIT_SYMBOLS=ON -DUSE_BISON=ON -DUSE_FLEX=ON -DUSE_SYSLOG=1 -DWITH_EXPAT=ON -DWITH_ICONV=ON -DWITH_MYSQL=ON -DWITH_O
DBC=ON -DWITH_PGSQL=ON -DWITH_RE2=ON -DWITH_STEMMER=ON -DWITH_ZLIB=ON -DSYSCONFDIR=/etc/sphinx
Host OS is Linux runner-72989761-project-3858465-concurrent-0 4.14.48-coreos-r2 #1 SMP Thu Jun 14 08:23:03 UTC 2018 x86_
64 x86_64 x86_64 GNU/Linux
Stack bottom = 0x7fc5089f4eff, thread stack size = 0x40000
Trying manual backtrace:
Frame pointer is null, manual backtrace failed (did you build with -fomit-frame-pointer?)
Trying system backtrace:
begin of system symbols:
/usr/bin/searchd(_Z12sphBacktraceib+0x93)[0x6a0413]
/usr/bin/searchd(_ZN16SphCrashLogger_c11HandleCrashEi+0x187)[0x4f8e77]
/lib64/libpthread.so.0(+0xf5d0)[0x7fc58ed065d0]
/lib64/libc.so.6(+0x153cf5)[0x7fc58dc40cf5]
/usr/bin/searchd(_ZN15ExtNodeCached_t12GetDocsChunkEv+0x95)[0x7632c5]
/usr/bin/searchd(_ZN7ExtOr_c12GetDocsChunkEv+0x4cc)[0x761f8c]
/usr/bin/searchd(_ZN15ExtNodeCached_t12GetDocsChunkEv+0x169)[0x763399]
/usr/bin/searchd(_ZN8ExtAnd_c12GetDocsChunkEv+0x1a5)[0x761895]
/usr/bin/searchd(_ZN8ExtAnd_c12GetDocsChunkEv+0x20d)[0x7618fd]
/usr/bin/searchd(_ZN8ExtAnd_c12GetDocsChunkEv+0x20d)[0x7618fd]
/usr/bin/searchd(_ZN8ExtAnd_c12GetDocsChunkEv+0x20d)[0x7618fd]
/usr/bin/searchd(_ZN8ExtAnd_c12GetDocsChunkEv+0x20d)[0x7618fd]
/usr/bin/searchd(_ZN8ExtAnd_c12GetDocsChunkEv+0x20d)[0x7618fd]
/usr/bin/searchd(_ZN8ExtAnd_c12GetDocsChunkEv+0x20d)[0x7618fd]
/usr/bin/searchd(_ZN8ExtAnd_c12GetDocsChunkEv+0x20d)[0x7618fd]
/usr/bin/searchd(_ZN11ExtRanker_c15GetFilteredDocsEv+0x60)[0x764850]
/usr/bin/searchd(_ZN11ExtRanker_TI33RankerState_ProximityBM25Exact_fnE10GetMatchesEv+0x73f)[0x79218f]
/usr/bin/searchd(_ZNK13CSphIndex_VLN13MatchExtendedEP16CSphQueryContextPK9CSphQueryiPP15ISphMatchSorterP10ISphRankerii+0xb3)[0x5b5633]
/usr/bin/searchd(_ZNK13CSphIndex_VLN16ParsedMultiQueryEPK9CSphQueryP15CSphQueryResultiPP15ISphMatchSorterRK9XQQuery_tP8CSphDictRK18CSphMultiQueryArgsP18CSphQueryNodeCacheRK20SphWordStatChecker_t+0xfba)[0x5c8cca]
/usr/bin/searchd(_ZNK13CSphIndex_VLN10MultiQueryEPK9CSphQueryP15CSphQueryResultiPP15ISphMatchSorterRK18CSphMultiQueryArgs+0x690)[0x5fe880]
/usr/bin/searchd(_ZNK13CSphIndex_VLN12MultiQueryExEiPK9CSphQueryPP15CSphQueryResultPP15ISphMatchSorterRK18CSphMultiQueryArgs+0x8b0)[0x5e9d60]
/usr/bin/searchd(_ZN15SearchHandler_c16RunLocalSearchMTER13LocalSearch_tR13ThreadLocal_t+0x5e4)[0x503474]
/usr/bin/searchd(_Z21LocalSearchThreadFuncPv+0x198)[0x503658]
/usr/bin/searchd(_ZN16SphCrashLogger_c13ThreadWrapperEPv+0x44)[0x4f8774]
/usr/bin/searchd(_Z20sphThreadProcWrapperPv+0x25)[0x6a9265]
/lib64/libpthread.so.0(+0x7dd5)[0x7fc58ecfedd5]
/lib64/libc.so.6(clone+0x6d)[0x7fc58dbeaead]
-------------- backtrace ends here ---------------

@tomatolog
Copy link
Contributor

According to BT you provided the issue is with NodeCached that was fixed at release of Manticore version 3. You have to use version 3, recent release to get issue fixed

@manticoresearch
Copy link
Contributor

You can find the new version here https://manticoresearch.com/downloads/
Pls reopen the issue if you see the same issue in the new version.

@rlattuad
Copy link
Author

rlattuad commented Aug 6, 2019

Tested on version 3 and the problem is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants