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

tarantool / tarantool / 28471012074
88%

Build:
DEFAULT BRANCH: master
Ran 30 Jun 2026 07:54PM UTC
Jobs 1
Files 525
Run time 2min
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

30 Jun 2026 07:38PM UTC coverage: 87.71% (+0.04%) from 87.675%
28471012074

push

github

locker
Do not use pthread_atfork to reset signals

When Tarantool is forked, its signal configuration is reset using the
signal_reset() callback installed with pthread_atfork(). This leads
to an assertion failure on CentOS 7 based systems when application
threads are configured:

```
./tarantool/src/lib/core/fiber.c:2338: fiber_signal_reset: Assertion `cord_is_main()' failed.
```

The problem is that the built-in metrics.tarantool.memory Lua module
calls io.popen() on load, which executes pthread_atfork() handlers on
older glibc versions, the details are below, but first let's dive into
the history of signal_reset().

Its initial intention was to make the checkpoint process interruptible
back when checkpointing was done using fork(), see commit d6572f074a899
("A fix for https://bugs.launchpad.net/tarantool/+bug/992171"). Now, it
doesn't make sense because we do checkpointing in a separate thread
using our own CoW mechanism so do we really need to reset signals?

We fork the Tarantool process in the following scenarios:

 1. To daemonize the process when run in the background mode, see
    daemonize(). Here we call fork() directly.
 2. To start a logger process, see log_pipe_init(). Here fork() is
    followed by execv().
 3. To start a user-defined command with our implementation of popen().
    Here we use vfork() + execve().
 4. Tarantool can also be forked by the built-in Lua functions
    os.execute() and io.popen().

Calling signal_reset() in scenario no.1 is obviously pointless because
we don't want to reset signal handlers in this case and have to cancel
its effect with signal_init().

To figure out if we need to call signal_reset() in scenario no.2, let's
recap what signal_reset() actually does:

 1. Resets all custom signal handlers to defaults with sigaction().
 2. Unsets the interval timer used to update the low-resolution
    monotonic clock with setitimer().
 3. Unblocks all signals with pthread_sigmask().

Action no.1 is useless because custom ... (continued)

70868 of 119070 branches covered (59.52%)

0 of 1 new or added line in 1 file covered. (0.0%)

39 existing lines in 17 files now uncovered.

106434 of 121348 relevant lines covered (87.71%)

1362987.98 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
86.9
-0.13% src/lib/core/say.c

Coverage Regressions

Lines Coverage ∆ File
8
95.01
-1.66% src/box/vy_read_iterator.c
6
92.6
-0.27% src/box/vinyl.c
4
88.07
-0.27% src/box/vy_run.c
3
97.36
0.2% src/lib/msgpuck/msgpuck.h
2
91.29
-0.06% src/box/box.cc
2
96.49
-0.35% src/box/relay.cc
2
87.82
-0.41% src/box/vy_stmt.c
2
93.85
0.92% src/lib/core/fiber.c
2
95.45
-4.55% src/lib/json/json.h
1
88.96
-0.61% src/box/engine.c
1
96.88
-1.56% src/box/engine.h
1
95.07
-0.1% src/box/replication.cc
1
90.35
-0.08% src/box/vy_log.c
1
95.74
0.0% src/box/vy_range.c
1
96.55
-1.15% src/lib/core/histogram.c
1
86.9
-0.13% src/lib/core/say.c
1
79.44
3.6% src/main.cc
Jobs
ID Job ID Ran Files Coverage
1 28471012074.1 30 Jun 2026 07:54PM UTC 525
87.71
GitHub Action Run
Source Files on build 28471012074
  • Tree
  • List 525
  • Changed 36
  • Source Changed 0
  • Coverage Changed 36
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 484bd10b on github
  • Prev Build on master (#28448739530)
  • Next Build on master (#28510241251)
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