Hi Shangtang, No, I do not understand it. The stack traces do not indicate an dead lock. Thus, some code in a notification handling routine has not returned in a timely fassion. But this code is not part of SNMP4J. So you will have to debug that yourself.
Best regards, Frank Am 26.10.2011 12:30, schrieb shangtang wei: > hi,Frank, > > we have 4 snmp instance, these share one mpv3 instance. > > the trap receiver thread pool have 50 threads, but only one thread works, > others blocked. we configured 5k devices, when the snmp thread is blocked, > some devices are in communication loss state. > do you understand my question? > > thanks > -shangtang > On Wed, Oct 26, 2011 at 6:00 PM,<snmp4j-requ...@agentpp.org> wrote: > >> Send SNMP4J mailing list submissions to >> snmp4j@agentpp.org >> >> To subscribe or unsubscribe via the World Wide Web, visit >> http://lists.agentpp.org/mailman/listinfo/snmp4j >> or, via email, send a message with subject or body 'help' to >> snmp4j-requ...@agentpp.org >> >> You can reach the person managing the list at >> snmp4j-ow...@agentpp.org >> >> When replying, please edit your Subject line so it is more specific >> than "Re: Contents of SNMP4J digest..." >> >> >> Today's Topics: >> >> 1. Re: thread lock in org.snmp4j.mp.MPv3.prepareResponseMessage >> (Frank Fock) >> 2. Re: Logging change in 2.0.2 version (Frank Fock) >> >> >> ---------------------------------------------------------------------- >> >> Message: 1 >> Date: Wed, 26 Oct 2011 00:18:20 +0200 >> From: Frank Fock<f...@agentpp.com> >> Subject: Re: [SNMP4J] thread lock in >> org.snmp4j.mp.MPv3.prepareResponseMessage >> To: snmp4j@agentpp.org >> Message-ID:<4ea735ac.90...@agentpp.com> >> Content-Type: text/plain; charset=ISO-8859-1; format=flowed >> >> Hi, >> >> I do not understand your question. Are you encountering deadlocks? >> The stacktraces do *not* seem to indicate a deadlock. >> So what is the problem you encouter? >> >> Best regards, >> Frank >> >> Am 25.10.2011 09:02, schrieb shangtang wei: >>> Hello, everyone, >>> >>> >>> >>> >>> >>> Snmp4j version 1.11.2. >>> >>> We have 50 threads to process inform msg. we encountered many times this >>> snmp stack thread state. Can someone give me some advice? >>> >>> 49 threads stack trace: >>> >>> "DispatcherPool.5" prio=3 tid=0x02f59800 nid=0x112 waiting for monitor >> entry >>> [0x161ef000..0x161efbf0] >>> >>> java.lang.Thread.State: BLOCKED (on object monitor) >>> >>> at >>> org.snmp4j.Snmp$NotificationDispatcher.processPdu(Snmp.java:1825) >>> >>> - waiting to lock<0x60b6fff8> (a >>> org.snmp4j.Snmp$NotificationDispatcher) >>> >>> at org.snmp4j.Snmp.fireProcessPdu(Snmp.java:1430) >>> >>> at org.snmp4j.Snmp.processPdu(Snmp.java:1288) >>> >>> at >>> >> org.snmp4j.MessageDispatcherImpl.fireProcessPdu(MessageDispatcherImpl.java:616) >>> at >>> >> org.snmp4j.MessageDispatcherImpl.dispatchMessage(MessageDispatcherImpl.java:287) >>> at >>> >> org.snmp4j.MessageDispatcherImpl.processMessage(MessageDispatcherImpl.java:347) >>> at >>> >> org.snmp4j.util.MultiThreadedMessageDispatcher$MessageTask.run(MultiThreadedMessageDispatcher.java:209) >>> at >>> org.snmp4j.util.ThreadPool$TaskManager.run(ThreadPool.java:239) >>> >>> - locked<0x56e5e980> (a >>> org.snmp4j.util.ThreadPool$TaskManager) >>> >>> 1 thread stack trace: >>> >>> "DispatcherPool.10" prio=3 tid=0x02dfc800 nid=0x117 runnable >>> [0x1605f000..0x1605fa70] >>> >>> java.lang.Thread.State: RUNNABLE >>> >>> at java.util.WeakHashMap.get(Unknown Source) >>> >>> at org.snmp4j.mp.MPv3$Cache.popEntry(MPv3.java:495) >>> >>> - locked<0x565be9c0> (a org.snmp4j.mp.MPv3$Cache) >>> >>> at >> org.snmp4j.mp.MPv3.prepareResponseMessage(MPv3.java:810) >>> at >>> >> org.snmp4j.MessageDispatcherImpl.returnResponsePdu(MessageDispatcherImpl.java:553) >>> at >>> >> org.snmp4j.util.MultiThreadedMessageDispatcher.returnResponsePdu(MultiThreadedMessageDispatcher.java:162) >>> at >>> org.snmp4j.Snmp$NotificationDispatcher.sendInformResponse(Snmp.java:1858) >>> >>> at >>> org.snmp4j.Snmp$NotificationDispatcher.processPdu(Snmp.java:1831) >>> >>> - locked<0x60b6fff8> (a >>> org.snmp4j.Snmp$NotificationDispatcher) >>> >>> at org.snmp4j.Snmp.fireProcessPdu(Snmp.java:1430) >>> >>> at org.snmp4j.Snmp.processPdu(Snmp.java:1288) >>> >>> at >>> >> org.snmp4j.MessageDispatcherImpl.fireProcessPdu(MessageDispatcherImpl.java:616) >>> at >>> >> org.snmp4j.MessageDispatcherImpl.dispatchMessage(MessageDispatcherImpl.java:287) >>> at >>> >> org.snmp4j.MessageDispatcherImpl.processMessage(MessageDispatcherImpl.java:347) >>> at >>> >> org.snmp4j.util.MultiThreadedMessageDispatcher$MessageTask.run(MultiThreadedMessageDispatcher.java:209) >>> at >>> org.snmp4j.util.ThreadPool$TaskManager.run(ThreadPool.java:239) >>> >>> - locked<0x568fdb20> (a >>> org.snmp4j.util.ThreadPool$TaskManager) >>> >>> >>> >>> [DispatcherPool.44] Aug 21, 2011 10:16:25 PM >> org.snmp4j.log.JavaLogAdapter >>> log >>> >>> FINE: Fire process PDU event: CommandResponderEvent >>> >>> >>> >>> [DispatcherPool.44] Aug 21, 2011 10:16:28 PM >> org.snmp4j.log.JavaLogAdapter >>> log >>> >>> FINE: Sending message to 27.184.161.225/34248 with >>> >>> >>> >>> >>> >>> Regards >>> >>> -shangtang >>> _______________________________________________ >>> SNMP4J mailing list >>> SNMP4J@agentpp.org >>> http://lists.agentpp.org/mailman/listinfo/snmp4j >> >> >> ------------------------------ >> >> Message: 2 >> Date: Wed, 26 Oct 2011 00:29:12 +0200 >> From: Frank Fock<f...@agentpp.com> >> Subject: Re: [SNMP4J] Logging change in 2.0.2 version >> To: snmp4j@agentpp.org >> Message-ID:<4ea73838.1070...@agentpp.com> >> Content-Type: text/plain; charset=ISO-8859-1; format=flowed >> >> Hi Johnson, >> >> I do not think that there is a regression bug in the logging >> adapter. >> Have you debugged the code and are you sure the log factory >> initialization for your custom logging adapter is being called? >> >> Best regards, >> Frank >> >> Am 24.10.2011 21:55, schrieb Johnson Smith: >>> Hi Team, >>> >>> I have my own logging implemented (MessageLogFactory) and it is set >> before >>> using any SNMP4J classes in the below manner in my application. This >> worked >>> fine in 1.11.3 version. >>> >>> // my custom logging >>> LogFactory.setLogFactory(new MessageLogFactory()); >>> >>> However when I take in the latest 2.0.2 jar and nothing else changed I do >>> not see my MessageLogFactory being used for logging purpose. Could >> someone >>> confirm this as a problem? >>> >>> Thanks >>> Johnson. >>> _______________________________________________ >>> SNMP4J mailing list >>> SNMP4J@agentpp.org >>> http://lists.agentpp.org/mailman/listinfo/snmp4j >> >> >> ------------------------------ >> >> _______________________________________________ >> SNMP4J mailing list >> SNMP4J@agentpp.org >> http://lists.agentpp.org/mailman/listinfo/snmp4j >> >> >> End of SNMP4J Digest, Vol 93, Issue 13 >> ************************************** >> > _______________________________________________ > SNMP4J mailing list > SNMP4J@agentpp.org > http://lists.agentpp.org/mailman/listinfo/snmp4j _______________________________________________ SNMP4J mailing list SNMP4J@agentpp.org http://lists.agentpp.org/mailman/listinfo/snmp4j