Re: Blocking in WeakIdentityMap

Patrick Wright <[email protected]>
Newsgroups gmane.comp.java.sun.jini
Message-ID <[email protected]>
Hi all

This problem--blocking threads waiting on WeakIdentityMap--appears to
have been a side-effect of profiling; my apologies. The problem only
shows up when the profiler is enabled. The trace for the blocking
thread (that owns the monitor) is below. I was running the profiler in
"full application mode", which for most of the app was not a problem,
but looks like in this case it caused the profiler to instrument
WeakIdentityMap (possibly as a hotspot?) and that led to timing
problems. I set the profiler to ignore the class and the block has
disappeared.

Sorry for the trouble; Vinod, Greg, thanks for the replies
Patrick


"http-8080-Processor8" daemon prio=10 tid=0x081c8000 nid=0x7257
runnable [0xacdc5000..0xacdc81b0]
   java.lang.Thread.State: RUNNABLE
        at java.net.SocketOutputStream.socketWrite0(Native Method)
        at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
        at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
        at java.io.ObjectOutputStream$BlockDataOutputStream.write(ObjectOutputStream.java:1814)
        at java.io.ObjectOutputStream.write(ObjectOutputStream.java:681)
        at com.sun.tools.profiler.server.EventBufferManager.eventBufferDumpHook(EventBufferManager.java:114)
        - locked <0xae2a9898> (a com.sun.tools.profiler.server.ProfilerServer)
        at com.sun.tools.profiler.server.ProfilerInterface$1.handleEventBufferDump(ProfilerInterface.java:121)
        - locked <0xae2a9930> (a java.lang.Object)
        at com.sun.tools.profiler.server.ProfilerRuntimeCPU.copyLocalBuffer(ProfilerRuntimeCPU.java:253)
        - locked <0xae160000> (a [B)
        at com.sun.tools.profiler.server.ProfilerRuntimeCPUSampledInstr.writeCompactEvent(ProfilerRuntimeCPUSampledInstr.java:72)
        at com.sun.tools.profiler.server.ProfilerRuntimeCPUSampledInstr.methodEntry(ProfilerRuntimeCPUSampledInstr.java:154)
        at com.sun.jini.collection.WeakIdentityMap$Key.create(WeakIdentityMap.java:95)
        at com.sun.jini.collection.WeakIdentityMap.get(WeakIdentityMap.java:55)
        at com.sun.jini.start.AggregatePolicyProvider.getCurrentSubPolicy(AggregatePolicyProvider.java:385)
        - locked <0xae6ac370> (a com.sun.jini.collection.WeakIdentityMap)
        at com.sun.jini.start.AggregatePolicyProvider.implies(AggregatePolicyProvider.java:201)
        at java.security.ProtectionDomain.implies(ProtectionDomain.java:213)
        at java.security.AccessControlContext.checkPermission(AccessControlContext.java:301)
        at java.security.AccessController.checkPermission(AccessController.java:546)
        at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
        at javax.security.auth.Subject.getSubject(Subject.java:268)
.
.
.

--------------------------------------------------------------------------
Getting Started:     http://www.jini.org/wiki/Category:Getting_Started
Community Web Site:  http://jini.org
jini-users Archive:  http://archives.java.sun.com/archives/jini-users.html
Unsubscribing:       email "signoff JINI-USERS"  to [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.