[ZBX-21452] wmi.get crashes zabbix_agentd on windows 2003 Created: 2022 Aug 09  Updated: 2024 Apr 10  Resolved: 2022 Nov 01

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent (G)
Affects Version/s: 6.2.1
Fix Version/s: 5.0.29rc1, 6.0.10rc1, 6.2.4rc1, 6.4.0beta2, 6.4 (plan)

Type: Problem report Priority: Trivial
Reporter: Cristian Mammoli Assignee: Michael Veksler
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows Server 2003


Issue Links:
Causes
caused by ZBX-19001 Agent 1 wmi.getall[] doesn't detect i... Closed
Team: Team B
Sprint: Sprint 91 (Aug 2022), Sprint 92 (Sep 2022), Sprint 93 (Oct 2022)
Story Points: 1

 Description   

Steps to reproduce:

  1. Install zabbix_agent.exe on 32bit Windows 2003 (I used the precompiled binary)
  2. Ask for a wmi.get[*] item, for example with zabbix_get -s myserver -k 'wmi.get[ROOT\CIMv2,whatever]'

Result:
zabbix_agentd.exe crashes and zabbix_get timeouts

Extract from zabbix_agentd.log on the windows machine

 5224:20220809:161648.078 Requested [wmi.get[ROOT\CIMv2,whatever]]
  5224:20220809:161648.094 Unhandled exception c0000005 detected at 0x00000000. Crashing ...
  5224:20220809:161648.094 ====== Fatal information: ======
  5224:20220809:161648.094 Program counter: 0x0000
  5224:20220809:161648.094 === Registers: ===
  5224:20220809:161648.094 edi     =                1 =                    1 =                    1
  5224:20220809:161648.094 esi     =          2c0e870 =             46196848 =             46196848
  5224:20220809:161648.094 ebp     =           1c3078 =              1847416 =              1847416
  5224:20220809:161648.094 ebx     =                1 =                    1 =                    1
  5224:20220809:161648.094 edx     =          4c90002 =             80281602 =             80281602
  5224:20220809:161648.094 eax     =           1e3f70 =              1982320 =              1982320
  5224:20220809:161648.094 ecx     =           1e3b50 =              1981264 =              1981264
  5224:20220809:161648.094 esp     =          2c0e7d8 =             46196696 =             46196696
  5224:20220809:161648.094 efl     =            10206 =                66054 =                66054
  5224:20220809:161648.094 csgsfs  =         1b003b00 =            452999936 =            452999936
  5224:20220809:161648.094 === Backtrace: ===
   212:20220809:161648.281 In collect_perfstat()
   212:20220809:161648.281 End of collect_perfstat()
  5224:20220809:161648.297 1: C:\zabbix\bin\zabbix_agentd.exe() [0x0]
  5224:20220809:161648.297 0: C:\zabbix\bin\zabbix_agentd.exe() [0x4676a5]
  5224:20220809:161648.297 ================================ 

Expected:
zabbix_agentd.exe does not crash like with 6.2.0

 



 Comments   
Comment by Cristian Mammoli [ 2022 Aug 09 ]

After further testing I noticed only when an invalid query is performed:

Es.

zabbix_get -s srvweb -k 'wmi.getall[root\cimv2,select caption from win32_process]' works

zabbix_get -s srvweb -k 'wmi.getall[root\cimv2,select WRONGPROPERTY from win32_process]' crashes

 

This is probably related to https://support.zabbix.com/browse/ZBX-19001 and commit https://git.zabbix.com/projects/ZBX/repos/zabbix/commits/3bf85bf226b2e83b39c426ef7ff4c08000235934#src/libs/zbxsysinfo/win32/wmi.cpp

 

Comment by Michael Veksler [ 2022 Oct 20 ]

Available in:

Generated at Sun Jun 01 11:57:47 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.