[ZBX-4045] Crash in DCsync_hosts() Created: 2011 Aug 12  Updated: 2017 May 30  Resolved: 2011 Oct 07

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Proxy (P), Server (S)
Affects Version/s: 1.8.7, 1.9.5 (alpha), 2.0.0
Fix Version/s: 1.8.9, 1.9.7 (beta)

Type: Incident report Priority: Critical
Reporter: Rudolfs Kreicbergs Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: distributed
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Hosts.png     File crash.0x808803e     PNG File discovery.png     File zabbix_server.log    
Issue Links:
Duplicate

 Description   

Crash in DCsync_hosts(). See attachment:
13235:20110812:180024.044 ====== Fatal information: ======
13235:20110812:180024.044 Program counter: 0x808803e

This is caused by duplicate hosts (hosts that have the same name).



 Comments   
Comment by Rudolfs Kreicbergs [ 2011 Aug 15 ]

The cause is probably the same as in ZBX-4020 - when running multiple discoverers, identical hosts can be created. (Attached screenshots)

The crash happens when these multiple entries are deleted and DCsync_hosts() is called - it is presumed, that each host has a separate entry in hosts_ph, but in this case it is deleted with the first host and the second hosts does not get an entry and thus crashes when uses NULL entry.

Comment by Rudolfs Kreicbergs [ 2011 Aug 25 ]

Fixed/available in svn://svn.zabbix.com/branches/dev/ZBX-4045

Added code that catches that case (duplicate hosts), logs an error and exits properly.

Comment by Alexander Vladishev [ 2011 Aug 26 ]

Successfully tested!

Comment by Rudolfs Kreicbergs [ 2011 Sep 01 ]

Fixed/available in pre-1.8.8 r21402 and pre-1.9.6 r21405.

If duplicate hosts or proxies are found, a warning is logged and the server/proxy exits.

Comment by richlv [ 2011 Sep 05 ]

trunk changelog only listed hosts (omitting proxies), fixed in rev 21497.

Comment by Alexander Vladishev [ 2011 Oct 04 ]

Server stops with error "Error: duplicate hosts [***] found. Exiting...", when we:

  • add new host
  • (configuration refresh)
  • delete host
  • add host with same name
  • (configuration refresh)
Comment by Aleksandrs Saveljevs [ 2011 Oct 07 ]

Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-4045 .

Since detection of duplicate hosts is not trivial without consuming additional resources and duplicate hosts should not happen anyway, the check for duplicate hosts and stopping of server have been removed. What we try to do now is just do not crash and function properly for one of the duplicate hosts, less properly for the rest.

Comment by Aleksandrs Saveljevs [ 2011 Oct 11 ]

Fix for 1.8 is available in pre-1.8.9 in r22276. Fix for trunk will be done separately.

Comment by Aleksandrs Saveljevs [ 2011 Oct 11 ]

Fix for trunk available in development branch with the same URL: svn://svn.zabbix.com/branches/dev/ZBX-4045 .

Comment by Aleksandrs Saveljevs [ 2011 Oct 13 ]

Fix for trunk is available in pre-1.9.7 in r22352.

Generated at Fri Apr 26 20:40:28 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.