tarantool_silverbox crashes when saving snapshot on SIGUSR1

Bug #727174 reported by Yuriy Vostrikov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tarantool
Fix Released
High
Yuriy Vostrikov

Bug Description

It crashes then signaled to snapshot via SIGUSR1. Please fix.

Revision history for this message
Yuriy Vostrikov (vostrikov) wrote : Re: [Bug 727174] [NEW] tarantool_silverbox crashes saving snapshot

Yuriy Vostrikov <email address hidden> writes:

> Public bug reported:
>
> It crashes then signaled to snapshot via SIGUSR1. Please fix.

diff --git a/core/tarantool.c b/core/tarantool.c
index 6964498..535f355 100644
--- a/core/tarantool.c
+++ b/core/tarantool.c
@@ -171,7 +171,7 @@ tarantool_uptime(void)

 #ifdef STORAGE
 int
-snapshot(void *ev __unused__, int events __unused__)
+snapshot(void *ev, int events __unused__)
 {
  pid_t p = fork();
  if (p < 0) {
@@ -179,9 +179,10 @@ snapshot(void *ev __unused__, int events __unused__)
   return -1;
  }
  if (p > 0) {
- wait_for_child(p);
-
- assert(p == fiber->cw.rpid);
+ if (ev == NULL) { /* we'r called not from ev callback */
+ wait_for_child(p);
+ assert(p == fiber->cw.rpid);
+ }

   return WEXITSTATUS(fiber->cw.rstatus);
  }

Kostja Osipov (kostja)
summary: - tarantool_silverbox crashes saving snapshot
+ tarantool_silverbox crashes when saving snapshot on SIGUSR1
Changed in tarantool:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Yuriy Vostrikov (vostrikov)
milestone: none → 1.3.5
Kostja Osipov (kostja)
Changed in tarantool:
status: Confirmed → Fix Committed
Kostja Osipov (kostja)
Changed in tarantool:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.