Closed KarPaLex98 closed 2 months ago
Разобрался, если один и тот же атрибут объявлен с разными типами (например, string karkas, а потом bigint karkas, то падает. Убрал это и перестало крашиться
Thanks @KarPaLex98
cat << 'EOF' > xml
<?xml version="1.0" encoding="utf-8"?>
<sphinx:docset xmlns:sphinx="http://sphinxsearch.com/">
<sphinx:schema>
<sphinx:attr name="a" type="int" />
<sphinx:attr name="a" type="string" />
</sphinx:schema>
<sphinx:document id="10">
<a>1</a>
<a>a</a>
</sphinx:document>
</sphinx:docset>
EOF
cat << 'EOF' > xml_crash.conf
source min {
type = xmlpipe2
xmlpipe_command = cat xml
}
index idx {
path = idx
source = min
}
EOF
snikolaev@dev2:~$ indexer -c xml_crash.conf --all
Manticore 6.3.3 f3dab0eba@24072313 dev (columnar 2.3.1 42f2b06@24070110) (secondary 2.3.1 42f2b06@24070110) (knn 2.3.1 42f2b06@24070110)
*** Oops, indexer crashed! Please send the following report to developers.
Manticore 6.3.3 f3dab0eba@24072313 dev (columnar 2.3.1 42f2b06@24070110) (secondary 2.3.1 42f2b06@24070110) (knn 2.3.1 42f2b06@24070110)
-------------- report begins here ---------------
Current document: docid=0, hits=0
Current batch: minid=0, maxid=0
Hit pool start: docid=0, hit=0
-------------- backtrace begins here ---------------
Program compiled with Clang 16.0.6
Configured with flags: Configured with these definitions: -DDISTR_BUILD=jammy -DUSE_SYSLOG=1 -DWITH_GALERA=1 -DWITH_RE2=1 -DWITH_RE2_FORCE_STATIC=1 -DWITH_STEMMER=1 -DWITH_STEMMER_FORCE_STATIC=1 -DWITH_NLJSON=1 -DWITH_UNIALGO=1 -DWITH_ICU=1 -DWITH_ICU_FORCE_STATIC=1 -DWITH_SSL=1 -DWITH_ZLIB=1 -DDL_ZLIB=1 -DZLIB_LIB=libz.so.1 -DWITH_ZSTD=1 -DDL_ZSTD=1 -DZSTD_LIB=libzstd.so.1 -DWITH_CURL=1 -DDL_CURL=1 -DCURL_LIB=libcurl.so.4 -DWITH_ODBC=1 -DDL_ODBC=1 -DODBC_LIB=libodbc.so.2 -DWITH_EXPAT=1 -DDL_EXPAT=1 -DEXPAT_LIB=libexpat.so.1 -DWITH_ICONV=1 -DWITH_MYSQL=1 -DDL_MYSQL=1 -DMYSQL_LIB=libmysqlclient.so.21 -DWITH_POSTGRESQL=1 -DDL_POSTGRESQL=1 -DPOSTGRESQL_LIB=libpq.so.5 -DLOCALDATADIR=/var/lib/manticore -DFULL_SHARE_DIR=/usr/share/manticore
Built on Linux x86_64 (jammy) (cross-compiled)
Stack bottom = 0x0, thread stack size = 0x20000
Trying system backtrace:
begin of system symbols:
indexer(_Z12sphBacktraceib+0x227)[0x558b1110e807]
indexer(_Z7sigsegvi+0xbb)[0x558b11001eeb]
/lib/x86_64-linux-gnu/libc.so.6(+0x42520)[0x7fc8da48f520]
indexer(+0xcd3c61)[0x558b11023c61]
indexer(_ZN13CSphIndex_VLN5BuildERKN3sph8Vector_TIP10CSphSourceNS0_13DefaultCopy_TIS3_EENS0_14DefaultRelimitENS0_16DefaultStorage_TIS3_EEEEiiR17CSphIndexProgress+0x100d)[0x558b11020d0d]
indexer(_Z7DoIndexRK17CSphConfigSectionPKcRK15CSphOrderedHashIS_10CSphString15CSphStrHashFuncLi256EEP8_IO_FILE+0x1d60)[0x558b10fffce0]
indexer(main+0x2a1a)[0x558b11004ffa]
/lib/x86_64-linux-gnu/libc.so.6(+0x29d90)[0x7fc8da476d90]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80)[0x7fc8da476e40]
indexer(_start+0x25)[0x558b10ff6d75]
Trying boost backtrace:
0# sphBacktrace(int, bool) in indexer
1# sigsegv(int) in indexer
2# 0x00007FC8DA48F520 in /lib/x86_64-linux-gnu/libc.so.6
3# 0x0000558B11023C61 in indexer
4# CSphIndex_VLN::Build(sph::Vector_T<CSphSource*, sph::DefaultCopy_T<CSphSource*>, sph::DefaultRelimit, sph::DefaultStorage_T<CSphSource*> > const&, int, int, CSphIndexProgress&) in indexer
5# DoIndex(CSphConfigSection const&, char const*, CSphOrderedHash<CSphConfigSection, CSphString, CSphStrHashFunc, 256> const&, _IO_FILE*) in indexer
6# main in indexer
7# 0x00007FC8DA476D90 in /lib/x86_64-linux-gnu/libc.so.6
8# __libc_start_main in /lib/x86_64-linux-gnu/libc.so.6
9# _start in indexer
-------------- backtrace ends here ---------------
crash of indexer was fixed at https://github.com/manticoresoftware/manticoresearch/commit/eb1d30a3f8ce956d3b3efcbc58b3cedcd2efc95a now indexer exits with error message in case of duplicate attributes or fields declared
You need to use indexer from the dev package repository to get the crash fixed
@PavelShilin89 could you create clt test with the two cases:
cat << 'EOF' > xml
<?xml version="1.0" encoding="utf-8"?>
<sphinx:docset xmlns:sphinx="http://sphinxsearch.com/">
<sphinx:schema>
<sphinx:field name="title"/>
<sphinx:field name="title"/>
<sphinx:attr name="a" type="string" />
</sphinx:schema>
<sphinx:document id="10">
<title>b</title>
<title>c</title>
<a>a</a>
</sphinx:document>
</sphinx:docset>
EOF
cat << 'EOF' > xml_crash.conf source min { type = xmlpipe2 xmlpipe_command = cat xml }
index idx { path = idx source = min } EOF
for every config posted indexer should exits with the error message but does not crash
Bug Description:
xml-files-for-index.zip
manticore.conf
docker compose file
Бинлогов и вообще как таковых логов нет, есть только вот такие файлы индекса
Manticore Search Version:
6.3.2
Operating System Version:
Debian GNU/Linux 11 (bullseye)
Have you tried the latest development version?
No
Internal Checklist:
To be completed by the assignee. Check off tasks that have been completed or are not applicable.