Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

memtx: unreferencing dirty tuple #5423

Closed
Buristan opened this issue Oct 14, 2020 · 0 comments
Closed

memtx: unreferencing dirty tuple #5423

Buristan opened this issue Oct 14, 2020 · 0 comments
Assignees
Labels
bug Something isn't working crash
Milestone

Comments

@Buristan
Copy link
Collaborator

Tarantool version: 2.6.0-157

Failed assertion when unreferencing dirty tuple, when use transaction manager feature:

tarantool: /home/burii/builds_workspace/tarantool/master/src/box/tuple.h:1110: void tuple_unref(tuple*): Assertion `!tuple->is_dirty' failed.
Backtrace:
#0  0x00007fcf7c05d5f1 in raise () from /lib64/libc.so.6
#1  0x00007fcf7c04753b in abort () from /lib64/libc.so.6
#2  0x00007fcf7c04740f in __assert_fail_base.cold () from /lib64/libc.so.6
#3  0x00007fcf7c055ed2 in __assert_fail () from /lib64/libc.so.6
#4  0x0000560b38b5e71f in tuple_unref (tuple=0x7fcf6b088074) at /home/burii/builds_workspace/tarantool/master/src/box/tuple.h:1110
#5  0x0000560b38b5e790 in tuple_bless (tuple=0x7fcf6b08808c) at /home/burii/builds_workspace/tarantool/master/src/box/tuple.h:1130
#6  0x0000560b38b5f6d7 in box_process_rw (request=0x7fcf7b5ffcc0, space=0x560b392147a0, result=0x7fcf7b5ffd50) at /home/burii/builds_workspace/tarantool/master/src/box/box.cc:260
#7  0x0000560b38b63b6a in box_process1 (request=0x7fcf7b5ffcc0, result=0x7fcf7b5ffd50) at /home/burii/builds_workspace/tarantool/master/src/box/box.cc:1358
#8  0x0000560b38b64077 in box_replace (space_id=512, tuple=0x7fcf7b426038 "\222\001\001", tuple_end=0x7fcf7b42603b "", result=0x7fcf7b5ffd50)
    at /home/burii/builds_workspace/tarantool/master/src/box/box.cc:1461
#9  0x0000560b38c24766 in lbox_replace (L=0x41dd4378) at /home/burii/builds_workspace/tarantool/master/src/box/lua/index.c:72
#10 0x0000560b38dac78b in lj_BC_FUNCC ()
#11 0x0000560b38d6f4cf in lua_pcall (L=0x41dd4378, nargs=0, nresults=0, errfunc=0) at lj_api.c:1158
#12 0x0000560b38cf6497 in luaT_call (L=0x41dd4378, nargs=0, nreturns=0) at /home/burii/builds_workspace/tarantool/master/src/lua/utils.c:1016
#13 0x0000560b38ced1cd in lua_main (L=0x41dd4378, argc=1, argv=0x560b391bdf58) at /home/burii/builds_workspace/tarantool/master/src/lua/init.c:546
#14 0x0000560b38ced6ac in run_script_f (ap=0x7fcf7b400448) at /home/burii/builds_workspace/tarantool/master/src/lua/init.c:619
#15 0x0000560b38b228c9 in fiber_cxx_invoke(fiber_func, typedef __va_list_tag __va_list_tag *) (f=0x560b38ced1e6 <run_script_f>, ap=0x7fcf7b400448)
    at /home/burii/builds_workspace/tarantool/master/src/lib/core/fiber.h:788
#16 0x0000560b38d18480 in fiber_loop (data=0x0) at /home/burii/builds_workspace/tarantool/master/src/lib/core/fiber.c:879
#17 0x0000560b38f7ba41 in coro_init () at /home/burii/builds_workspace/tarantool/master/third_party/coro/coro.c:110

Lua chunk to reproduce:

box.cfg{
    work_dir="/tmp/",
    memtx_use_mvcc_engine  = true,
}

s = box.schema.space.create('test')
i1 = s:create_index('pk', {parts={{1, 'uint'}}})
i2 = s:create_index('sec', {parts={{2, 'uint'}}})

s:replace{1, 0}
s:delete{1}
collectgarbage()
s:replace{1, 1}
s:replace{1, 2}
@Buristan Buristan added crash bug Something isn't working labels Oct 14, 2020
@kyukhin kyukhin added this to the 2.6.1 milestone Oct 15, 2020
avtikhon added a commit that referenced this issue Oct 22, 2020
The issue is under investigation in issues #5423. Need to block the
test OSX to avoid of its stable fail.
avtikhon added a commit that referenced this issue Oct 22, 2020
The issue is under investigation in issues #5423. Need to block the
test OSX to avoid of its stable fail.

Needed for #5423
avtikhon added a commit that referenced this issue Oct 22, 2020
The issue is under investigation in issues #5423. Need to block the
test on OSX to avoid of its stable fail.

Needed for #5423
avtikhon added a commit that referenced this issue Oct 22, 2020
Added:

  box/access.test.lua				 	gh-5373 gh-5411
  box/net.box_incorrect_iterator_gh-841.test.lua	gh-5434
  box/tx_man.test.lua					gh-5423
  replication/election_qsync.test.lua			gh-5430

Removed:

  replication/gh-5426-election-on-off.test.lua		gh-5433
alyapunov added a commit that referenced this issue Oct 22, 2020
alyapunov added a commit that referenced this issue Oct 22, 2020
alyapunov added a commit that referenced this issue Oct 22, 2020
Tx stories must be linked into correct double-linked list.
Preserve it.

Part of #5423
alyapunov added a commit that referenced this issue Oct 22, 2020
There was a mess in tuple refernce in TX history.
Now it was remade in the following asumptions:
 * a clean tuple belongs to space, and the space implicitly holds
a reference to the tuple.
 * a dirty tuple belongs to TX manager and a reference is held
in the corresponding story.

Closes #5423
alyapunov added a commit that referenced this issue Oct 22, 2020
Tx stories must be linked into correct double-linked list.
Preserve it.

Part of #5423
alyapunov added a commit that referenced this issue Oct 22, 2020
There was a mess in tuple refernce in TX history.
Now it was remade in the following asumptions:
 * a clean tuple belongs to space, and the space implicitly holds
a reference to the tuple.
 * a dirty tuple belongs to TX manager and a reference is held
in the corresponding story.

Closes #5423
kyukhin pushed a commit that referenced this issue Oct 22, 2020
Tx stories must be linked into correct double-linked list.
Preserve it.

Part of #5423
@alyapunov alyapunov self-assigned this Oct 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working crash
Projects
None yet
Development

No branches or pull requests

3 participants