[ZBX-9740] proc.num[<process>] return zero for for protected Windows processes Created: 2015 Jul 29 Updated: 2017 May 30 Resolved: 2015 Oct 16 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Agent (G) |
Affects Version/s: | 2.4.4, 2.4.5 |
Fix Version/s: | 2.0.16rc1, 2.2.11rc1, 2.4.7rc1, 3.0.0alpha3 |
Type: | Incident report | Priority: | Major |
Reporter: | Vladimir Selivanov | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | proc.num, windows | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
win2012, iis8 |
Attachments: | agent version 2.4.5.png agent version 2.4.7.rc1.png debug_log.txt zabbix_agentd.exe zabbix_agentd.exe |
Description |
proc.num[<process>] return zero for some working processes. Strange situation with monitoring of MS IIS AppPool: for some other processes proc.num[] returns not zero result. This reproduced on win zabbix agent ver. 2.4.4 and 2.4.5 |
Comments |
Comment by Glebs Ivanovskis (Inactive) [ 2015 Aug 19 ] | |
Please clarify this contradiction:
Is w3wp.exe the only problematic process or there are others? Which versions of zabbix agent and IIS are used, 32 or 64 bit? More information on reproducing this issue will be appreciated. Maybe simple instructions how to get w3wp.exe running on my fresh virtual Windows 2012? | |
Comment by Vladimir Selivanov [ 2015 Aug 19 ] | |
Sorry, it is my mistake. correct text is: Please, change the description. I found other processes, which have same problem: I use 64bit version of zabbix, widows and IIS. | |
Comment by Oleksii Zagorskyi [ 2015 Aug 20 ] | |
As I recall the "w3wp.exe" is a binary of MS IIS service, or something like that. For example simple processes, run by end user are ok but system services are not etc ... | |
Comment by Glebs Ivanovskis (Inactive) [ 2015 Aug 21 ] | |
Situation report. The only difference I see in proc.num and proc_info code was introduced in later stages of fixing More realistic reason might be that (https://msdn.microsoft.com/en-us/library/windows/desktop/ms686701%28v=vs.85%29.aspx) Voland, please, try to run proc.num and proc_info multiple times with different intervals for the same process. Does proc.num always return zero? Does proc_info always return non-zero value? One more option is to rewrite proc.num and proc_info for Windows Server 2012 using newer process monitoring way from Microsoft: https://msdn.microsoft.com/en-us/library/windows/desktop/dn457825%28v=vs.85%29.aspx | |
Comment by Glebs Ivanovskis (Inactive) [ 2015 Aug 25 ] | |
I've attached development version (build from pre-2.4.7rc1 sources) of 64-bit agent with no difference in how proc.num and proc_info query process list. | |
Comment by Vladimir Selivanov [ 2015 Aug 27 ] | |
I am updated zabbix agent to ver 2.4.7.rc1 P.S. in ver 2.4.7.rc1 check "system.cpu.util[3,system,avg1]" is not supported
| |
Comment by Glebs Ivanovskis (Inactive) [ 2015 Aug 27 ] | |
Great thanks for your cooperation! Negative result is nevertheless a result. I will rewrite proc.num and proc_info using Windows Server 2012 specific process snapshooting mechanism and upload new binary then. Stay tuned! Regarding system.cpu.util there was some changes to it in | |
Comment by Glebs Ivanovskis (Inactive) [ 2015 Sep 03 ] | |
Actually, that new process snapshooting is not for getting the list of processes running in the system, so we cannot use as a basis for proc.num and proc_info. The binary I've attached and you tested has no difference in how proc.num and proc_info capture and process the list of running processes, we can't imagine any reason why they return different results on your system. The only possible way to find out is to pack agent with additional logging and test it on your system. Voland, will you agree to run agent with more logging on your system? | |
Comment by Vladimir Selivanov [ 2015 Sep 04 ] | |
What additional logs you want to collect? | |
Comment by Glebs Ivanovskis (Inactive) [ 2015 Sep 04 ] | |
New binary attached. Please run it with DebugLevel=4. No need to test it for two hours, just make sure that the problematic proc.num[] key and the corresponding proc_info[] were executed at least once. This binary additionally logs the list of processes running on your system as seen by proc.num[] and proc_info[] items. Like that: 2136:20150902:052803.110 Requested [proc.num[csrss.exe]] 2136:20150902:052803.110 PROC_NUM: '[System Process]' NOT COUNT 2136:20150902:052803.110 PROC_NUM: 'System' NOT COUNT 2136:20150902:052803.110 PROC_NUM: 'smss.exe' NOT COUNT 2136:20150902:052803.110 PROC_NUM: 'csrss.exe' COUNT 2136:20150902:052803.110 PROC_NUM: 'csrss.exe' COUNT 2136:20150902:052803.110 PROC_NUM: 'wininit.exe' NOT COUNT 2136:20150902:052803.110 PROC_NUM: 'winlogon.exe' NOT COUNT 2136:20150902:052803.110 PROC_NUM: 'services.exe' NOT COUNT 2136:20150902:052803.110 PROC_NUM: 'lsass.exe' NOT COUNT 2136:20150902:052803.110 PROC_NUM: 'svchost.exe' NOT COUNT 2136:20150902:052803.110 PROC_NUM: 'svchost.exe' NOT COUNT 2136:20150902:052803.110 PROC_NUM: 'dwm.exe' NOT COUNT 2136:20150902:052803.110 PROC_NUM: 'svchost.exe' NOT COUNT 2136:20150902:052803.110 PROC_NUM: 'svchost.exe' NOT COUNT 2136:20150902:052803.110 PROC_NUM: 'svchost.exe' NOT COUNT 2136:20150902:052803.110 PROC_NUM: 'svchost.exe' NOT COUNT 2136:20150902:052803.110 PROC_NUM: 'svchost.exe' NOT COUNT 2136:20150902:052803.110 PROC_NUM: 'spoolsv.exe' NOT COUNT 2136:20150902:052803.110 PROC_NUM: 'IpOverUsbSvc.exe' NOT COUNT 2136:20150902:052803.110 PROC_NUM: 'svchost.exe' NOT COUNT 2136:20150902:052803.110 PROC_NUM: 'wlms.exe' NOT COUNT 2136:20150902:052803.133 PROC_NUM: 'taskhostex.exe' NOT COUNT 2136:20150902:052803.133 PROC_NUM: 'explorer.exe' NOT COUNT 2136:20150902:052803.133 PROC_NUM: 'msdtc.exe' NOT COUNT 2136:20150902:052803.133 PROC_NUM: 'notepad.exe' NOT COUNT 2136:20150902:052803.133 PROC_NUM: 'notepad.exe' NOT COUNT 2136:20150902:052803.133 PROC_NUM: 'cmd.exe' NOT COUNT 2136:20150902:052803.133 PROC_NUM: 'conhost.exe' NOT COUNT 2136:20150902:052803.133 PROC_NUM: 'cmd.exe' NOT COUNT 2136:20150902:052803.133 PROC_NUM: 'conhost.exe' NOT COUNT 2136:20150902:052803.133 PROC_NUM: 'powershell.exe' NOT COUNT 2136:20150902:052803.133 PROC_NUM: 'conhost.exe' NOT COUNT 2136:20150902:052803.133 PROC_NUM: 'cmd.exe' NOT COUNT 2136:20150902:052803.133 PROC_NUM: 'conhost.exe' NOT COUNT 2136:20150902:052803.133 PROC_NUM: 'TrustedInstaller.exe' NOT COUNT 2136:20150902:052803.133 PROC_NUM: 'TiWorker.exe' NOT COUNT 2136:20150902:052803.133 PROC_NUM: 'zabbix_agentd.exe' NOT COUNT 2136:20150902:052803.133 PROC_NUM: 'zabbix_get.exe' NOT COUNT 2136:20150902:052803.133 Sending back [2] ... 1636:20150902:052807.907 Requested [proc_info[csrss.exe]] 1636:20150902:052807.907 PROC_INFO: '[System Process]' NOT COUNT 1636:20150902:052807.907 PROC_INFO: 'System' NOT COUNT 1636:20150902:052807.907 PROC_INFO: 'smss.exe' NOT COUNT 1636:20150902:052807.907 PROC_INFO: 'csrss.exe' COUNT 1636:20150902:052807.907 PROC_INFO: 'csrss.exe' COUNT 1636:20150902:052807.907 PROC_INFO: 'wininit.exe' NOT COUNT 1636:20150902:052807.907 PROC_INFO: 'winlogon.exe' NOT COUNT 1636:20150902:052807.907 PROC_INFO: 'services.exe' NOT COUNT 1636:20150902:052807.907 PROC_INFO: 'lsass.exe' NOT COUNT 1636:20150902:052807.924 PROC_INFO: 'svchost.exe' NOT COUNT 1636:20150902:052807.924 PROC_INFO: 'svchost.exe' NOT COUNT 1636:20150902:052807.924 PROC_INFO: 'dwm.exe' NOT COUNT 1636:20150902:052807.924 PROC_INFO: 'svchost.exe' NOT COUNT 1636:20150902:052807.924 PROC_INFO: 'svchost.exe' NOT COUNT 1636:20150902:052807.924 PROC_INFO: 'svchost.exe' NOT COUNT 1636:20150902:052807.924 PROC_INFO: 'svchost.exe' NOT COUNT 1636:20150902:052807.924 PROC_INFO: 'svchost.exe' NOT COUNT 1636:20150902:052807.924 PROC_INFO: 'spoolsv.exe' NOT COUNT 1636:20150902:052807.924 PROC_INFO: 'IpOverUsbSvc.exe' NOT COUNT 1636:20150902:052807.924 PROC_INFO: 'svchost.exe' NOT COUNT 1636:20150902:052807.924 PROC_INFO: 'wlms.exe' NOT COUNT 1636:20150902:052807.924 PROC_INFO: 'taskhostex.exe' NOT COUNT 1636:20150902:052807.924 PROC_INFO: 'explorer.exe' NOT COUNT 1636:20150902:052807.924 PROC_INFO: 'msdtc.exe' NOT COUNT 1636:20150902:052807.924 PROC_INFO: 'notepad.exe' NOT COUNT 1636:20150902:052807.924 PROC_INFO: 'notepad.exe' NOT COUNT 1636:20150902:052807.924 PROC_INFO: 'cmd.exe' NOT COUNT 1636:20150902:052807.924 PROC_INFO: 'conhost.exe' NOT COUNT 1636:20150902:052807.924 PROC_INFO: 'cmd.exe' NOT COUNT 1636:20150902:052807.924 PROC_INFO: 'conhost.exe' NOT COUNT 1636:20150902:052807.924 PROC_INFO: 'powershell.exe' NOT COUNT 1636:20150902:052807.939 PROC_INFO: 'conhost.exe' NOT COUNT 1636:20150902:052807.939 PROC_INFO: 'cmd.exe' NOT COUNT 1636:20150902:052807.939 PROC_INFO: 'conhost.exe' NOT COUNT 1636:20150902:052807.939 PROC_INFO: 'TrustedInstaller.exe' NOT COUNT 1636:20150902:052807.939 PROC_INFO: 'TiWorker.exe' NOT COUNT 1636:20150902:052807.939 PROC_INFO: 'zabbix_agentd.exe' NOT COUNT 1636:20150902:052807.939 PROC_INFO: 'zabbix_get.exe' NOT COUNT 1636:20150902:052807.939 Sending back [2016.000000] These are the logs we are interested in. If there is something secret in your logs, show just these bits. If there is something secret about the list of processes, tell us just the difference between proc.num[] and proc_info[] logs. | |
Comment by Vladimir Selivanov [ 2015 Sep 10 ] | |
log file attached | |
Comment by Glebs Ivanovskis (Inactive) [ 2015 Sep 14 ] | |
Thank you, Voland! I see that process lists are identical and both of them have COUNT next to 'w3wp.exe'. Seems like your problem is solved! | |
Comment by Glebs Ivanovskis (Inactive) [ 2015 Sep 15 ] | |
Fixed for 2.4 in development branch svn://svn.zabbix.com/branches/dev/ZBX-9740 r55354 (last commit is actually a rollback to r55128). Checking Windows version and accessing processes with PROCESS_QUERY_LIMITED_INFORMATION access level seem to mysteriously (query was inside inactive if branch) solve the issue. Version 2.0 uses completely different method of counting processes ( | |
Comment by Aleksandrs Saveljevs [ 2015 Sep 22 ] | |
(1) Unrelated to this task, but r55704 removes --new-nodeid option from "shortopts", which was forgotten in wiper CLOSED | |
Comment by Andris Zeila [ 2015 Sep 28 ] | |
Successfully tested. glebs.ivanovskis Reviewed. Looks much nicer! CLOSED | |
Comment by Glebs Ivanovskis (Inactive) [ 2015 Sep 28 ] | |
Fixed in:
| |
Comment by Glebs Ivanovskis (Inactive) [ 2015 Sep 29 ] | |
Documented in:
sasha CLOSED |