[jcifs] JCIFS Thread Blocked

Michael B Allen ioplex at gmail.com
Thu Dec 11 21:35:32 GMT 2008


On Thu, Dec 11, 2008 at 12:06 PM, Jack Collins
<jackcollins at wallquest.com> wrote:
> I'm using JCIFS as part of a Tomcat 6 web-app using Sun JDK6. After one of my methods (called by a quartz job from cron scheduler once per day) exits the CPU gets pinned at about 50%. A thread dump shows the following. Does anybody know what I might have done wrong?

I'm not even sure what you're asking but this doesn't look like it has
anything to do with JCIFS. At least your thread dump shows nothing
unusual.

Except perhaps the fact that it looks like a name service lookup is
going unanswered. Note that if you're not using WINS you'll want to
set the property jcifs.resolveOrder=DNS to stop things from hanging
for 6 seconds while the WINS lookups timeout.

Mike

>
> 2008-12-11 11:35:06
> Full thread dump Java HotSpot(TM) Client VM (11.0-b15 mixed mode):
>
> "Transport1" daemon prio=6 tid=0x47a13800 nid=0x1308 runnable [0x48a1f000..0x48a1fd94]
>   java.lang.Thread.State: RUNNABLE
>        at java.net.SocketInputStream.socketRead0(Native Method)
>        at java.net.SocketInputStream.read(SocketInputStream.java:129)
>        at jcifs.util.transport.Transport.readn(Transport.java:29)
>        at jcifs.smb.SmbTransport.peekKey(SmbTransport.java:370)
>        at jcifs.util.transport.Transport.loop(Transport.java:100)
>        at jcifs.util.transport.Transport.run(Transport.java:265)
>        at java.lang.Thread.run(Thread.java:619)
>
> "Transport2" daemon prio=6 tid=0x476fb800 nid=0xdc runnable [0x488ff000..0x488ffa14]
>   java.lang.Thread.State: RUNNABLE
>        at java.net.SocketInputStream.socketRead0(Native Method)
>        at java.net.SocketInputStream.read(SocketInputStream.java:129)
>        at jcifs.util.transport.Transport.readn(Transport.java:29)
>        at jcifs.smb.SmbTransport.peekKey(SmbTransport.java:370)
>        at jcifs.util.transport.Transport.loop(Transport.java:100)
>        at jcifs.util.transport.Transport.run(Transport.java:265)
>        at java.lang.Thread.run(Thread.java:619)
>
> "JCIFS-NameServiceClient" daemon prio=6 tid=0x47dca800 nid=0x988 runnable [0x4899f000..0x4899fa94]
>   java.lang.Thread.State: RUNNABLE
>        at jcifs.netbios.NameServicePacket.readResourceRecordWireFormat(NameServicePacket.java:226)
>        at jcifs.netbios.NameQueryResponse.readBodyWireFormat(NameQueryResponse.java:31)
>        at jcifs.netbios.NameServicePacket.readWireFormat(NameServicePacket..java:129)
>        at jcifs.netbios.NameServiceClient.run(NameServiceClient.java:191)
>        - locked <0x0348c8b8> (a jcifs.netbios.NameQueryResponse)
>        at java.lang.Thread.run(Thread.java:619)
>
> "JCIFS-QueryThread: wqadmin" daemon prio=6 tid=0x4779c800 nid=0x1664 waiting for monitor entry [0x4894f000..0x4894fb14]
>   java.lang.Thread.State: BLOCKED (on object monitor)
>        at java.lang.Object.wait(Native Method)
>        at jcifs.netbios.NameServiceClient.send(NameServiceClient.java:241)
>        - locked <0x0348c8b8> (a jcifs.netbios.NameQueryResponse)
>        at jcifs.netbios.NameServiceClient.getByName(NameServiceClient.java:324)
>        at jcifs.netbios.NbtAddress.doNameQuery(NbtAddress.java:307)
>        at jcifs.netbios.NbtAddress.getByName(NbtAddress.java:422)
>        at jcifs.UniAddress$QueryThread.run(UniAddress.java:147)
>
> "http-8080-1" daemon prio=6 tid=0x47538400 nid=0x11f8 runnable [0x488af000..0x488afc14]
>   java.lang.Thread.State: RUNNABLE
>        at java.net.SocketInputStream.socketRead0(Native Method)
>        at java.net.SocketInputStream.read(SocketInputStream.java:129)
>        at org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer.java:700)
>        at org.apache.coyote.http11.InternalInputBuffer.parseRequestLine(InternalInputBuffer.java:366)
>        at org.apache.coyote.http11.Http11Processor.process(Http11Processor..java:805)
>        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
>        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
>        at java.lang.Thread.run(Thread.java:619)
>
> "TP-Monitor" daemon prio=6 tid=0x47511800 nid=0xc68 in Object.wait() [0x4885f000..0x4885fc94]
>   java.lang.Thread.State: TIMED_WAITING (on object monitor)
>        at java.lang.Object.wait(Native Method)
>        at org.apache.tomcat.util.threads.ThreadPool$MonitorRunnable.run(ThreadPool.java:565)
>        - locked <0x093f7d78> (a org.apache.tomcat.util.threads.ThreadPool$MonitorRunnable)
>        at java.lang.Thread.run(Thread.java:619)
>
> "TP-Processor4" daemon prio=6 tid=0x47611400 nid=0x13e0 runnable [0x4880f000..0x4880fd14]
>   java.lang.Thread.State: RUNNABLE
>        at java.net.PlainSocketImpl.socketAccept(Native Method)
>        at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384)
>        - locked <0x093f7dd8> (a java.net.SocksSocketImpl)
>        at java.net.ServerSocket.implAccept(ServerSocket.java:453)
>        at java.net.ServerSocket.accept(ServerSocket.java:421)
>        at org.apache.jk.common.ChannelSocket.accept(ChannelSocket.java:306)
>        at org.apache.jk.common.ChannelSocket.acceptConnections(ChannelSocket.java:660)
>        at org.apache.jk.common.ChannelSocket$SocketAcceptor.runIt(ChannelSocket.java:870)
>        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
>        at java.lang.Thread.run(Thread.java:619)
>
> "TP-Processor3" daemon prio=6 tid=0x476e8c00 nid=0xfdc in Object.wait() [0x487bf000..0x487bfd94]
>   java.lang.Thread.State: WAITING (on object monitor)
>        at java.lang.Object.wait(Native Method)
>        - waiting on <0x093f8000> (a org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
>        at java.lang.Object.wait(Object.java:485)
>        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:662)
>        - locked <0x093f8000> (a org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
>        at java.lang.Thread.run(Thread.java:619)
>
> "TP-Processor2" daemon prio=6 tid=0x4750f400 nid=0xa8c in Object.wait() [0x4876f000..0x4876fa14]
>   java.lang.Thread.State: WAITING (on object monitor)
>        at java.lang.Object.wait(Native Method)
>        - waiting on <0x093f8020> (a org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
>        at java.lang.Object.wait(Object.java:485)
>        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:662)
>        - locked <0x093f8020> (a org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
>        at java.lang.Thread.run(Thread.java:619)
>
> "TP-Processor1" daemon prio=6 tid=0x47789400 nid=0xec0 in Object.wait() [0x4871f000..0x4871fa94]
>   java.lang.Thread.State: WAITING (on object monitor)
>        at java.lang.Object.wait(Native Method)
>        - waiting on <0x093f8040> (a org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
>        at java.lang.Object.wait(Object.java:485)
>        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:662)
>        - locked <0x093f8040> (a org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
>        at java.lang.Thread.run(Thread.java:619)
>
> "http-8080-Acceptor-0" daemon prio=6 tid=0x473e2c00 nid=0x954 runnable [0x486cf000..0x486cfb14]
>   java.lang.Thread.State: RUNNABLE
>        at java.net.PlainSocketImpl.socketAccept(Native Method)
>        at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384)
>        - locked <0x07b14888> (a java.net.SocksSocketImpl)
>        at java.net.ServerSocket.implAccept(ServerSocket.java:453)
>        at java.net.ServerSocket.accept(ServerSocket.java:421)
>        at org.apache.tomcat.util.net.DefaultServerSocketFactory.acceptSocket(DefaultServerSocketFactory.java:61)
>        at org.apache.tomcat.util.net.JIoEndpoint$Acceptor.run(JIoEndpoint.java:310)
>        at java.lang.Thread.run(Thread.java:619)
>
> "ContainerBackgroundProcessor[StandardEngine[Catalina]]" daemon prio=6 tid=0x478b4400 nid=0x1340 waiting on condition [0x4867f000..0x4867fb94]
>   java.lang.Thread.State: TIMED_WAITING (sleeping)
>        at java.lang.Thread.sleep(Native Method)
>        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1579)
>        at java.lang.Thread.run(Thread.java:619)
>
> "AS400 Read Daemon-4" daemon prio=6 tid=0x46e32400 nid=0xc00 runnable [0x4862f000..0x4862fc14]
>   java.lang.Thread.State: RUNNABLE
>        at java.net.SocketInputStream.socketRead0(Native Method)
>        at java.net.SocketInputStream.read(SocketInputStream.java:129)
>        at com.ibm.as400.access.DataStream.readFromStream(DataStream.java:48)
>        at com.ibm.as400.access.ClientAccessDataStream.construct(ClientAccessDataStream.java:46)
>        at com.ibm.as400.access.AS400ThreadedServer.run(AS400ThreadedServer..java:321)
>        at java.lang.Thread.run(Thread.java:619)
>
> "MySQL Statement Cancellation Timer" daemon prio=6 tid=0x4764d400 nid0x140c in Object.wait() [0x485df000..0x485dfd14]
>   java.lang.Thread.State: WAITING (on object monitor)
>        at java.lang.Object.wait(Native Method)
>        - waiting on <0x0935dbf0> (a java.util.TaskQueue)
>        at java.lang.Object.wait(Object.java:485)
>        at java.util.TimerThread.mainLoop(Timer.java:483)
>        - locked <0x0935dbf0> (a java.util.TaskQueue)
>        at java.util.TimerThread.run(Timer.java:462)
>
> "DefaultQuartzScheduler_QuartzSchedulerThread" prio=6 tid=0x47b98c00 nid=0xfc0 waiting on condition [0x4858f000..0x4858fd94]
>   java.lang.Thread.State: TIMED_WAITING (sleeping)
>        at java.lang.Thread.sleep(Native Method)
>        at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:420)
>
> "DefaultQuartzScheduler_Worker-10" prio=6 tid=0x474b2400 nid=0xef8 in Object.wait() [0x4853f000..0x4853fa94]
>   java.lang.Thread.State: TIMED_WAITING (on object monitor)
>        at java.lang.Object.wait(Native Method)
>        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:523)
>        - locked <0x08ec0d50> (a org.quartz.simpl.SimpleThreadPool$WorkerThread)
>
> "DefaultQuartzScheduler_Worker-9" prio=6 tid=0x47aba800 nid=0x1c4 in Object.wait() [0x484ef000..0x484efa14]
>   java.lang.Thread.State: TIMED_WAITING (on object monitor)
>        at java.lang.Object.wait(Native Method)
>        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:523)
>        - locked <0x08ec0e40> (a org.quartz.simpl.SimpleThreadPool$WorkerThread)
>
> "DefaultQuartzScheduler_Worker-8" prio=6 tid=0x47aac400 nid=0xb24 in Object.wait() [0x4849f000..0x4849fb14]
>   java.lang.Thread.State: TIMED_WAITING (on object monitor)
>        at java.lang.Object.wait(Native Method)
>        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:523)
>        - locked <0x08ec0dc8> (a org.quartz.simpl.SimpleThreadPool$WorkerThread)
>
> "DefaultQuartzScheduler_Worker-7" prio=6 tid=0x475e4800 nid=0xd6c in Object.wait() [0x4844f000..0x4844fc94]
>   java.lang.Thread.State: TIMED_WAITING (on object monitor)
>        at java.lang.Object.wait(Native Method)
>        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:523)
>        - locked <0x08ec0fa8> (a org.quartz.simpl.SimpleThreadPool$WorkerThread)
>
> "DefaultQuartzScheduler_Worker-6" prio=6 tid=0x47cf4c00 nid=0xb98 in Object.wait() [0x483ff000..0x483ffb94]
>   java.lang.Thread.State: TIMED_WAITING (on object monitor)
>        at java.lang.Object.wait(Native Method)
>        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:523)
>        - locked <0x08ec0cd8> (a org.quartz.simpl.SimpleThreadPool$WorkerThread)
>
> "DefaultQuartzScheduler_Worker-5" prio=6 tid=0x47c06400 nid=0x2f0 in Object.wait() [0x483af000..0x483afd14]
>   java.lang.Thread.State: TIMED_WAITING (on object monitor)
>        at java.lang.Object.wait(Native Method)
>        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:523)
>        - locked <0x08ec1020> (a org.quartz.simpl.SimpleThreadPool$WorkerThread)
>
> "DefaultQuartzScheduler_Worker-4" prio=6 tid=0x475e3800 nid=0x1544 in Object.wait() [0x4835f000..0x4835fc14]
>   java.lang.Thread.State: TIMED_WAITING (on object monitor)
>        at java.lang.Object.wait(Native Method)
>        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:523)
>        - locked <0x08ec0eb8> (a org.quartz.simpl.SimpleThreadPool$WorkerThread)
>
> "DefaultQuartzScheduler_Worker-3" prio=6 tid=0x47787400 nid=0x498 in Object.wait() [0x4830f000..0x4830fd94]
>   java.lang.Thread.State: TIMED_WAITING (on object monitor)
>        at java.lang.Object.wait(Native Method)
>        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:523)
>        - locked <0x08ec1098> (a org.quartz.simpl.SimpleThreadPool$WorkerThread)
>
> "DefaultQuartzScheduler_Worker-2" prio=6 tid=0x47bb3400 nid=0x13cc in Object.wait() [0x482bf000..0x482bfa14]
>   java.lang.Thread.State: TIMED_WAITING (on object monitor)
>        at java.lang.Object.wait(Native Method)
>        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:523)
>        - locked <0x08ec0f30> (a org.quartz.simpl.SimpleThreadPool$WorkerThread)
>
> "DefaultQuartzScheduler_Worker-1" prio=6 tid=0x474b1800 nid=0x3bc in Object.wait() [0x4826f000..0x4826fa94]
>   java.lang.Thread.State: TIMED_WAITING (on object monitor)
>        at java.lang.Object.wait(Native Method)
>        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:523)
>        - locked <0x08ec1110> (a org.quartz.simpl.SimpleThreadPool$WorkerThread)
>
> "AS400 Read Daemon-2" daemon prio=6 tid=0x47a3d400 nid=0x14c runnable [0x481ef000..0x481efb14]
>   java.lang.Thread.State: RUNNABLE
>        at java.net.SocketInputStream.socketRead0(Native Method)
>        at java.net.SocketInputStream.read(SocketInputStream.java:129)
>        at com.ibm.as400.access.DataStream.readFromStream(DataStream.java:48)
>        at com.ibm.as400.access.ClientAccessDataStream.construct(ClientAccessDataStream.java:46)
>        at com.ibm.as400.access.AS400ThreadedServer.run(AS400ThreadedServer..java:321)
>        at java.lang.Thread.run(Thread.java:619)
>
> "Timer-0" daemon prio=6 tid=0x47a6dc00 nid=0x1798 in Object.wait() [0x4819f000..0x4819fc14]
>   java.lang.Thread.State: WAITING (on object monitor)
>        at java.lang.Object.wait(Native Method)
>        - waiting on <0x084c6970> (a java.util.TaskQueue)
>        at java.lang.Object.wait(Object.java:485)
>        at java.util.TimerThread.mainLoop(Timer.java:483)
>        - locked <0x084c6970> (a java.util.TaskQueue)
>        at java.util.TimerThread.run(Timer.java:462)
>
> "Low Memory Detector" daemon prio=6 tid=0x46e7c400 nid=0x13ec runnable [0x00000000..0x00000000]
>   java.lang.Thread.State: RUNNABLE
>
> "CompilerThread0" daemon prio=10 tid=0x46e79c00 nid=0x2d8 waiting on condition [0x00000000..0x4728fa3c]
>   java.lang.Thread.State: RUNNABLE
>
> "JDWP Command Reader" daemon prio=6 tid=0x46e76400 nid=0x1018 runnable [0x00000000..0x00000000]
>   java.lang.Thread.State: RUNNABLE
>
> "JDWP Event Helper Thread" daemon prio=6 tid=0x46e6b000 nid=0x129c runnable [0x00000000..0x00000000]
>   java.lang.Thread.State: RUNNABLE
>
> "JDWP Transport Listener: dt_socket" daemon prio=6 tid=0x46e68800 nid0x10a8 runnable [0x00000000..0x4719f860]
>   java.lang.Thread.State: RUNNABLE
>
> "Attach Listener" daemon prio=10 tid=0x46e5d800 nid=0x4b0 runnable [0x00000000..0x00000000]
>   java.lang.Thread.State: RUNNABLE
>
> "Signal Dispatcher" daemon prio=10 tid=0x46e5c400 nid=0xde0 waiting on condition [0x00000000..0x00000000]
>   java.lang.Thread.State: RUNNABLE
>
> "Finalizer" daemon prio=8 tid=0x46e4c800 nid=0xefc in Object.wait() [0x46fbf000..0x46fbfc94]
>   java.lang.Thread.State: WAITING (on object monitor)
>        at java.lang.Object.wait(Native Method)
>        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
>        - locked <0x078aa8f8> (a java.lang.ref.ReferenceQueue$Lock)
>        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
>        at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)
>
> "Reference Handler" daemon prio=10 tid=0x46e48000 nid=0xbd8 in Object..wait() [0x46f6f000..0x46f6fd14]
>   java.lang.Thread.State: WAITING (on object monitor)
>        at java.lang.Object.wait(Native Method)
>        at java.lang.Object.wait(Object.java:485)
>        at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
>        - locked <0x078aa918> (a java.lang.ref.Reference$Lock)
>
> "main" prio=6 tid=0x00397400 nid=0x10e0 runnable [0x0090f000..0x0090fe50]
>   java.lang.Thread.State: RUNNABLE
>        at java.net.PlainSocketImpl.socketAccept(Native Method)
>        at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384)
>        - locked <0x093f82e8> (a java.net.SocksSocketImpl)
>        at java.net.ServerSocket.implAccept(ServerSocket.java:453)
>        at java.net.ServerSocket.accept(ServerSocket.java:421)
>        at org.apache.catalina.core.StandardServer.await(StandardServer.java:389)
>        at org.apache.catalina.startup.Catalina.await(Catalina.java:630)
>        at org.apache.catalina.startup.Catalina.start(Catalina.java:590)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>        at java.lang.reflect.Method.invoke(Method.java:597)
>        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
>        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
>
> "VM Thread" prio=10 tid=0x46e44800 nid=0x2b4 runnable
>
> "VM Periodic Task Thread" prio=10 tid=0x46e8fc00 nid=0x3fc waiting on condition
>
> JNI global references: 10760
>
> Heap
>  def new generation   total 72576K, used 17102K [0x02990000, 0x07850000, 0x07850000)
>  eden space 64512K,  26% used [0x02990000, 0x03a43a58, 0x06890000)
>  from space 8064K,   0% used [0x06890000, 0x06890000, 0x07070000)
>  to   space 8064K,   0% used [0x07070000, 0x07070000, 0x07850000)
>  tenured generation   total 967936K, used 34338K [0x07850000, 0x42990000, 0x42990000)
>   the space 967936K,   3% used [0x07850000, 0x099d8910, 0x099d8a00, 0x42990000)
>  compacting perm gen  total 55552K, used 55411K [0x42990000, 0x45fd0000, 0x46990000)
>   the space 55552K,  99% used [0x42990000, 0x45facd18, 0x45face00, 0x45fd0000)
> No shared spaces configured.
>
> +========================+
> This message is intended only for the personal and confidential use of the
> designated recipient(s) named above.  If you are not the intended recipient
> of this message you are hereby notified that any review, dissemination,
> distribution or copying of this message is strictly prohibited.  All
> information is subject to change without notice. If you have received the
> message in error, please advise the sender by reply and delete the message.
>
> Thank you.
> +========================+
>
>



-- 
Michael B Allen
PHP Active Directory SPNEGO SSO
http://www.ioplex.com/


More information about the jcifs mailing list