Ad Widget

Collapse

SIGSEGV received on Zaabix_Agent installed on Sun Solaris 5.10

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rohitist
    Member
    • Apr 2014
    • 30

    #1

    SIGSEGV received on Zaabix_Agent installed on Sun Solaris 5.10

    Hi,

    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);
    The log is shown below:

    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 ...
    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.

    Code:
    5604:20140624:160249.084 Requested [system.cpu.load[percpu,avg15]]
    5604:20140624:160249.085 Sending back [0.077881]
    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:

    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.
    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.

    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;
    }
    This code is called from the function "
    Code:
    process(command, 0, &result)
    " 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
    Last edited by rohitist; 25-06-2014, 13:46.
Working...