tarantool_silverbox crashes when saving snapshot on SIGUSR1
Bug #727174 reported by
Yuriy Vostrikov
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.
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 |
Changed in tarantool: | |
status: | Confirmed → Fix Committed |
Changed in tarantool: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
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 uptime( void)
index 6964498..535f355 100644
--- a/core/tarantool.c
+++ b/core/tarantool.c
@@ -171,7 +171,7 @@ tarantool_
#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) ;
}