manticoresoftware / manticoresearch

Easy to use open source fast database for search | Good alternative to Elasticsearch now | Drop-in replacement for E in the ELK soon
https://manticoresearch.com
GNU General Public License v3.0
8.91k stars 493 forks source link

Adding highlight in json api causes crash #310

Closed Braamling closed 4 years ago

Braamling commented 4 years ago

Describe the environment

Manticore Search version: Manticore 3.2.2 afd60463@191226 release

OS version: Using the manticore docker container

Describe the problem

Description of the issue: When adding highlight settings when searching using the JSON API causes a crash as described below. This happens for both regular and distributed indices.

Messsages from log files:

------- FATAL: CRASH DUMP -------
[Sat Feb  8 11:58:32.711 2020] [    1]

--- crashed HTTP request dump ---
POST /json/search HTTP/1.1
Host: manticore:9308
User-Agent: python-requests/2.18.4
Accept-Encoding: gzip, deflate
Accept: application/json
Connection: keep-alive
Content-Length: 1691
Content-Type: application/json

{"query": {"bool": {"must": [{"match": {"*": "test"}}], "should": [{"equals": {"permission": "Change user properties"}}, {"equals": {"permission": "Manage site-wide banner"}}, {"equals": {"permission": "Upload files"}}, {"equals": {"permission": "Manage company settings"}}, {"equals": {"permission": "Change group permissions"}}, {"equals": {"permission": "Display administrative buttons to DOMjudge"}}, {"equals": {"permission": "Manage financing related tasks"}}, {"equals": {"permission": "Change challenges"}}, {"equals": {"permission": "Create activities"}}, {"equals": {"permission": "View groups"}}, {"equals": {"permission": "Change group members"}}, {"equals": {"permission": "View all available forms"}}, {"equals": {"permission": "Change SEO properties"}}, {"equals": {"permission": "Change the navigation"}}, {"equals": {"permission": "Create pages"}}, {"equals": {"permission": "View Pimpy"}}, {"equals": {"permission": "Create news articles"}}, {"equals": {"permission": "Change the redirects"}}, {"equals": {"permission": "Create ALVs"}}, {"equals": {"permission": "Upload minutes and tasks"}}, {"equals": {"permission": "View mollie transactions"}}, {"equals": {"permission": "Read files"}}, {"equals": {"permission": "Read user properties"}}, {"equals": {"permission": "Change vacancies"}}, {"equals": {"permission": "Change the examinations"}}, {"equals": {"permission": "Search all search indices"}}, {"equals": {"permission": "View vacancy overview"}}, {"equals": {"needs_paid": 0}}, {"equals": {"needs_paid": 1}}, {"equals": {"group_id": 1}}]}}, "highlight": {"fields": ["nl_content", "en_contentc"], "fragment_size": 100}, "index": "viaduct", "limit": 10, "offset": 0}
--- request dump end ---
--- local index:
Manticore 3.2.2 afd60463@191226 release
Handling signal 11
-------------- backtrace begins here ---------------
Program compiled with 6.3.0
Configured with flags: Configured by CMake with these definitions: -DCMAKE_BUILD_TYPE=RelWithDebInfo -DDISTR_BUILD=stretch -DUSE_SSL=ON -DDL_UNIXODBC=1 -DUNIXODBC_LIB=libodbc.so.2 -DDL_EXPAT=1 -DEXPAT_LIB=libexpat.so.1 -DUSE_LIBICONV=1 -DDL_MYSQL=1 -DMYSQL_LIB=libmariadbclient.so.18 -DDL_PGSQL=1 -DPGSQL_LIB=libpq.so.5 -DLOCALDATADIR=/var/data -DFULL_SHARE_DIR=/usr/share/manticore -DUSE_ICU=1 -DUSE_BISON=ON -DUSE_FLEX=ON -DUSE_SYSLOG=1 -DWITH_EXPAT=1 -DWITH_ICONV=ON -DWITH_MYSQL=1 -DWITH_ODBC=ON -DWITH_PGSQL=1 -DWITH_RE2=1 -DWITH_STEMMER=1 -DWITH_ZLIB=ON -DGALERA_SOVERSION=31 -DSYSCONFDIR=/etc/manticoresearch
Host OS is Linux runner-ed2dce3a-project-3858465-concurrent-0 4.19.78-coreos #1 SMP Mon Oct 14 22:56:39 -00 2019 x86_64 GNU/Linux
Stack bottom = 0x7ffb72a75eff, thread stack size = 0x100000
Trying manual backtrace:
Something wrong with thread stack, manual backtrace may be incorrect (fp=0x560c66caeee0)
Wrong stack limit or frame pointer, manual backtrace failed (fp=0x560c66caeee0, stack=0x7ffb72a80000, stacksize=0x100000)
Trying system backtrace:
begin of system symbols:
searchd(_Z12sphBacktraceib+0x9b)[0x560c66e3f06b]
searchd(_ZN16SphCrashLogger_c11HandleCrashEi+0x223)[0x560c66cb0443]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x110e0)[0x7ffb748f60e0]
searchd(_ZN14MemoryReader_c8UnzipIntEv+0x14)[0x560c66f5a624]
searchd(_Z17UnpackSnippetDataPKhiR15SnippetResult_t+0x2c)[0x560c66e1618c]
searchd(_Z19sphEncodeResultJsonRK12AggrResult_tRK9CSphQueryP16CSphQueryProfile+0xa24)[0x560c66fa4e44]
searchd(_ZN24HttpHandler_JsonSearch_c12EncodeResultERK12AggrResult_tP16CSphQueryProfile+0x13)[0x560c66d4a6a3]
searchd(_ZN19HttpSearchHandler_c7ProcessEv+0x684)[0x560c66d4dea4]
searchd(+0x299253)[0x560c66d48253]
searchd(_Z17sphLoopClientHttpPKhiRN3sph8Vector_TIhNS1_13DefaultCopy_TIhEENS1_14DefaultRelimitENS1_16DefaultStorage_TIhEEEERKN7Threads9ThdDesc_tE+0x1eb)[0x560c66d4870b]
searchd(_ZN12ThdJobHttp_t4CallEv+0x2e3)[0x560c66cc31a3]
searchd(_ZN11CSphThdPool4TickEPv+0xa2)[0x560c66e4e372]
searchd(_Z20sphThreadProcWrapperPv+0x25)[0x560c66e49e95]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x74a4)[0x7ffb748ec4a4]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x3f)[0x7ffb73069d0f]
-------------- backtrace ends here ---------------
Please, create a bug report in our bug tracker (https://github.com/manticoresoftware/manticore/issues)
and attach there:
a) searchd log, b) searchd binary, c) searchd symbols.
Look into the chapter 'Reporting bugs' in the documentation
(http://docs.manticoresearch.com/latest/html/reporting_bugs.html)
--- BT to source lines (depth 15): ---
conversion failed (error 'No such file or directory'):
  1. Run the command provided below over the crashed binary (for example, 'searchd'):
  2. Attach the source.txt to the bug report.
addr2line -e searchd 0x66e3f06b 0x66cb0443 0x748f60e0 0x66f5a624 0x66e1618c 0x66fa4e44 0x66d4a6a3 
0x66d4dea4 0x66d48253 0x66d4870b 0x66cc31a3 0x66e4e372 0x66e49e95 0x748ec4a4 0x73069d0f 
> source.txt
githubmanticore commented 4 years ago

➤ Ilya Kuznetsov commented:

I need index files or your config and a minimum subset of your data to reproduce the issue.

You can upload your data to our write-only FTP for customer data:

ftp: dev.manticoresearch.com
user: manticorebugs
pass: shithappens

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Feel free to re-open the issue in case it becomes actual.