[ZBX-10034] On Windows agents should use per-logfile locks instead of common locks between all agents in session Created: 2015 Oct 30 Updated: 2017 May 30 Resolved: 2015 Dec 13 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Agent (G) |
Affects Version/s: | 2.2.10 |
Fix Version/s: | 3.0.0alpha5 |
Type: | Incident report | Priority: | Major |
Reporter: | Sandis Neilands (Inactive) | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | semaphores | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
Windows Server 2008. |
Description |
See sub-issue (133) of Currently on Windows all agents running in the same session (same lock namespace) use common locks: ZBX_MUTEX_LOG, ZBX_MUTEX_PERFSTAT. This is a risky dependency between agents. Possible effects:
In Unix we use SysV mutexes with limited namespace. On Windows we can convert at least ZBX_MUTEX_LOG to the name of the log file that this lock is protecting. We could also use configuration file or hostname (if -m was used) as a prefix for these locks. |
Comments |
Comment by Sandis Neilands (Inactive) [ 2015 Nov 24 ] |
Opted to use process ID instead of log or configuration file names as unique identifiers of agent within session:
Tested on:
Note that on Windows 2000 there is a single name-space for mutexes (there are no sessions). Useful tool for testing: Sysinternals Process Explorer. Search for "ZBX_MUTEX" in the tool. Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-10034 . |
Comment by Sandis Neilands (Inactive) [ 2015 Nov 25 ] |
(1) It is possible to allocate mutex names in less than MAX_PATH length. The length of the formatted string can be determined with _sctprintf(). sandis.neilands RESOLVED in r56881. wiper CLOSED |
Comment by Andris Zeila [ 2015 Dec 07 ] |
(2) As Zabbix supports only unicode builds on Windows, we are phasing out TCHAR usage. sandis.neilands RESOLVED in r57049, r57050. wiper CLOSED, please review minor fixes dealing with compiler warnings in r57056 sandis.neilands Thanks! |
Comment by Andris Zeila [ 2015 Dec 08 ] |
Successfully tested |
Comment by Sandis Neilands (Inactive) [ 2015 Dec 08 ] |
Released in:
|