[ZBX-14764] Proxy crashes when StartIPMIPollers=2 Created: 2018 Aug 23 Updated: 2024 Apr 10 Resolved: 2018 Oct 12 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Proxy (P), Server (S) |
Affects Version/s: | 3.4.12 |
Fix Version/s: | 3.4.15rc1, 4.0.1rc1, 4.2.0alpha1, 4.2 (plan) |
Type: | Problem report | Priority: | Trivial |
Reporter: | Fridtjof Mund | Assignee: | Vladislavs Sokurenko |
Resolution: | Fixed | Votes: | 0 |
Labels: | crash | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
Ubuntu 18.04 LTS, libopenipmi0 2.0.22-1.1ubuntu2.1 |
Attachments: | zabbix_proxy.conf zabbix_proxy.log zabbix_proxy.objdump.bz2 zabbix_proxy_child.log | ||||||||
Issue Links: |
|
||||||||
Team: | Team A | ||||||||
Sprint: | Sprint 43, Sprint 44 | ||||||||
Story Points: | 1 |
Description |
Steps to reproduce:
Result:
There might be other factors |
Comments |
Comment by Fridtjof Mund [ 2018 Aug 23 ] |
...involved, because the crash apparently occurs in collect_selfmon_stats. Forgot to finish that last sentence. |
Comment by Glebs Ivanovskis [ 2018 Aug 27 ] |
Would be nice if you could attach the output of objdump -DSswx zabbix_proxy as well. |
Comment by Fridtjof Mund [ 2018 Aug 27 ] |
I attached the output, bzip2 compressed |
Comment by Glebs Ivanovskis [ 2018 Aug 27 ] |
Crash happens in the body of this conditional: if (process->cache.ticks_flush < collector->ticks_sync) { /* If the process local cache was not flushed during the last self monitoring */ /* data collection interval update the process statistics based on the current */ /* process state and ticks passed during the collection interval. Store this */ /* value so the process local self monitoring cache can be adjusted before */ /* flushing. */ process->counter[process->cache.state] += ticks_done; process->counter_used[process->cache.state] += ticks_done; } However, at the moment I'm not able to pinpoint which pointer or offset is to blame for the resulting illegal dereference... |
Comment by Edgars Melveris [ 2018 Sep 25 ] |
I was able to reproduce this bug on version 3.4.14 on appliance. |
Comment by Vladislavs Sokurenko [ 2018 Sep 27 ] |
Backtrace for easier searching: 15348:20180823:173204.340 === Backtrace: === 15348:20180823:173204.340 10: /usr/sbin/zabbix_proxy: self-monitoring [processing data](zbx_log_fatal_info+0x176) [0x564a8922baa4] 15348:20180823:173204.340 9: /usr/sbin/zabbix_proxy: self-monitoring [processing data](+0xcbf56) [0x564a8922bf56] 15348:20180823:173204.340 8: /lib/x86_64-linux-gnu/libc.so.6(+0x3ef20) [0x7f37c68c5f20] 15348:20180823:173204.340 7: /usr/sbin/zabbix_proxy: self-monitoring [processing data](collect_selfmon_stats+0x1b6) [0x564a89229feb] 15348:20180823:173204.340 6: /usr/sbin/zabbix_proxy: self-monitoring [processing data](selfmon_thread+0xc8) [0x564a891c1001] 15348:20180823:173204.340 5: /usr/sbin/zabbix_proxy: self-monitoring [processing data](zbx_thread_start+0x37) [0x564a8922cebf] 15348:20180823:173204.340 4: /usr/sbin/zabbix_proxy: self-monitoring [processing data](MAIN_ZABBIX_ENTRY+0xafc) [0x564a8918fcd2] 15348:20180823:173204.341 3: /usr/sbin/zabbix_proxy: self-monitoring [processing data](daemon_start+0x31f) [0x564a8922b0b6] 15348:20180823:173204.341 2: /usr/sbin/zabbix_proxy: self-monitoring [processing data](main+0x300) [0x564a8918f1c0] 15348:20180823:173204.341 1: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7f37c68a8b97] 15348:20180823:173204.341 0: /usr/sbin/zabbix_proxy: self-monitoring [processing data](_start+0x2a) [0x564a8918d8ba]
|
Comment by Vladislavs Sokurenko [ 2018 Sep 28 ] |
Problem is that selfmon collector initialization is called before forks of IPMI manager initialization if (SUCCEED != init_selfmon_collector(&error)) { zabbix_log(LOG_LEVEL_CRIT, "cannot initialize self-monitoring: %s", error); zbx_free(error); exit(EXIT_FAILURE); } line 1011
if (0 != CONFIG_IPMIPOLLER_FORKS)
CONFIG_IPMIMANAGER_FORKS = 1;
Patch: Index: src/zabbix_proxy/proxy.c =================================================================== --- src/zabbix_proxy/proxy.c (revision 85057) +++ src/zabbix_proxy/proxy.c (working copy) @@ -965,6 +965,9 @@ exit(EXIT_FAILURE); } + if (0 != CONFIG_IPMIPOLLER_FORKS) + CONFIG_IPMIMANAGER_FORKS = 1; + if (SUCCEED != init_selfmon_collector(&error)) { zabbix_log(LOG_LEVEL_CRIT, "cannot initialize self-monitoring: %s", error); @@ -1006,9 +1009,6 @@ DCsync_configuration(ZBX_DBSYNC_INIT); DBclose(); - if (0 != CONFIG_IPMIPOLLER_FORKS) - CONFIG_IPMIMANAGER_FORKS = 1; - threads_num = CONFIG_CONFSYNCER_FORKS + CONFIG_HEARTBEAT_FORKS + CONFIG_DATASENDER_FORKS + CONFIG_POLLER_FORKS + CONFIG_UNREACHABLE_POLLER_FORKS + CONFIG_TRAPPER_FORKS + CONFIG_PINGER_FORKS + CONFIG_HOUSEKEEPER_FORKS + CONFIG_HTTPPOLLER_FORKS |
Comment by Vladislavs Sokurenko [ 2018 Oct 03 ] |
Fixed in:
|