#22 destroySession blocked by Release_Reference_TImerTask

v1.0_(example)
open
None
5
2014-06-30
2014-03-31
No

I have an application that collects Windows information periodically using threads.
Each thread connects to a Windows Server and uses it's own JISession and releases it using JISession.destroySession(...) after collect information and waits for next cycle.

Eventually after a few days one of this threads becames BLOCKED and don't collects anymore.

Analyzing source code and stack trace above, it seems that for any reason, it becomes blocked by Timer (Release_References_TimerTask).

My Thread is "pool6-thread-25"
Release_References_TimerTask is "Timer-5"

It seems that both threads are lockeds.

Is it possible not to start "Release_Reference_TimerTask" at static code of JISession ?
Is there a way to Timer do not blocks other threads ?

"pool-6-thread-25" - Thread t@46
java.lang.Thread.State: BLOCKED
at org.jinterop.dcom.core.JIComServer.addRef_ReleaseRef(JIComServer.java:1021)
- waiting to lock <fb8208> (a java.lang.Object) owned by "Timer-5" t@59
at org.jinterop.dcom.core.JISession.releaseRefs(JISession.java:982)
at org.jinterop.dcom.core.JISession.destroySession(JISession.java:664)
at br.com.xact.xmon.plugins.protocols.wmi.Wmi.close(Wmi.java:294)
at br.com.xact.xmon.plugins.wmi.AbstractPluginWmi.finish(AbstractPluginWmi.java:68)
at br.com.xact.xmon.kernel.core.PluginRunnable.run(PluginRunnable.java:231)
at br.com.xact.xmon.kernel.core.RecursoMonitorado.executaPluginNestaThread(RecursoMonitorado.java:1754)
at br.com.xact.xmon.kernel.core.RecursoMonitorado.executaPluginMonitoramento(RecursoMonitorado.java:1920)
at br.com.xact.xmon.kernel.core.RecursoMonitorado.verificaMonitoramento(RecursoMonitorado.java:2770)
at br.com.xact.xmon.kernel.core.RecursoMonitorado.execute(RecursoMonitorado.java:2981)
at br.com.xact.xframe.core.types.Task.run(Task.java:107)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)

Locked ownable synchronizers:
- locked <93c8a6> (a java.util.concurrent.ThreadPoolExecutor$Worker)


"Timer-5" - Thread t@59
java.lang.Thread.State: WAITING
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <fded9f> (a java.util.concurrent.SynchronousQueue$TransferStack)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)
at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:458)
at java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:359)
at java.util.concurrent.SynchronousQueue.take(SynchronousQueue.java:925)
at org.jinterop.dcom.transport.JIComTransport.receive(JIComTransport.java:304)
at rpc.DefaultConnection.receiveFragment(DefaultConnection.java:201)
at rpc.DefaultConnection.receive(DefaultConnection.java:86)
at rpc.ConnectionOrientedEndpoint.receive(ConnectionOrientedEndpoint.java:226)
at rpc.ConnectionOrientedEndpoint.call(ConnectionOrientedEndpoint.java:123)
at rpc.Stub.call(Stub.java:113)
at org.jinterop.dcom.core.JIComServer.call(JIComServer.java:990)
- locked <fb8208> (a java.lang.Object)
at org.jinterop.dcom.core.JIComServer.call(JIComServer.java:945)
at org.jinterop.dcom.core.JIComServer.addRef_ReleaseRef(JIComServer.java:1029)
- locked <fb8208> (a java.lang.Object)
at org.jinterop.dcom.core.JISession.releaseRefs(JISession.java:982)
at org.jinterop.dcom.core.JISession.access$9(JISession.java:969)
at org.jinterop.dcom.core.JISession$Release_References_TimerTask.run(JISession.java:347)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)

Locked ownable synchronizers:
- None

Related

Bugs: #22

Discussion

  • Vikram Roopchand

    Hi,

    Can you try this JISession.setGlobalSocketTimeout, set it to something like 5 mins.

    thanks,
    best regards,
    Vikram

     
  • Vikram Roopchand

    Hi,

    Can you try this JISession.setGlobalSocketTimeout, set it to something like
    5 mins.

    thanks,
    best regards,
    Vikram

    On Mon, Mar 31, 2014 at 7:01 PM, Wellington Rats wellrats@users.sf.netwrote:


    Status: open
    Group: v1.0_(example)
    Created: Mon Mar 31, 2014 01:31 PM UTC by Wellington Rats
    Last Updated: Mon Mar 31, 2014 01:31 PM UTC
    Owner: Vikram Roopchand

    I have an application that collects Windows information periodically using
    threads.
    Each thread connects to a Windows Server and uses it's own JISession and
    releases it using JISession.destroySession(...) after collect information
    and waits for next cycle.

    Eventually after a few days one of this threads becames BLOCKED and don't
    collects anymore.

    Analyzing source code and stack trace above, it seems that for any reason,
    it becomes blocked by Timer (Release_References_TimerTask).

    My Thread is "pool6-thread-25"
    Release_References_TimerTask is "Timer-5"

    It seems that both threads are lockeds.

    Is it possible not to start "Release_Reference_TimerTask" at static code
    of JISession ?
    Is there a way to Timer do not blocks other threads ?

    "pool-6-thread-25" - Thread t@46
    java.lang.Thread.State: BLOCKED
    at
    org.jinterop.dcom.core.JIComServer.addRef_ReleaseRef(JIComServer.java:1021)
    - waiting to lock (a java.lang.Object) owned by "Timer-5" t@59
    at org.jinterop.dcom.core.JISession.releaseRefs(JISession.java:982)
    at org.jinterop.dcom.core.JISession.destroySession(JISession.java:664)
    at br.com.xact.xmon.plugins.protocols.wmi.Wmi.close(Wmi.java:294)
    at
    br.com.xact.xmon.plugins.wmi.AbstractPluginWmi.finish(AbstractPluginWmi.java:68)
    at br.com.xact.xmon.kernel.core.PluginRunnable.run(PluginRunnable.java:231)
    at
    br.com.xact.xmon.kernel.core.RecursoMonitorado.executaPluginNestaThread(RecursoMonitorado.java:1754)
    at
    br.com.xact.xmon.kernel.core.RecursoMonitorado.executaPluginMonitoramento(RecursoMonitorado.java:1920)
    at
    br.com.xact.xmon.kernel.core.RecursoMonitorado.verificaMonitoramento(RecursoMonitorado.java:2770)
    at
    br.com.xact.xmon.kernel.core.RecursoMonitorado.execute(RecursoMonitorado.java:2981)
    at br.com.xact.xframe.core.types.Task.run(Task.java:107)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
    at
    java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
    at
    java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
    at
    java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:744)

    Locked ownable synchronizers:
    - locked <93c8a6> (a java.util.concurrent.ThreadPoolExecutor$Worker)


    "Timer-5" - Thread t@59
    java.lang.Thread.State: WAITING
    at sun.misc.Unsafe.park(Native Method)
    - parking to wait for (a
    java.util.concurrent.SynchronousQueue$TransferStack)
    at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)
    at
    java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:458)
    at
    java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:359)
    at java.util.concurrent.SynchronousQueue.take(SynchronousQueue.java:925)
    at
    org.jinterop.dcom.transport.JIComTransport.receive(JIComTransport.java:304)
    at rpc.DefaultConnection.receiveFragment(DefaultConnection.java:201)
    at rpc.DefaultConnection.receive(DefaultConnection.java:86)
    at
    rpc.ConnectionOrientedEndpoint.receive(ConnectionOrientedEndpoint.java:226)
    at rpc.ConnectionOrientedEndpoint.call(ConnectionOrientedEndpoint.java:123)
    at rpc.Stub.call(Stub.java:113)
    at org.jinterop.dcom.core.JIComServer.call(JIComServer.java:990)
    - locked (a java.lang.Object)
    at org.jinterop.dcom.core.JIComServer.call(JIComServer.java:945)
    at
    org.jinterop.dcom.core.JIComServer.addRef_ReleaseRef(JIComServer.java:1029)
    - locked (a java.lang.Object)
    at org.jinterop.dcom.core.JISession.releaseRefs(JISession.java:982)
    at org.jinterop.dcom.core.JISession.access$9(JISession.java:969)
    at
    org.jinterop.dcom.core.JISession$Release_References_TimerTask.run(JISession.java:347)
    at java.util.TimerThread.mainLoop(Timer.java:555)
    at java.util.TimerThread.run(Timer.java:505)

    Locked ownable synchronizers:
    - None


    Sent from sourceforge.net because you indicated interest in
    https://sourceforge.net/p/j-interop/bugs/22/

    To unsubscribe from further messages, please visit
    https://sourceforge.net/auth/subscriptions/

    --
    The Mind is a place of its own. It can make a heaven out of hell or a hell
    out of heaven. Attitude is everything. No matter how adverse conditions
    maybe, one has the capacity to turn things around by one's Determination,
    Perseverance and Hardwork.

    John Milton
    (Paradise Lost)

     

    Related

    Bugs: #22


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks