Ad Widget

Collapse

[1.6.8] zabbix_agentd crashes - Red Hat 5.5 / LDAP

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • NOB
    Senior Member
    Zabbix Certified Specialist
    • Mar 2007
    • 469

    #1

    [1.6.8] zabbix_agentd crashes - Red Hat 5.5 / LDAP

    Hi

    we can reproduce a crash of the zabbix_agentd on newly installed
    RedHat 5.5 systems with LDAP authentication enabled and used.
    The error message is Segmentation fault. I am not sure
    whether the code in src/zbxnix/daemon.c was changed for 1.8.x or not.
    A 1.6.8 zabbix_proxy on the same server executing the same daemon code
    works fine, though !

    According to our experiments and analysis the cause of the problem does
    not seem to be the zabbix_agentd but the OS or its configuration wrt. LDAP.
    I am no LDAP nor PAM expert, so I can't tell. The zabbix user is a local
    user and belongs to a local group.

    The agent crashes only, if started by user root and therefore it changes
    internally to user zabbix.
    If started by a normal user, this part of the code in daemon.c is not
    executed.

    The backtrace (see attached file) suggests, that the OS is accessing LDAP
    regardless whether the user is local or not. The crash happens in initgroups()
    and the subroutines called by it.

    I checked the parameters to the initgroups call which the zabbix_agentd provides and everything is OK: user: zabbix, gid: 508.

    Our workaround is to start the zabbix_agentd in the init script directly
    as user zabbix (via su). And this works fine.
    We don't experience those problems with 1.6.8 agents running on previous versions of RedHat
    OS, i.e. 5,4, 5.3 or 4.x where LDAP is configured and used.

    I hope this helps others to avoid some experiments.

    Best regards

    Norbert.
    Attached Files
    Last edited by NOB; 20-08-2010, 11:19.
  • NOB
    Senior Member
    Zabbix Certified Specialist
    • Mar 2007
    • 469

    #2
    Solved !

    Hi

    solved: don't use static linking !

    Using the option --enable-static for configure seems to be the culprit for
    this crash.
    Still don't know, exactly why, though.

    HTH,

    Norbert.

    Comment

    • neil
      Junior Member
      • Oct 2011
      • 1

      #3
      static link libraries flag not recommended?

      The 1.8 installation from source in manual indicates this flag must be added to build the agent from source once to copy easily to all other similar machines.

      I used 1.9.5 source, added the flag to statically link, made and got the same "Segmentation Fault" after starting as root in /opt/zabbix-agent/zabbix-1.9.5/src/zabbix_agentd

      How else to build from source where goal is to redistribute to same-architecture machines?

      As a note, I did get plenty of (I ignored because I didn't understand implications and I am lame - even after googling):
      ../../src/libs/zbxcomms/libzbxcomms.a(comms.o): In function `zbx_gethost_by_ip':
      /opt/zabbix-agent/zabbix-1.9.5/src/libs/zbxcomms/comms.c:125: warning: Using 'gethostbyaddr' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking

      Comment

      Working...