Skip to content

net.box crashes if connection is closed from on_schema_reload trigger #9826

@CuriousGeorgiy

Description

@CuriousGeorgiy

Steps to reproduce

os.execute('rm -rf *.snap *.xlog *.vylog 512')

fiber = require('fiber')
nb = require('net.box')
socket = require('socket')

box.cfg{listen = 3301}

conn = nb.connect(3301, {wait_connected = false})
conn:on_schema_reload(function(conn)
    pcall(function() conn:close() end)
end)

assert(conn:wait_state('closed', 1))

os.exit()

Actual behavior

Assertion failed: (transport->state == NETBOX_AUTH || transport->state == NETBOX_FETCH_SCHEMA), function netbox_transport_process_requests, file net_box.c, line 3036.

Expected behavior

Script successfully executes.

Metadata

Metadata

Labels

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

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions