Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SIGHUP crashes tarantool #4063

Closed
sharonovd opened this issue Mar 21, 2019 · 3 comments
Closed

SIGHUP crashes tarantool #4063

sharonovd opened this issue Mar 21, 2019 · 3 comments
Assignees
Labels
bug Something isn't working crash
Milestone

Comments

@sharonovd
Copy link

sharonovd commented Mar 21, 2019

Tarantool version:
Tarantool 1.10.2-186-gc55f09f93
OS version:
Mac
Bug description:
Crashes to coredump after sighup
Steps to reproduce:

box.cfg{log = 'test.log'}
tarantool test.lua &
kill -1 <tarantool.pid>
 
d:tmp d.sharonov$ Segmentation fault
  code: SEGV_MAPERR
  addr: 0x60
  context: 0x7ffeeb96c8f8
  siginfo: 0x7ffeeb96c890
Current time: 1553160674
Please file a bug at http://github.com/tarantool/tarantool/issues
Attempting backtrace... Note: since the server has already crashed, 
this may fail as well
#0  0x10434793d in print_backtrace+9
#1  0x104298473 in _ZL12sig_fatal_cbiP9__siginfoPv+158
#2  0x7fff5aa7ef5a in _sigtramp+1a
#3  0x104344f7f in fiber_yield+52
#4  0x10434536c in fiber_yield_timeout+64
#5  0x10434a0bd in fiber_cond_wait_timeout+51
#6  0x1043435e6 in log_destroy+1d
#7  0x7fff5a81cef4 in __cxa_finalize_ranges+166
#8  0x7fff5a81d1fe in exit+37

[1]+  Abort trap: 6           tarantool test.lua```
@sharonovd
Copy link
Author

Some others report tarantool exits, but it should simply reopen logfile after sighup.

@rosik
Copy link
Contributor

rosik commented Mar 21, 2019

The same here, Ubuntu 18.04, kernel 4.15.0-46

When I start tarantool without box.cfg({log = './a.log'}), SiGHUP just triggers exit with code 0.

rosik@rlap:/tmp/tmp.wzf9lUpbi5$ tarantool
Tarantool 1.10.2-162-g6d4db455d
type 'help' for interactive help
tarantool> box.cfg()
2019-03-21 12:49:35.266 [2231] main/101/interactive C> Tarantool 1.10.2-162-g6d4db455d
2019-03-21 12:49:35.266 [2231] main/101/interactive C> log level 5
2019-03-21 12:49:35.266 [2231] main/101/interactive I> mapping 268435456 bytes for memtx tuple arena...
2019-03-21 12:49:35.266 [2231] main/101/interactive I> mapping 134217728 bytes for vinyl tuple arena...
2019-03-21 12:49:35.266 [2231] main/101/interactive I> instance uuid 252939fe-e6ae-4ffd-b96a-49e6b3ca8438
2019-03-21 12:49:35.267 [2231] main/101/interactive I> instance vclock {}
2019-03-21 12:49:35.267 [2231] main/101/interactive I> recovery start
2019-03-21 12:49:35.267 [2231] main/101/interactive I> recovering from `./00000000000000000000.snap'
2019-03-21 12:49:35.267 [2231] main/101/interactive I> cluster uuid 8748548a-cd91-41a6-b300-41dbc0d7bb4e
2019-03-21 12:49:35.269 [2231] main/101/interactive I> assigned id 1 to replica 252939fe-e6ae-4ffd-b96a-49e6b3ca8438
2019-03-21 12:49:35.269 [2231] main/101/interactive I> recover from `./00000000000000000000.xlog'
2019-03-21 12:49:35.269 [2231] main/101/interactive I> done `./00000000000000000000.xlog'
2019-03-21 12:49:35.269 [2231] main/101/interactive I> ready to accept requests
2019-03-21 12:49:35.269 [2231] main/107/checkpoint_daemon I> started
2019-03-21 12:49:35.270 [2231] main/107/checkpoint_daemon I> scheduled the next snapshot at Thu Mar 21 13:51:17 2019
---
...

tarantool> -- killall -SIGHUP tarantool
rosik@rlap:/tmp/tmp.wzf9lUpbi5$ echo $?
0

If an instance started with log setting, SIGHUP crashes it

rosik@rlap:/tmp/tmp.wzf9lUpbi5$ tarantool
Tarantool 1.10.2-162-g6d4db455d
type 'help' for interactive help
tarantool> box.cfg({log = './a.log'})
---
...
tarantool> -- killall -SIGHUP tarantool
Segmentation fault
  code: SEGV_MAPERR
  addr: 0x58
  context: 0x7ffff8208fc0
  siginfo: 0x7ffff82090f0
  rax      0x55853c6a5400     94030732612608
  rbx      0x55853c6a5378     94030732612472
  rcx      0x55853d9aca40     94030752565824
  rdx      0xc                12
  rsi      0xc                12
  rdi      0x55853c6a5400     94030732612608
  rsp      0x7ffff8209560     140737356272992
  rbp      0x7ffff8209580     140737356273024
  r8       0xc                12
  r9       0x55853d9aca40     94030752565824
  r10      0x7f21cc88fde0     139783142178272
  r11      0x4                4
  r12      0x0                0
  r13      0x55853c6a5000     94030732611584
  r14      0x7f21d4679628     139783274206760
  r15      0x7f21d4675d80     139783274192256
  rip      0x55853c25e8b0     94030728128688
  eflags   0x10246            66118
  cs       0x33               51
  gs       0x0                0
  fs       0x0                0
  cr2      0x58               88
  err      0x6                6
  oldmask  0x0                0
  trapno   0xe                14
Current time: 1553161583
Please file a bug at http://github.com/tarantool/tarantool/issues
Attempting backtrace... Note: since the server has already crashed, 
this may fail as well
#0  0x55853c2614b9 in print_backtrace+9
#1  0x55853c17def3 in _ZL12sig_fatal_cbiP9siginfo_tPv+d3
#2  0x7f21d5634890 in funlockfile+50
#3  0x55853c25e8b0 in fiber_yield+50
#4  0x55853c25ebd1 in fiber_yield_timeout+61
#5  0x55853c263fde in fiber_cond_wait_timeout+3e
#6  0x55853c25d600 in log_destroy+20
#7  0x7f21d42cc041 in __libc_secure_getenv+191
#8  0x7f21d42cc13a in exit+1a
#9  0x7f21d42aab9e in __libc_start_main+ee
#10 0x55853c17d19a in _start+2a
Aborted

@sharonovd sharonovd changed the title Tarantool crashes after SIGHUP on Mac SIGHUP does not work (crashes on Mac, exits on Linux) Mar 21, 2019
@rosik rosik changed the title SIGHUP does not work (crashes on Mac, exits on Linux) SIGHUP crashes tarantool Mar 21, 2019
@kyukhin kyukhin added crash bug Something isn't working labels Mar 21, 2019
@kyukhin kyukhin added this to the 1.10.3 milestone Mar 21, 2019
@Totktonada
Copy link
Member

Dupe of #3690.

GeorgyKirichenko pushed a commit that referenced this issue Mar 21, 2019
Perform a log rotation instead of a termination according to
the documentation. Fix regression caused by 9f99bc6

Follow up for: 9f99bc6
Closes: #4063
GeorgyKirichenko pushed a commit that referenced this issue Mar 21, 2019
Perform a log rotation instead of a termination according to
the documentation. Fix regression caused by 9f99bc6

Follow up for: 9f99bc6
Closes: #4063

(cherry picked from commit c9f36fb)
GeorgyKirichenko pushed a commit that referenced this issue Mar 21, 2019
Perform a log rotation instead of a termination according to
the documentation. Fix regression caused by 9f99bc6

Follow up for: 9f99bc6
Closes: #4063

(cherry picked from commit c9f36fb)
@kyukhin kyukhin added the tmp label Mar 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working crash
Projects
None yet
Development

No branches or pull requests

5 participants