tarantool / tarantool/tarantool

Crash at exit if there's active net.box connection in application thread

Open
#12,789 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app bug crash netbox
Dominant language
Lua
Stars
3.7k
Forks
419
Avg merge
1d 23h
Merged PRs (30d)
88

Description

Bug description

If an application thread has an active connection when Tarantool exits, an assertion failure occurs:

tarantool: ./src/box/lua/net_box.c:571: netbox_transport_destroy: Assertion `transport->worker == NULL' failed.

Reproduced with a debug build of Tarantool 3.8.0-entrypoint-67-g210970c87815. Tarantool 3.7 is likely to be affected as well.

Steps to reproduce

Create a listening Tarantool instance:

box.cfg{listen = 3301}

In another terminal, run the following script:

box.cfg{app_threads = 1}
require('experimental.threads').eval('app', [[
    require('net.box').connect(3301)
]])
os.exit(0)

Actual behavior

Tarantool crashes with an asserion failure.

Expected behavior

Tarantool exits without errors.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/box/lua/net_box.c around netbox_transport_destroy and reproduce the assertion with the Lua script in the issue using a debug build. Trace shutdown with an active net.box connection in an application thread, then verify that the same reproduction exits without errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.