Hi,
I have witnessed random occurrence of SIGSEGV signal caught while executing below statement in the zabbix_agent installed on SunOS (Solaris) 5.10.
The log is shown below:
Here Random means, some of the 'command' worked while some of them failed. Failing always caused agent to crash.
Below is the part of the log showing that some of the command worked before crashing.
As far as I understand, SIGSEGV is the SIGNAL caught due to improper handling of POINTERS. So, is this happening due to incompatibility issue of Zabbix with SunOS 5.10?
The same package was several times installed on Linux servers and nothing such was ever observed. So, I guess, there is nothing wrong with the package.
The above log is pasted from the DebugLevel=4. So, I can't help provide deeper detail
Just in case if you would like to have a look on the version of gcc installed, then please look below:
Please also note that I have installed agent on a sparse zone of SunOS 5.10.
Adding:
I have further debugged using Eclipse and found that following function was causing agent to crash.
This code is called from the function "
" to free the structure "request".
I have checked myself that free()ing was unsuccessful in spite of the variable had the memory allocation (I mean, it was not null).
I don't know the solution of crashing and the reason for this seems confusing. Perhaps, free()ing variable in sparse zone is sometimes restricted by the global zone.
Could this be the reason?
Thanks in advance.
Regards,
Rohit
I have witnessed random occurrence of SIGSEGV signal caught while executing below statement in the zabbix_agent installed on SunOS (Solaris) 5.10.
Code:
process(command, 0, &result);
Code:
5604:20140624:160250.085 Requested [system.cpu.load[percpu,avg1]] 5604:20140624:160250.085 Got signal [signal:11(SIGSEGV),reason:1,refaddr:10]. Crashing ...
Below is the part of the log showing that some of the command worked before crashing.
Code:
5604:20140624:160249.084 Requested [system.cpu.load[percpu,avg15]] 5604:20140624:160249.085 Sending back [0.077881]
The same package was several times installed on Linux servers and nothing such was ever observed. So, I guess, there is nothing wrong with the package.
The above log is pasted from the DebugLevel=4. So, I can't help provide deeper detail

Just in case if you would like to have a look on the version of gcc installed, then please look below:
Code:
gcc --version gcc (GCC) 3.4.3 (csl-sol210-3_4-branch+sol_rpath) Copyright (C) 2004 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Adding:
I have further debugged using Eclipse and found that following function was causing agent to crash.
Code:
void free_request(AGENT_REQUEST *request)
{
int i;
zbx_free(request->key);
for (i = 0; i < request->nparam; i++)
zbx_free(request->params[i]);
zbx_free(request->params);
request->nparam = 0;
}
Code:
process(command, 0, &result)
I have checked myself that free()ing was unsuccessful in spite of the variable had the memory allocation (I mean, it was not null).
I don't know the solution of crashing and the reason for this seems confusing. Perhaps, free()ing variable in sparse zone is sometimes restricted by the global zone.
Could this be the reason?
Thanks in advance.
Regards,
Rohit