[ZBX-5473] Zabbix agent crash under FreeBSD when start it with "-p" Created: 2012 Aug 21 Updated: 2017 May 30 Resolved: 2012 Aug 30 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Agent (G) |
Affects Version/s: | 2.0.1 |
Fix Version/s: | 2.0.3rc1, 2.1.0 |
Type: | Incident report | Priority: | Major |
Reporter: | Oleksii Zagorskyi | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | crash, freebsd | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
FreeBSD 8.1, 9.0 |
Description |
Reported in forum (in Russian) http://www.zabbix.com/forum/showthread.php?p=107384 Affected agent version: 2.0.1 test# zabbix_agentd -p "{#FSTYPE}":"ufs"}, { "{#FSNAME} ":"\/dev", { "{#FSNAME}":"\/tmp", "{#FSTYPE} ":"ufs"}, "{#FSTYPE}":"ufs"}, { "{#FSNAME} ":"\/var", { "{#FSNAME}":"\/files", "{#FSTYPE} ":"ufs"}, ":"\/home", ":"ufs"},]}] |
Comments |
Comment by Alexei Vladishev [ 2012 Aug 28 ] |
I confirm this problem under FreeBSD 8.2 386 and Ubuntu 12.04 32bit. Also: FreeBSD: Ubuntu: |
Comment by Alexei Vladishev [ 2012 Aug 28 ] |
It seems that the problem is in diskstat_shm_init(), which does if ( but the collector is not initialized, so the line causes code dump. Function vfs_dev_rw() calls collector_diskdevice_get(), which tries to initialize data if collector is not started: if (0 == DISKDEVICE_COLLECTOR_STARTED(collector)) { diskstat_shm_init(); // Here is the problem. The function assumed that collector structure is initialized, see above. }else { diskstat_shm_reattach(); } |
Comment by richlv [ 2012 Aug 29 ] |
segfaults in |
Comment by Alexander Vladishev [ 2012 Aug 30 ] |
Fixed in the development branch svn://svn.zabbix.com/branches/dev/ZBX-5473 <zalex> successfully tested on fbsd 8.1 |
Comment by dimir [ 2012 Sep 05 ] |
Successfully tested. Please review my small change in r30114. <Sasha> Thanks, CLOSED |
Comment by Alexander Vladishev [ 2012 Sep 05 ] |
Fixed in pre-2.0.3 r30117 and pre-2.1.0 (trunk) r30118. |
Comment by Oleksii Zagorskyi [ 2012 Oct 05 ] |
This change caused another problem - |