Skip to content

Asynchronously committing async transaction after sync transaction with timeout crashes after timeout #10853

@CuriousGeorgiy

Description

@CuriousGeorgiy
fiber = require('fiber')

box.cfg{
    replication_synchro_timeout = 10,
    replication_synchro_quorum = 2,
}

box.schema.create_space('a', {is_sync = false}):create_index('p')
box.schema.create_space('s', {is_sync = true}):create_index('p')

box.ctl.promote()

fiber.create(function() box.space.s:replace{0} end)
box.atomic({wait = 'none'}, function() box.space.a:replace{0} end)

Actual behavior

After replication_synchro_timeout fires, the server crashes with this backtrace:

(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)
  * frame #0: 0x00000001050762e1 tarantool`txn_limbo_wait_complete(limbo=0x000000010593b7d8, entry=0x0000000107434428) at txn_limbo.c:382:24
    frame #1: 0x000000010506f547 tarantool`txn_commit_impl(txn=0x0000000107434038, wait_mode=TXN_COMMIT_WAIT_MODE_COMPLETE) at txn.c:1249:12
    frame #2: 0x000000010506f7d7 tarantool`txn_commit(txn=0x0000000107434038) at txn.c:1291:9
    frame #3: 0x00000001050807ed tarantool`box_process_rw(request=0x0000000124c80b70, space=0x00007fb6ad30b340, result=0x0000000124c80ce8) at box.cc:516:23
    frame #4: 0x000000010508b2f0 tarantool`box_process1(request=0x0000000124c80b70, result=0x0000000124c80ce8) at box.cc:3785:9
    frame #5: 0x000000010508c6cf tarantool`box_replace(space_id=514, tuple="\x91", tuple_end="PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP"..., result=0x0000000124c80ce8) at box.cc:3981:9
    frame #6: 0x00000001051bae48 tarantool`lbox_replace(L=0x00000001061267a8) at index.c:84:11
    frame #7: 0x000000010529e0bb tarantool`lj_BC_FUNCC + 68
    frame #8: 0x00000001052ac99d tarantool`lua_pcall(L=0x00000001061267a8, nargs=0, nresults=-1, errfunc=0) at lj_api.c:1173:12
    frame #9: 0x0000000105204a13 tarantool`luaT_call(L=0x00000001061267a8, nargs=0, nreturns=-1) at utils.c:695:6
    frame #10: 0x00000001051f9b32 tarantool`lua_fiber_run_f(ap=0x0000000107412400) at fiber.c:435:11
    frame #11: 0x0000000104f23daa tarantool`fiber_cxx_invoke(f=(tarantool`lua_fiber_run_f at fiber.c:429), ap=0x0000000107412400) at fiber.h:1324:10
    frame #12: 0x00000001052350e1 tarantool`fiber_loop(data=0x0000000000000000) at fiber.c:1162:18
    frame #13: 0x0000000105681b8e tarantool`coro_init at coro.c:108:3

Expected behavior

The server does not crash.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions