Skip to content

Assertion has triggered: src/box/vy_cache.c:383: vy_cache_add: Assertion `cmp == 0' failed. #10512

@ligurio

Description

@ligurio

Bug description

tarantool has crashed again on running test for vinyl engine

  • OS: Linux
  • OS Version: Ubuntu 24.04
  • Architecture: amd64

Tarantool 3.3.0-entrypoint-31-g9eb397499
Target: Linux-x86_64-RelWithDebInfo
Build options: cmake . -DCMAKE_INSTALL_PREFIX=/usr/local -DENABLE_BACKTRACE=TRUE
Compiler: Clang-18.1.3
C_FLAGS: -fexceptions -funwind-tables -fasynchronous-unwind-tables -fno-common -msse2 -Wformat -Wformat-security -Werror=format-security -fstack-protector-strong -fPIC -fmacro-prefix-map=/home/ubuntu/tarantool=. -std=c11 -Wall -Wextra -Wno-gnu-alignof-expression -Wno-cast-function-type -O2 -g -DNDEBUG -ggdb -O2
CXX_FLAGS: -fexceptions -funwind-tables -fasynchronous-unwind-tables -fno-common -msse2 -Wformat -Wformat-security -Werror=format-security -fstack-protector-strong -fPIC -fmacro-prefix-map=/home/ubuntu/tarantool=. -std=c++11 -Wall -Wextra -Wno-invalid-offsetof -Wno-gnu-alignof-expression -Wno-cast-function-type -O2 -g -DNDEBUG -ggdb -O2

Steps to reproduce

$ seed=$RANDOM; ./build/src/tarantool ./test/fuzz/lua/test_engine.lua --workers 6000 --test_duration $((2*60*60)) --engine vinyl --verbose --seed $seed 2>&1 | tee vinyl.log; echo $seed

seed is 8948

Actual behavior

#0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:44
#1  __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
#2  __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
#3  0x00007c63a884526e in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4  0x00007c63a88288ff in __GI_abort () at ./stdlib/abort.c:79
#5  0x000055a28cbba1a2 in crash_signal_cb (signo=<optimized out>, siginfo=<optimized out>, context=<optimized out>)
    at /home/ubuntu/tarantool/src/lib/core/crash.c:204
#6  <signal handler called>
#7  0x000055a28ca7f688 in matras_view_get_no_check (m=0x55a28d8de970, v=<optimized out>, id=<optimized out>)
    at /home/ubuntu/tarantool/src/lib/small/include/small/matras.h:414
#8  matras_view_get (m=0x55a28d8de970, v=<optimized out>, id=<optimized out>) at /home/ubuntu/tarantool/src/lib/small/include/small/matras.h:424
#9  bps_tree_vy_cache_tree_restore_block (tree=0x55a28d8de920, id=<optimized out>) at /home/ubuntu/tarantool/src/lib/salad/bps_tree.h:1863
#10 bps_tree_vy_cache_tree_get_leaf_safe (tree=<optimized out>, itr=<optimized out>) at /home/ubuntu/tarantool/src/lib/salad/bps_tree.h:2282
#11 bps_tree_vy_cache_tree_iterator_get_elem (tree=<optimized out>, itr=<optimized out>) at /home/ubuntu/tarantool/src/lib/salad/bps_tree.h:2924
#12 vy_cache_tree_iterator_get_elem (tree=<optimized out>, itr=<optimized out>) at /home/ubuntu/tarantool/src/lib/salad/bps_tree.h:2934
#13 vy_cache_gc_step (env=0x55a28d89f178) at /home/ubuntu/tarantool/src/box/vy_cache.c:192
#14 vy_cache_gc (env=0x55a28d89f178) at /home/ubuntu/tarantool/src/box/vy_cache.c:218
#15 0x000055a28ca7facc in vy_cache_add (cache=0x55a28d8de910, curr=..., prev=..., is_first=false, key=..., order=ITER_GE)
    at /home/ubuntu/tarantool/src/box/vy_cache.c:249
#16 0x000055a28ca7d261 in vy_read_iterator_cache_add (itr=itr@entry=0x7c602aba3858, entry=...)
    at /home/ubuntu/tarantool/src/box/vy_read_iterator.c:981
#17 0x000055a28ca5902e in vinyl_iterator_primary_next (base=0x7c602aba37d8, ret=0x7c6093080dd0) at /home/ubuntu/tarantool/src/box/vinyl.c:3727
#18 0x000055a28ca1dd1d in iterator_next (it=0x7c602aba37d8, ret=0x7c6093080dd0) at /home/ubuntu/tarantool/src/box/index.cc:639
#19 generic_index_count (index=<optimized out>, type=<optimized out>, key=<optimized out>, part_count=<optimized out>)
    at /home/ubuntu/tarantool/src/box/index.cc:926
#20 0x000055a28ca1cc29 in index_count (index=0x55a28d8de640, type=ITER_ALL, key=0x7c602c92a039 "\307\a\001", part_count=0)
    at /home/ubuntu/tarantool/src/box/index.h:895
#21 box_index_count (space_id=<optimized out>, index_id=<optimized out>, type=2, key=0x7c602c92a039 "\307\a\001", key_end=<optimized out>)
    at /home/ubuntu/tarantool/src/box/index.cc:486
#22 0x000055a28cb727b9 in lbox_index_count (L=0x417e2590) at /home/ubuntu/tarantool/src/box/lua/index.c:282
#23 0x000055a28cbfcbb3 in lj_BC_FUNCC () at /home/ubuntu/tarantool/build/third_party/luajit/src/lj_vm.S:811
#24 0x000055a28cc04375 in lua_pcall (L=0xffff, L@entry=0x417e2590, nargs=<optimized out>, nresults=nresults@entry=-1, errfunc=errfunc@entry=0)
    at /home/ubuntu/tarantool/third_party/luajit/src/lj_api.c:1173
#25 0x000055a28cba10df in luaT_call (L=0xffff, L@entry=0x417e2590, nargs=5, nreturns=16, nreturns@entry=-1)
    at /home/ubuntu/tarantool/src/lua/utils.c:695
#26 0x000055a28cb9a651 in lua_fiber_run_f (ap=<optimized out>) at /home/ubuntu/tarantool/src/lua/fiber.c:435
#27 0x000055a28ca0cfb9 in fiber_cxx_invoke (f=0x55a28dcd5a90, ap=0x5) at /home/ubuntu/tarantool/src/lib/core/fiber.h:1324
#28 0x000055a28cbc0915 in fiber_loop (data=<optimized out>) at /home/ubuntu/tarantool/src/lib/core/fiber.c:1162
#29 0x000055a28ce2a021 in coro_init () at /home/ubuntu/tarantool/third_party/coro/coro.c:108
Segmentation fault             
  code: 128                                                                                                                                        
  addr: (nil)                                                                                                                                      
  context: 0x55a28d85dd80
  siginfo: 0x55a28d85deb0
  rax      0x55a28dcd5a90     94156652108432
  rbx      0x80               128
  rcx      0x400005b040000d2  288230767060844754
  rdx      0x10               16
  rsi      0x5                5
  rdi      0xffff             65535
  rsp      0x7c60930808d0     136754225481936
  rbp      0x55a28d89f178     94156647690616
  r8       0x1f               31
  r9       0x200              512
  r10      0x7ff              2047
  r11      0x55a28d8de970     94156647950704
  r12      0x1f               31
  r13      0xffff             65535
  r14      0xffff             65535
  r15      0x7c6028a88568     136752440837480
  rip      0x55a28ca7f688     94156632880776
  eflags   0x10202            66050
  cs       0x33               51
  gs       0x0                0
  fs       0x0                0
  cr2      0x0                0
  err      0x0                0
  oldmask  0x0                0
  trapno   0xd                13
Current time: 1725364984
Please file a bug at https://github.com/tarantool/tarantool/issues
Attempting backtrace... Note: since the server has already crashed, 
this may fail as well
#1  0x55a28cbba24f in crash_collect+127
#2  0x55a28cbba1b3 in crash_signal_cb+179
#3  0x7c63a8845320 in __sigaction+80
#4  0x55a28ca7f688 in vy_cache_gc+536
#5  0x55a28ca7facc in vy_cache_add+92
#6  0x55a28ca7d261 in vy_read_iterator_cache_add+81
#7  0x55a28ca5902e in vinyl_iterator_primary_next+206
#8  0x55a28ca1dd1d in generic_index_count+109
#9  0x55a28ca1cc29 in box_index_count+425
#10 0x55a28cb727b9 in lbox_index_count+265
#11 0x55a28cbfcbb3 in lj_BC_FUNCC+70
#12 0x55a28cc04375 in lua_pcall+117
#13 0x55a28cba10df in luaT_call+15
#14 0x55a28cb9a651 in lua_fiber_run_f+97
#15 0x55a28ca0cfb9 in fiber_cxx_invoke(int (*)(__va_list_tag*), __va_list_tag*)+9
#16 0x55a28cbc0915 in fiber_loop+85
#17 0x55a28ce2a021 in coro_init+81

tarantool binary and coredump
https://drive.google.com/file/d/1eV00DmZxBt1T1aypHd5vszZyiMpESVRO/view?usp=sharing

Expected behavior

no crash

Metadata

Metadata

Assignees

Labels

2.11Target is 2.11 and all newer release/master branches3.2Target is 3.2 and all newer release/master branchesbugSomething isn't workingcrashvinyl

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions