No subject


Thu May 4 07:32:04 CEST 2017


Moreover, the number of running threads in my server application has increased 
a lot and many threads are somehow blocked on snmp send request.
Example:

Thread t at 1194749: (state = BLOCKED)
 - java.lang.Object.wait(long) @bci=0 (Compiled frame; information may be 
imprecise)
 - java.lang.Object.wait() @bci=2, line=474 (Compiled frame)
 - org.snmp4j.Snmp.send(org.snmp4j.PDU, org.snmp4j.Target) @bci=4, line=758 
(Interpreted frame)
 - com.tilab.common.device.snmp.SNMPV2Driver.executeRequest(org.snmp4j.PDU) 
@bci=15, line=670 (Interpreted frame)
 - com.tilab.common.device.snmp.SNMPV2Driver.read(org.snmp4j.PDU) @bci=2, 
line=614 (Compiled frame)
 - com.tilab.common.device.snmp.SNMPV2Driver.executeGetRequest(java.lang.
String) @bci=26, line=231 (Compiled frame)
 - com.tilab.common.device.snmp.SNMPV2Adapter.readOidValues(java.lang.String
[], com.tilab.emmas.device.Device, java.lang.Stri
ng) @bci=4, line=512 (Compiled frame)
 - com.tilab.common.device.snmp.SNMPV2Adapter.loadObjectValues(com.tilab.emmas.
mibmodel.MibObject, java.lang.String[]) @bci=2
3, line=366 (Compiled frame)
 - com.tilab.common.device.snmp.SNMPV2Adapter.loadObject(java.lang.Class, com.
tilab.emmas.device.Device, java.lang.String, ja
va.lang.String[]) @bci=35, line=289 (Compiled frame)
 - com.tilab.emmas.device.Device.load(java.lang.Class, com.tilab.common.device.
IMibAdapter, java.lang.String, java.lang.Strin
g[]) @bci=6, line=327 (Compiled frame)
 - com.tilab.emmas.scheduler.performance.PmCollectionTask.call() @bci=26, 
line=47 (Compiled frame)
 - java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=28, line=675 
(Compiled frame)
 - java.lang.Thread.run() @bci=11, line=595 (Compiled frame)

If you need additional traces or tests, feel free to ask.

Waiting for your help,
Alberto


>----Messaggio originale----
>Dal: fock at agentpp.com
>Data: 15/12/2006 1.56
>A: "Alberto"<alberto_mascheroni at fastwebnet.it>
>Cc: <snmp4j at agentpp.org>
>Ogg: Re: R: Re: [SNMP4J] IllegalStateException in Snmp.send()
>
>Hi Alberto,
>
>According to your and the others' information I have
>revisited the current synchronous Snmp.send(..) code
>and found a possible cause of the exception.
>
>Please try out the following modification of the
>synchronous send method. The difference is the
>additional "synchronized" block with the comment:
>
>   public ResponseEvent send(PDU pdu, Target target,
>                             TransportMapping transport) throws 
>IOException {
>
>...
>
>         if (retryRequest != null) {
>           retryRequest.setFinished();
>           // We need to synchronize here to make sure that the retryRequest
>           // is already scheduled when we cancel it. Otherwise it might be
>           // canceled before being scheduled which results in an
>           // IllegalStateException being thrown in the retry handler.
>           synchronized (sync) {
>             retryRequest.cancel();
>           }
>         }
>...
>   }
>
>Is my assumption correct that you are using synchronous
>requests?
>
>Best regards,
>Frank


--------------------
Alberto Mascheroni
Mob. +39-333-6314222



More information about the SNMP4J mailing list