• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tarantool / tarantool / 12809717915
88%

Build:
DEFAULT BRANCH: master
Ran 16 Jan 2025 01:30PM UTC
Jobs 1
Files 518
Run time 3min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

16 Jan 2025 01:16PM UTC coverage: 87.363% (+0.002%) from 87.361%
12809717915

push

github

sergepetrenko
replication: fix crash on non-empty limbo exit

Normally it couldn't happen with user-originated transactions,
because they were always attached to a fiber, and the shutdown
code would panic if any user fibers couldn't be cancelled and
joined fast enough.

However it could always happen with applier txns (async, no fiber)
and now is possible with `wait='none'` and `'submit'` commit
modes.

When this happened, at least 2 situations were possible:

- The txn was not synchro and was just ignored, deleted together
      with the memory allocator.

- The txn was synchro and waiting for ACKs. It was "freed" (put
      back into the txn cache) without completion, and its
      triggers would leak.

- The txn was synchro and being written to WAL right now. Then it
      was also freed (including its region memory removal), and
      the WAL thread would sometimes crash on use-after-free.

The last case was a problem.

The solution is to reorder the initialization and destruction of
the limbo and related modules.

Specifically, lets do the following:

- Make the limbo a part of box_storage_init/shutdown/free. Indeed,
    the limbo doesn't make sense without the storage anyway.

- Destroy the limbo after WAL. To make sure that the freed txns
    aren't used by the WAL thread.

- Destroy the limbo before the engine. Because memtx engine
    destroys its tuples regardless of their ref counts, making all
    not yet freed `txn_stmt` objects invalid (they would contain
    dangling pointers to `old_tuple` and `new_tuple`).

Then the txns are not used and are still valid at the time the
limbo gets destroyed.

Part of #10766

NO_DOC=bugfix

69662 of 123532 branches covered (56.39%)

4 of 4 new or added lines in 2 files covered. (100.0%)

27 existing lines in 16 files now uncovered.

102638 of 117484 relevant lines covered (87.36%)

2395988.07 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
1
86.49
-1.35% src/box/lua/ctl.c
1
89.05
-0.08% src/box/vy_log.c
1
96.12
-0.18% src/box/relay.cc
1
90.51
-0.63% src/box/engine.c
1
95.05
-0.31% src/box/raft.c
1
96.15
-0.05% src/lib/salad/bps_tree.h
1
94.74
-1.75% src/box/engine.h
1
93.04
0.11% src/lib/core/fiber.c
2
95.84
-0.11% src/box/iproto.cc
2
89.24
-0.11% src/box/xrow.c
2
84.24
-0.1% src/box/xlog.c
2
84.89
-0.36% src/lib/core/coio.c
2
95.58
-0.22% src/lib/msgpuck/msgpuck.h
2
92.33
0.14% src/box/vinyl.c
3
90.7
-0.22% src/box/applier.cc
4
90.94
-0.06% src/box/box.cc
Jobs
ID Job ID Ran Files Coverage
1 12809717915.1 16 Jan 2025 01:30PM UTC 518
87.36
GitHub Action Run
Source Files on build 12809717915
  • Tree
  • List 518
  • Changed 450
  • Source Changed 0
  • Coverage Changed 26
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 91ff7c89 on github
  • Prev Build on master (#12748475930)
  • Next Build on master (#12810576996)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc