Ad Widget

Collapse

1.4 Node Watcher Thread

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

    #16
    Hi,

    if you just have one masternode with the id 0 - as you seem to have,
    there is an endless-loop in the code.
    The following patch fixes it - applied to 1.3.7 and 1.3.8.

    Code:
    --- zabbix-1.4/src/zabbix_server/nodewatcher/nodesender.c       Tue May 29 14:52:49 2007
    +++ zabbix-1.3.8/src/zabbix_server/nodewatcher/nodesender.c     Tue May 22 15:02:23 2007
    @@ -388,8 +388,8 @@
     
            send_to_master_and_slave(nodeid);
     
    -       result = DBselect("select nodeid from nodes where masterid=%d",
    -               nodeid);
    +       result = DBselect("select nodeid from nodes where masterid=%d and nodeid != %d",
    +               nodeid, nodeid);
            while((row=DBfetch(result)))
            {
                    process_node(atoi(row[0]));
    No surprise, that the memory gets allocated that fast.
    It's "just" the stack that grows.

    We are not running 1.4 server for now. Just waiting for 1.4.1 and
    testing the agents of 1.4.

    HTH,

    Norbert.

    Comment

    • agehring
      Member
      • Oct 2006
      • 49

      #17
      That patch fixed the problem.

      I had setup zabbix to run with the libgmalloc, but after doing that it no longer failed.

      All of the backtraces I had run against the failed instances had pointed to nodesender.

      As a added benefit, the system isn't running at such a breakneck pace anymore either.

      Thanks Norbert!
      Andrew

      Comment

      • Alexei
        Founder, CEO
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Sep 2004
        • 5654

        #18
        Note that installation of ZABBIX 1.4 does not create any records in table 'nodes'! The record with NodeId=0 seems suspicious to me.
        Alexei Vladishev
        Creator of Zabbix, Product manager
        New York | Tokyo | Riga
        My Twitter

        Comment

        • agehring
          Member
          • Oct 2006
          • 49

          #19
          Do you believe removing the DB entry would alleviate the issue?

          Thanks,
          Andrew

          Comment

          • Alexei
            Founder, CEO
            Zabbix Certified Trainer
            Zabbix Certified SpecialistZabbix Certified Professional
            • Sep 2004
            • 5654

            #20
            Yes, it is absolutely safe to remove this entry!
            Alexei Vladishev
            Creator of Zabbix, Product manager
            New York | Tokyo | Riga
            My Twitter

            Comment

            • NOB
              Senior Member
              Zabbix Certified Specialist
              • Mar 2007
              • 469

              #21
              Hi,

              OK, why I have this entry in the "nodes" table:

              As soon as you start zabbix_server -n 0 this node is created in the
              DB.
              After that I was immediately hit by the above problem.
              That's why I fixed it.

              So, what is a good idea for the "real" master node, i.e. the root
              of the tree ?
              0 obviously isn't :-)

              Regards,

              Norbert.

              Comment

              Working...