grobian / carbon-c-relay

Enhanced C implementation of Carbon relay, aggregator and rewriter
Apache License 2.0
380 stars 107 forks source link

SIGHUP crashes carbon-c-relay #229

Closed tehlers320 closed 7 years ago

tehlers320 commented 7 years ago

I am not sure how to debug this the -d flag does not add more info to the log.

OS: Amazon Linux 2016

 ps -ef |grep relay OK  ]
root      7712     1  1 15:42 ?        00:00:00 /usr/bin/carbon-c-relay -H ip-10-0-10-10-2003 -f /etc/carbon-c-relay-2003.conf -w 25 -q 2000000 -b 5000 -p 2003 -D -l /var/log/carbon-relay/carbon-c-relay-2003.log -P /var/run/carbon-c-relay-2003.pid
root      7744  7670  0 15:43 pts/2    00:00:00 grep --color=auto relay

[2016-11-10 15:42:23] (MSG) reopening logfile
[2016-11-10 15:42:23] (MSG) reloading config from '/etc/carbon-c-relay-2003.conf'
[2016-11-10 15:42:23] (MSG) no config changes found

ps -ef |grep relay
root      7700  7670  0 15:42 pts/2    00:00:00 grep --color=auto relay
/usr/bin/carbon-c-relay -v
carbon-c-relay v2.1 (2016-08-03)

I have many other carbon-c-relays that do not crash on sighup the only difference with this box is that it is taking 0 traffic. Would idleness have something to do with the problem?

tehlers320 commented 7 years ago
write(1, "[2016-11-10 15:50:44] caught SIG"..., 39[2016-11-10 15:50:44] caught SIGHUP...
) = 39
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=118, ...}) = 0
write(1, "[2016-11-10 15:50:44] reloading "..., 76[2016-11-10 15:50:44] reloading config from '/etc/carbon-c-relay-2003.conf'
) = 76
stat("/etc/carbon-c-relay-2003.conf", {st_mode=S_IFREG|0644, st_size=1323, ...}) = 0
mmap(NULL, 266240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8b9a6e4000
open("/etc/carbon-c-relay-2003.conf", O_RDONLY) = 6
fstat(6, {st_mode=S_IFREG|0644, st_size=1323, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8b9a770000
read(6, "# comments are allowed in any pl"..., 4096) = 1323
close(6)                                = 0
munmap(0x7f8b9a770000, 4096)            = 0
mmap(NULL, 16003072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8b828bc000
brk(0)                                  = 0x25bd000
brk(0x25e6000)                          = 0x25e6000
mmap(NULL, 16003072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8b81979000
gettimeofday({1478793044, 287180}, NULL) = 0
open("/tmp/carbon-c-relay_route.u382K3", O_RDWR|O_CREAT|O_EXCL, 0600) = 6
fcntl(6, F_GETFL)                       = 0x8002 (flags O_RDWR|O_LARGEFILE)
fstat(6, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8b9a770000
write(6, "cluster graphite\n    carbon_ch r"..., 383) = 383
close(6)                                = 0
munmap(0x7f8b9a770000, 4096)            = 0
open("/tmp/carbon-c-relay_route.M09BxD", O_RDWR|O_CREAT|O_EXCL, 0600) = 6
fcntl(6, F_GETFL)                       = 0x8002 (flags O_RDWR|O_LARGEFILE)
fstat(6, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8b9a770000
write(6, "cluster graphite\n    carbon_ch r"..., 383) = 383
close(6)                                = 0
munmap(0x7f8b9a770000, 4096)            = 0
pipe2([6, 7], O_CLOEXEC)                = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f8b9a766a10) = 8120
close(7)                                = 0
fcntl(6, F_SETFD, 0)                    = 0
fstat(6, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8b9a770000
read(6, "", 4096)                       = 0
close(6)                                = 0
wait4(8120, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 8120
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=8120, si_status=0, si_utime=0, si_stime=0} ---
munmap(0x7f8b9a770000, 4096)            = 0
unlink("/tmp/carbon-c-relay_route.u382K3") = 0
unlink("/tmp/carbon-c-relay_route.M09BxD") = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=118, ...}) = 0
write(1, "[2016-11-10 15:50:44] no config "..., 46[2016-11-10 15:50:44] no config changes found
) = 46
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x2d0} ---
+++ killed by SIGSEGV +++
Segmentation fault
tehlers320 commented 7 years ago

Sorry i didnt look hard enough for bugs. https://github.com/grobian/carbon-c-relay/issues/224 i will update to 2.3