manticoresearch
manticoresearch copied to clipboard
CRASH on delete query
Describe the bug
CRASH on delete query:
delete from cards where doc_id = '00116637-85d7-469a-9434-ea3bc814a95a';
------- FATAL: CRASH DUMP -------
[Mon Jul 18 15:16:15.850 2022] [ 7532]--- crashed SphinxQL request dump ---
delete from cards where doc_id = '00116637-85d7-469a-9434-ea3bc814a95a'
--- request dump end ---
--- local index:cards
Manticore 5.0.2 348514c@220530 dev
Handling signal 11
-------------- backtrace begins here ---------------
Program compiled with Clang 7.0.1
Configured with flags: Configured with these definitions: -DDISTR_BUILD=rhel7 -DUSE_SYSLOG=1 -DWITH_GALERA=1 -DWITH_RE2=1 -DWITH_RE2_FORCE_STATIC=1 -DWITH_STEMMER=1 -DWITH_STEMMER_FORCE_STATIC=1 -DWITH_ICU=1 -DWITH_ICU_FORCE_STATIC=1 -DWITH_SSL=1 -DWITH_ZLIB=1 -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.18 -DWITH_POSTGRESQL=1 -DDL_POSTGRESQL=1 -DPOSTGRESQL_LIB=libpq.so.5 -DLOCALDATADIR=/var/lib/manticore/data -DFULL_SHARE_DIR=/usr/share/manticore
Host OS is Linux x86_64
Stack bottom = 0x7f0b70043ca0, thread stack size = 0x20000
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[0x5a8540]
/usr/bin/searchd[0x47fe90]
/lib64/libpthread.so.0( 0xf630)[0x7f0ccd2e4630]
Trying boost backtrace:
0# 0x00000000005A8595 in /usr/bin/searchd
1# 0x000000000047FE90 in /usr/bin/searchd
2# 0x00007F0CCD2E4630 in /lib64/libpthread.so.0-------------- backtrace ends here ---------------
To Reproduce
Steps to reproduce the behavior:
create table cards(id bigint, doc_id string, doc text indexed) engine='columnar' min_prefix_len='2';- Create a python script:
import manticoresearch
import uuid
import multiprocessing as mp
import datetime
def f():
config = manticoresearch.Configuration( host = "http://127.0.0.1:9308" )
client = manticoresearch.ApiClient( config )
utilsApi = manticoresearch.UtilsApi( client )
for i in range( 75_000_000 ):
utilsApi.sql('insert into cards(doc_id, doc) '
'values (' '\'' str(uuid.uuid4()) '\'' ', ' '\'' '{\"random\":\"' str(uuid.uuid4()) '\"}' '\'' ')')
print(datetime.datetime.now())
workers = []
for i in range( 2 ):
worker = mp.Process(target=f, args=())
worker.daemon = True
worker.start()
workers.append( worker )
for worker in workers:
worker.join()
print(datetime.datetime.now())
print('ok')
- Run the created script.
- Execute a deletion request:
delete from cards where doc_id = '00116637-85d7-469a-9434-ea3bc814a95a';
Expected behavior
Record with doc_id = '00116637-85d7-469a-9434-ea3bc814a95a' will be delete.
Describe the environment:
- Manticore Search version: Manticore 5.0.2 348514c@220530 dev
- OS version (
uname -aif on a Unix-like system): CentOS
Messages from log files:
"SPBL...."
Notice, 'text' type means that row is stored and indexed. That is NOT string attribute, and so, expected behavior here is just error message like "unsupported column 'X' (stored field, NOT attribute)"
MRE with stored
create table a(b text);
insert into a(b) values ('c');
delete from a where b='c';
Causes crash. Expected error message like index a: unsupported column 'b' (stored field, NOT attribute)
➤ Ilya Kuznetsov commented:
Fixed in 21a241ad