Падение службы после попытки добавление поля

Имеется запрос на добавление поля типа TEXT

ALTER TABLE requestind_v2 ADD COLUMN ssoid TEXT

При выполнении возникает ошибка

------- FATAL: CRASH DUMP -------
[Fri Jan 12 10:31:07.395 2024] [  737]

--- crashed SphinxQL request dump ---
ALTER TABLE requestind_v2 ADD COLUMN ssoid TEXT
--- request dump end ---
--- local index:
Manticore 6.2.12 dc5144d35@230822 (columnar 2.2.4 5aec342@230822) (secondary 2.2.4 5aec342@230822)
Handling signal 11
-------------- backtrace begins here ---------------
Program compiled with Clang 15.0.7
Configured with flags: Configured with these definitions: -DDISTR_BUILD=buster -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$
Built on Linux x86_64 (buster) (cross-compiled)
Stack bottom = 0x7a7454044190, thread stack size = 0x20000
Trying manual backtrace:
Something wrong with thread stack, manual backtrace may be incorrect (fp=0x1)
Wrong stack limit or frame pointer, manual backtrace failed (fp=0x1, stack=0x7a7454040000, stacksize=0x20000)
Trying system backtrace:
begin of system symbols:
/usr/bin/searchd(_Z12sphBacktraceib+0x22a)[0x588d0ec8c7fa]
/usr/bin/searchd(_ZN11CrashLogger11HandleCrashEi+0x355)[0x588d0eb0ac05]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x12730)[0x7a77aa245730]
/usr/bin/searchd(_ZN13CSphIndex_VLN21AddRemoveFromDocstoreERK10CSphSchemaS2_R10CSphString+0x126)[0x588d0eb9b846]
/usr/bin/searchd(_ZN13CSphIndex_VLN14AddRemoveFieldEbRK10CSphStringjRS0_+0x1b2)[0x588d0ebaa7e2]
/usr/bin/searchd(_ZN9RtIndex_c14AddRemoveFieldEbRK10CSphStringjRS0_+0x229)[0x588d0f8c2079]
/usr/bin/searchd(+0xeaccb0)[0x588d0eb58cb0]
/usr/bin/searchd(_ZN15ClientSession_c7ExecuteESt4pairIPKciER11RowBuffer_i+0x193b)[0x588d0eb557cb]
/usr/bin/searchd(_Z20ProcessSqlQueryBuddySt4pairIPKciERhR21GenericOutputBuffer_c+0x52)[0x588d0eab2222]
/usr/bin/searchd(_Z8SqlServeSt10unique_ptrI16AsyncNetBuffer_cSt14default_deleteIS0_EE+0x106e)[0x588d0ea9790e]
/usr/bin/searchd(_Z10MultiServeSt10unique_ptrI16AsyncNetBuffer_cSt14default_deleteIS0_EESt4pairIitE7Proto_e+0x43)[0x588d0ea936c3]
/usr/bin/searchd(+0xde8272)[0x588d0ea94272]
/usr/bin/searchd(_ZZN7Threads11CoRoutine_c13CreateContextESt8functionIFvvEESt4pairIN5boost7context13stack_contextENS_14StackFlavour_EEEENUlNS6_6detail10transfer_tEE_8__invokeESB_+0x1c)[0x588d0fddaaac]
/usr/bin/searchd(make_fcontext+0x2f)[0x588d0fdfb33f]
Trying boost backtrace:
 0# sphBacktrace(int, bool) in /usr/bin/searchd
 1# CrashLogger::HandleCrash(int) in /usr/bin/searchd
 2# 0x00007A77AA245730 in /lib/x86_64-linux-gnu/libpthread.so.0
 3# CSphIndex_VLN::AddRemoveFromDocstore(CSphSchema const&, CSphSchema const&, CSphString&) in /usr/bin/searchd
 4# CSphIndex_VLN::AddRemoveField(bool, CSphString const&, unsigned int, CSphString&) in /usr/bin/searchd
 5# RtIndex_c::AddRemoveField(bool, CSphString const&, unsigned int, CSphString&) in /usr/bin/searchd
 6# 0x0000588D0EB58CB0 in /usr/bin/searchd
 7# ClientSession_c::Execute(std::pair<char const*, int>, RowBuffer_i&) in /usr/bin/searchd
 8# ProcessSqlQueryBuddy(std::pair<char const*, int>, unsigned char&, GenericOutputBuffer_c&) in /usr/bin/searchd
 9# SqlServe(std::unique_ptr<AsyncNetBuffer_c, std::default_delete<AsyncNetBuffer_c> >) in /usr/bin/searchd
10# MultiServe(std::unique_ptr<AsyncNetBuffer_c, std::default_delete<AsyncNetBuffer_c> >, std::pair<int, unsigned short>, Proto_e) in /usr/bin/searchd
11# 0x0000588D0EA94272 in /usr/bin/searchd
12# Threads::CoRoutine_c::CreateContext(std::function<void ()>, std::pair<boost::context::stack_context, Threads::StackFlavour_E>)::{lambda(boost::context::detail::transfer_t)#1}::__invoke(boost::context::detail::transfer_t) in /usr/bin/searchd
13# make_fcontext in /usr/bin/searchd

-------------- 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 manual
(https://manual.manticoresearch.com/Reporting_bugs)
Dump with GDB via watchdog
--- active threads ---
thd 0 (work_0), proto mysql, state query, command alter_add
--- Totally 3 threads, and 1 client-working threads ---
------- CRASH DUMP END -------

Прошу помочь в решении данной проблемы.

можете проверить requestind_v2 индекс indextool -c your.conf --check requestind_v2 - если есть ошибки, то возможно индекс не валидный и это вызывает падения при его модификации \ добавлении поля

Или же если у вас есть воспроизводимый пример, то создайте тикет на Github, куда приложите конфиг, индекс и запрос который вызывает креш.

Уже не могу: выполнен откат индекса из РК

Ещё момент: в документации https://manual.manticoresearch.com/Creating_a_table/Local_tables/Plain_and_real-time_table_settings#General-syntax-of-CREATE-TABLE
указано, что тип данных TEXT является псевдонимом типа STRING. Эти типы данных идентичны друг другу?

мне кажется не полностью, тк

  • TEXT это полнотекстовое поле + docstore
  • STRING это полнотекстовое поле + строковый атрибут

ну те полнотекстовое поле совпадает и там и там, а атрибут или докстор - разные сценарии использования

1 Like

Спасибо за оперативный ответ

Погодите, хотя могу: попробую создать новое поле типа TEXT. И сделаю предварительно чек индекса.

Отчёт по проверке индекса

indextool -c /etc/manticoresearch/manticore.conf --check requestind_v2
Manticore 6.2.12 dc5144d35@230822 (columnar 2.2.4 5aec342@230822) (secondary 2.2.4 5aec342@230822)
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-2023, Manticore Software LTD (https://manticoresearch.com)

using config file '/etc/manticoresearch/manticore.conf'...
checking table 'requestind_v2'...
WARNING: failed to load RAM chunks, checking only 4 disk chunks
checking schema...
checking disk chunk, extension 2407, 0(4)...
FAILED, unable to open stopwords 'stopwords_0.txt': No such file or directory
checking schema...
checking dictionary...
checking data...
checking rows...
checking attribute blocks index...
checking kill-list...
checking dead row map...
checking doc-id lookup...
check FAILED, 1 failures reported, 421.1 sec elapsed
checking disk chunk, extension 2408, 1(4)...
WARNING: failed to load stopwords from either 'stopwords_0.txt' or '/usr/share/manticore/stopwords/stopwords_0.txt'
FAILED, unable to open stopwords 'stopwords_0.txt': No such file or directory
checking schema...
checking dictionary...
checking data...
checking rows...
checking attribute blocks index...
checking kill-list...
checking dead row map...
checking doc-id lookup...
check FAILED, 2 failures reported, 920.7 sec elapsed
checking disk chunk, extension 2412, 2(4)...
WARNING: failed to load stopwords from either 'stopwords_0.txt' or '/usr/share/manticore/stopwords/stopwords_0.txt'
FAILED, unable to open stopwords 'stopwords_0.txt': No such file or directory
checking schema...
checking dictionary...
checking data...
checking rows...
checking attribute blocks index...
checking kill-list...
checking dead row map...
checking doc-id lookup...
check FAILED, 3 failures reported, 1335.8 sec elapsed
checking disk chunk, extension 2411, 3(4)...
WARNING: failed to load stopwords from either 'stopwords_0.txt' or '/usr/share/manticore/stopwords/stopwords_0.txt'
FAILED, unable to open stopwords 'stopwords_0.txt': No such file or directory
checking schema...
checking dictionary...
checking data...
checking rows...
checking attribute blocks index...
checking kill-list...
checking dead row map...
checking doc-id lookup...
check FAILED, 4 failures reported, 1712.4 sec elapsed
check FAILED, 4 failures reported, 1712.4 sec elapsed

Примечание: ошибка поиска пути до стоп-слова - это баг. С помощью ALTER TABLE не правится.

Отчёт по запуску запроса на создание поля с типом TEXT

------ FATAL: CRASH DUMP -------
[Fri Jan 12 15:51:50.318 2024] [  747]

--- crashed SphinxQL request dump ---
ALTER TABLE requestind_v2 ADD COLUMN ssoid_new TEXT
--- request dump end ---
--- local index:^@^@^@^@^@^@^@^@��^G�,
Manticore 6.2.12 dc5144d35@230822 (columnar 2.2.4 5aec342@230822) (secondary 2.2.4 5aec342@230822)
Handling signal 11
-------------- backtrace begins here ---------------
Program compiled with Clang 15.0.7
Configured with flags: Configured with these definitions: -DDISTR_BUILD=buster -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$
Built on Linux x86_64 (buster) (cross-compiled)
Stack bottom = 0x732970023bd0, thread stack size = 0x20000
Trying manual backtrace:
Something wrong with thread stack, manual backtrace may be incorrect (fp=0x1)
Wrong stack limit or frame pointer, manual backtrace failed (fp=0x1, stack=0x732970020000, stacksize=0x20000)
Trying system backtrace:
begin of system symbols:
/usr/bin/searchd(_Z12sphBacktraceib+0x22a)[0x57ea9fbfd7fa]
/usr/bin/searchd(_ZN11CrashLogger11HandleCrashEi+0x355)[0x57ea9fa7bc05]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x12730)[0x732cd82ae730]
/usr/bin/searchd(_ZN13CSphIndex_VLN21AddRemoveFromDocstoreERK10CSphSchemaS2_R10CSphString+0x126)[0x57ea9fb0c846]
/usr/bin/searchd(_ZN13CSphIndex_VLN14AddRemoveFieldEbRK10CSphStringjRS0_+0x1b2)[0x57ea9fb1b7e2]
/usr/bin/searchd(_ZN9RtIndex_c14AddRemoveFieldEbRK10CSphStringjRS0_+0x229)[0x57eaa0833079]
/usr/bin/searchd(+0xeaccb0)[0x57ea9fac9cb0]
/usr/bin/searchd(_ZN15ClientSession_c7ExecuteESt4pairIPKciER11RowBuffer_i+0x193b)[0x57ea9fac67cb]
/usr/bin/searchd(_Z20ProcessSqlQueryBuddySt4pairIPKciERhR21GenericOutputBuffer_c+0x52)[0x57ea9fa23222]
/usr/bin/searchd(_Z8SqlServeSt10unique_ptrI16AsyncNetBuffer_cSt14default_deleteIS0_EE+0x106e)[0x57ea9fa0890e]
/usr/bin/searchd(_Z10MultiServeSt10unique_ptrI16AsyncNetBuffer_cSt14default_deleteIS0_EESt4pairIitE7Proto_e+0x43)[0x57ea9fa046c3]
/usr/bin/searchd(+0xde8272)[0x57ea9fa05272]
/usr/bin/searchd(_ZZN7Threads11CoRoutine_c13CreateContextESt8functionIFvvEESt4pairIN5boost7context13stack_contextENS_14StackFlavour_EEEENUlNS6_6detail10transfer_tEE_8__invokeESB_+0x1c)[0x57eaa0d4baac]
/usr/bin/searchd(make_fcontext+0x2f)[0x57eaa0d6c33f]
Trying boost backtrace:
 0# sphBacktrace(int, bool) in /usr/bin/searchd
 1# CrashLogger::HandleCrash(int) in /usr/bin/searchd
 2# 0x0000732CD82AE730 in /lib/x86_64-linux-gnu/libpthread.so.0
 3# CSphIndex_VLN::AddRemoveFromDocstore(CSphSchema const&, CSphSchema const&, CSphString&) in /usr/bin/searchd
 4# CSphIndex_VLN::AddRemoveField(bool, CSphString const&, unsigned int, CSphString&) in /usr/bin/searchd
 5# RtIndex_c::AddRemoveField(bool, CSphString const&, unsigned int, CSphString&) in /usr/bin/searchd
 6# 0x000057EA9FAC9CB0 in /usr/bin/searchd
 7# ClientSession_c::Execute(std::pair<char const*, int>, RowBuffer_i&) in /usr/bin/searchd
 8# ProcessSqlQueryBuddy(std::pair<char const*, int>, unsigned char&, GenericOutputBuffer_c&) in /usr/bin/searchd
 9# SqlServe(std::unique_ptr<AsyncNetBuffer_c, std::default_delete<AsyncNetBuffer_c> >) in /usr/bin/searchd
10# MultiServe(std::unique_ptr<AsyncNetBuffer_c, std::default_delete<AsyncNetBuffer_c> >, std::pair<int, unsigned short>, Proto_e) in /usr/bin/searchd
11# 0x000057EA9FA05272 in /usr/bin/searchd
12# Threads::CoRoutine_c::CreateContext(std::function<void ()>, std::pair<boost::context::stack_context, Threads::StackFlavour_E>)::{lambda(boost::context::detail::transfer_t)#1}::__invoke(boost::context::detail::transfer_t) in /usr/bin/searchd
13# make_fcontext in /usr/bin/searchd

-------------- 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 manual
(https://manual.manticoresearch.com/Reporting_bugs)
Dump with GDB via watchdog
--- active threads ---
thd 0 (work_1), proto mysql, state query, command alter_add
--- Totally 3 threads, and 1 client-working threads ---
------- CRASH DUMP END -------

если креш повторяется на ваших данных, то лучше создать тикет на Github куда приложить данные для воспроизведения конфиг, индекс и лог демона с крешем. Индекс вы можете залить как описано в нашем manual

Хорошо