reqList->receive() returning immediately

Hi,
We’ve updated our libraries to the latest and notice that CPU load on our AgentX SubAgent processes is a lot higher. A bit of debugging shows that our processing loop is pinging the master agent every millisecond, and not once per second as in previous versions.

while (agent_running && (!dynamic_cast<Agentpp::SubAgentXMib *>(mib)->get_agentx()->quit()))
{
     req = reqList->receive(1);
     if (req)
     {
        mib->process_request(req);
     }
     else
     {
        dynamic_cast<Agentpp::SubAgentXMib *>(mib)->ping_master();
     }
}

I do not see a wrong handling of the timeout parameter in the code.

  1. Do you have more details about whether HAVE_POLL_SYSCALL is defined in your environment or not?
  2. Have you recompiled all libraries and are those libraries in the LD_LIBRARY_PATH or statically linked?