Skip to content

Fiber hangs while executing snapshot concurrently with vinyl index build #10233

@locker

Description

@locker

Bug description

If vinyl index build and snapshot are executed concurrently, one of them may hang.

Originally reported by @ligurio.

Reproduced with Tarantool 3.2.0-entrypoint-112-g319357d5973d.

Steps to reproduce

Run the script:

local log = require('log')
local fiber = require('fiber')

box.cfg{}

local s = box.schema.space.create('test', {engine = 'vinyl'})
s:create_index('pk')
s:insert({1, 1})

local f1 = fiber.new(s.create_index, s, 'sk', {parts = {2, 'unsigned'}})
f1:set_joinable(true)

local f2 = fiber.new(box.snapshot)
f2:set_joinable(true)

fiber.sleep(0.1)

local ok, err
local timeout = 3

ok, err = f1:join(timeout)
if not ok then
    log.error('Failed to join ddl fiber')
    box.error(err)
end

ok, err = f2:join(timeout)
if not ok then
    log.error('Failed to join snapshot fiber')
    box.error(err)
end

os.exit(0)

Actual behavior

The script fails with the error:

2024-07-11 17:47:06.763 [76468] main/104/test.lua/test test.lua:33 E> Failed to join snapshot fiber
2024-07-11 17:47:06.763 [76468] main fiber.c:855 E> TimedOut: timed out

Expected behavior

No error.

Metadata

Metadata

Assignees

Labels

2.11Target is 2.11 and all newer release/master branches3.1Target is 3.1 and all newer release/master branchesbugSomething isn't workingddlfuzzingvinyl

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions