Closed ligurio closed 1 year ago
Fails due to panic on getting read_only
on IPROTO_VOTE
Backtrace:
2023-05-15 09:24:43.681 [96156] main/115/applier/storage@127.0.0.1:3302 I> leaving orphan mode
2023-05-15 09:24:43.702 [96156] main/111/main I> #1 0x556401fb3256 in backtrace_collect+114
#2 0x556401f7b4bc in cfg_get+210
#3 0x556401f7b70b in cfg_geti+28
#4 0x556401e6c9ec in box_process_vote(ballot*)+28
#5 0x556401d54ae5 in tx_process_misc(cmsg*)+612
#6 0x556401fb64c1 in cmsg_deliver+52
#7 0x556401fb763a in fiber_pool_f+442
#8 0x556401d49b4a in fiber_cxx_invoke(int (*)(__va_list_tag*), __va_list_tag*)+34
#9 0x556401faf8d9 in fiber_loop+149
#10 0x55640230b8b0 in coro_init+120
2023-05-15 09:24:43.703 [96156] main/111/main I> IS_FUNC: function
2023-05-15 09:24:43.703 [96156] main/111/main I> BUFFER: return box.cfg.read_only
2023-05-15 09:24:43.703 [96156] main/111/main F> cfg_get('read_only')
2023-05-15 09:24:43.703 [96156] main/111/main F> cfg_get('read_only')
Blocked with https://github.com/tarantool/tarantool/issues/8655
Reproducer:
local server = require('luatest.server')
local msgpack = require('msgpack')
local socket = require('socket')
local t = require('luatest')
local g = t.group()
g.before_all(function(g)
g.server = server:new{
alias = 'server',
}
g.server:start()
end)
g.after_all(function(g)
g.server:drop()
end)
local IPROTO_REQUEST_TYPE = 0x00
local IPROTO_VOTE = 0x44
-- local IPROTO_BALLOT = 0x29
g.test_iproto_vote_panic = function(g)
g.server:exec(function()
-- Simulate unconfigured box
rawset(_G, 'old_box_cfg', box.cfg)
box.cfg = function(...) return _G.old_box_cfg(...) end
end)
local header = msgpack.encode({
[IPROTO_REQUEST_TYPE] = IPROTO_VOTE
})
local len = header:len()
local s = socket.tcp_connect('unix/', g.server.net_box_uri)
-- Skip greeting
local data = s:read(128)
t.assert_equals(#data, 128)
-- Send IPROTO_VOTE
data = '\xce\00\00\00' .. string.char(len) .. header
t.assert_equals(s:write(data), #data)
g.server:exec(function()
box.cfg = _G.old_box_cfg
end)
end
Test sometimes fails after changes not related to vshard, see log in https://github.com/tarantool/tarantool/runs/6613304486?check_suite_focus=true
Full archive with logs: logs_487018.zip
I suppose it should be disabled for integration testing with Tarantool or fixed.