Deadlock when calling get_rows_cloned() right after process_request()

I have an SNMP Agent Class that calls process_request().

If the agent has received a SET request, and we attempt to read the updated data right after by calling mib_tableEntry::instance->get_rows_cloned(), it ends up frozen for 5 seconds until the lock times out.

I’ve found that I can kind of hack a solution by waiting for the process_request thread to complete, which doesn’t take long at all.

while (mibClass->get_thread_pool()->is_busy())
{
}

AGENT++ 4.6.1
SNMP++ 3.5.1

Have you used the lock order as described in: What is the lock order for Mib objects in a multi-threaded agent? - XWiki?

1 Like

Yeah that was exactly my problem. I needed to lock the whole mib instead of just the MibEntry. Thanks, Frank!