You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xmlrpc-dev@ws.apache.org by Lars Schnoor <La...@ifad.dk> on 2009/05/08 14:05:09 UTC

Problem with XmlRpcClient.execute()

Hi everyone
I am a new user to XML-RPC. I have developed a program that uses XML-RPC 
to communicate with another of my programs on another machine. Both 
programs are in Java and use the same XML-RPC libraries. Everything 
seems to work fine until my programs have run for a couple of minutes, 
then all of a sudden a call to *XmlRpcClient.|execute 
<ci...@ifad.dk>(java.lang.String pMethodName, 
java.lang.Object[] pParams)|* does not return and my program freezes.
All my calls are in try catch blocks, but I do not get any exceptions. 
Does anyone have any idea what might be the problem and how I can fix it?
I am using the newest version of XML-RCP from Apache, version 3.1.2.
Thanks in advance!

Lars

Re: Problem with XmlRpcClient.execute()

Posted by Lars Schnoor <La...@ifad.dk>.
Hi again
I am running Windows XP so jstack is not part of the JRE. It seems like 
it is part of the JDK for windows, but strangely I haven't been able to 
recreate the problem since.

Lars

Alan Burlison wrote:
> Lars Schnoor wrote:
>
>> Hi Alan
>> What is jstack and how do I run it?
>
> It is a Java utility that allows you to see what the JVM is doing, and 
> it comes as part of the standard install on all platforms except 
> Windows.  You should find it in your Java bin directory, e.g. 
> /usr/java/bin.
>
> You should also see if there are any deadlocks reported at the end of 
> the output.
>
> See http://java.sun.com/javase/6/docs/technotes/tools/share/jstack.html
>

Re: Problem with XmlRpcClient.execute()

Posted by Alan Burlison <Al...@sun.com>.
Jochen Wiedmann wrote:

> Funny, looks like https://issues.apache.org/jira/browse/XMLRPC-168

Yes, the symptoms looked kinda similar, which I why I asked for the 
jstack output :-)

-- 
Alan Burlison
--

Re: Problem with XmlRpcClient.execute()

Posted by Lars Schnoor <La...@ifad.dk>.
Hi
Would it be possible to get the newest version as a precompiled binary? 
I am unfortunately not familiar with SVN, only CVS.

Lars

Jochen Wiedmann wrote:
> Funny, looks like https://issues.apache.org/jira/browse/XMLRPC-168
>
> Checkout and build the latest version from SVN.
>
>
> On Sat, May 9, 2009 at 11:21 PM, Lars Schnoor <La...@ifad.dk> wrote:
>   
>> Hi Alan
>> Now I have been able to recreate the problem and can post the stack traces.
>> I have actually one client and one server on each machine, but in the
>> example below the call from the client to the server does not return.
>> *On the client side:*
>>
>> /"XML-RPC-1" prio=6 tid=0x02bf1c00 nid=0xd70 in Object.wait()
>> [0x03a7f000..0x03a7fd14]
>>  java.lang.Thread.State: WAITING (on object monitor)
>>   at java.lang.Object.wait(Native Method)
>>   at java.lang.Object.wait(Object.java:485)
>>   at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:60)
>>   - locked <0x22f506b8> (a org.apache.xmlrpc.util.ThreadPool$Poolable$1)
>>
>>  Locked ownable synchronizers:
>>   - None
>>
>> "XML-RPC-0" prio=6 tid=0x02c8a400 nid=0xb00 in Object.wait()
>> [0x036df000..0x036dfb14]
>>  java.lang.Thread.State: WAITING (on object monitor)
>>   at java.lang.Object.wait(Native Method)
>>   at java.lang.Object.wait(Object.java:485)
>>   at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:60)
>>   - locked <0x22f42870> (a org.apache.xmlrpc.util.ThreadPool$Poolable$1)
>>
>>  Locked ownable synchronizers:
>>   - None
>>
>> "XML-RPC Weblistener" prio=6 tid=0x03008800 nid=0x798 runnable
>> [0x037df000..0x037dfb94]
>>  java.lang.Thread.State: RUNNABLE
>>   at java.net.PlainSocketImpl.socketAccept(Native Method)
>>   at java.net.PlainSocketImpl.accept(Unknown Source)
>>   - locked <0x22f13ec8> (a java.net.SocksSocketImpl)
>>   at java.net.ServerSocket.implAccept(Unknown Source)
>>   at java.net.ServerSocket.accept(Unknown Source)
>>   at org.apache.xmlrpc.webserver.WebServer.run(WebServer.java:326)
>>   at java.lang.Thread.run(Unknown Source)
>>
>>  Locked ownable synchronizers:
>>   - None/
>>
>> *On the server side:*
>>
>> /"XML-RPC-2" prio=6 tid=0x030e9400 nid=0xe64 waiting for monitor entry
>> [0x035af000..0x035afa94]
>>  java.lang.Thread.State: BLOCKED (on object monitor)
>>   at org.apache.xmlrpc.util.ThreadPool$Poolable.getTask(ThreadPool.java:99)
>>   - waiting to lock <0x09293ac0> (a
>> org.apache.xmlrpc.util.ThreadPool$Poolable)
>>   at
>> org.apache.xmlrpc.util.ThreadPool$Poolable.access$100(ThreadPool.java:47)
>>   at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:59)
>>   - locked <0x09293a50> (a org.apache.xmlrpc.util.ThreadPool$Poolable$1)
>>
>>  Locked ownable synchronizers:
>>   - None
>>
>> "XML-RPC-1" prio=6 tid=0x02d2f000 nid=0x26c in Object.wait()
>> [0x03baf000..0x03bafb14]
>>  java.lang.Thread.State: WAITING (on object monitor)
>>   at java.lang.Object.wait(Native Method)
>>   - waiting on <0x0928f800> (a org.apache.xmlrpc.util.ThreadPool$Poolable$1)
>>   at java.lang.Object.wait(Object.java:485)
>>   at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:60)
>>   - locked <0x0928f800> (a org.apache.xmlrpc.util.ThreadPool$Poolable$1)
>>
>>  Locked ownable synchronizers:
>>   - None
>>
>> "XML-RPC-0" prio=6 tid=0x02d3c800 nid=0x3d0 in Object.wait()
>> [0x03b5f000..0x03b5fb94]
>>  java.lang.Thread.State: WAITING (on object monitor)
>>   at java.lang.Object.wait(Native Method)
>>   - waiting on <0x0928e1e0> (a org.apache.xmlrpc.util.ThreadPool$Poolable$1)
>>   at java.lang.Object.wait(Object.java:485)
>>   at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:60)
>>   - locked <0x0928e1e0> (a org.apache.xmlrpc.util.ThreadPool$Poolable$1)
>>
>>  Locked ownable synchronizers:
>>   - None
>>
>> "XML-RPC Weblistener" prio=6 tid=0x0309b400 nid=0x584 waiting for monitor
>> entry [0x0340f000..0x0340fb94]
>>  java.lang.Thread.State: BLOCKED (on object monitor)
>>   at org.apache.xmlrpc.util.ThreadPool$Poolable.start(ThreadPool.java:107)
>>   - waiting to lock <0x09293a50> (a
>> org.apache.xmlrpc.util.ThreadPool$Poolable$1)
>>   - locked <0x09293ac0> (a org.apache.xmlrpc.util.ThreadPool$Poolable)
>>   at org.apache.xmlrpc.util.ThreadPool.startTask(ThreadPool.java:168)
>>   - locked <0x091a3c60> (a org.apache.xmlrpc.util.ThreadPool)
>>   at org.apache.xmlrpc.webserver.WebServer.run(WebServer.java:338)
>>   at java.lang.Thread.run(Unknown Source)
>>
>>  Locked ownable synchronizers:
>>   - None
>>
>>
>> Found one Java-level deadlock:
>> =============================
>> "XML-RPC-2":
>>  waiting to lock monitor 0x030fd5bc (object 0x09293ac0, a
>> org.apache.xmlrpc.util.ThreadPool$Poolable),
>>  which is held by "XML-RPC Weblistener"
>> "XML-RPC Weblistener":
>>  waiting to lock monitor 0x030a6134 (object 0x09293a50, a
>> org.apache.xmlrpc.util.ThreadPool$Poolable$1),
>>  which is held by "XML-RPC-2"
>>
>> Java stack information for the threads listed above:
>> ===================================================
>> "XML-RPC-2":
>>   at org.apache.xmlrpc.util.ThreadPool$Poolable.getTask(ThreadPool.java:99)
>>   - waiting to lock <0x09293ac0> (a
>> org.apache.xmlrpc.util.ThreadPool$Poolable)
>>   at
>> org.apache.xmlrpc.util.ThreadPool$Poolable.access$100(ThreadPool.java:47)
>>   at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:59)
>>   - locked <0x09293a50> (a org.apache.xmlrpc.util.ThreadPool$Poolable$1)
>> "XML-RPC Weblistener":
>>   at org.apache.xmlrpc.util.ThreadPool$Poolable.start(ThreadPool.java:107)
>>   - waiting to lock <0x09293a50> (a
>> org.apache.xmlrpc.util.ThreadPool$Poolable$1)
>>   - locked <0x09293ac0> (a org.apache.xmlrpc.util.ThreadPool$Poolable)
>>   at org.apache.xmlrpc.util.ThreadPool.startTask(ThreadPool.java:168)
>>   - locked <0x091a3c60> (a org.apache.xmlrpc.util.ThreadPool)
>>   at org.apache.xmlrpc.webserver.WebServer.run(WebServer.java:338)
>>   at java.lang.Thread.run(Unknown Source)
>>
>> Found 1 deadlock./
>>
>> Lars
>>
>> Alan Burlison wrote:
>>     
>>> Lars Schnoor wrote:
>>>
>>>       
>>>> Hi Alan
>>>> What is jstack and how do I run it?
>>>>         
>>> It is a Java utility that allows you to see what the JVM is doing, and it
>>> comes as part of the standard install on all platforms except Windows.  You
>>> should find it in your Java bin directory, e.g. /usr/java/bin.
>>>
>>> You should also see if there are any deadlocks reported at the end of the
>>> output.
>>>
>>> See http://java.sun.com/javase/6/docs/technotes/tools/share/jstack.html
>>>
>>>       
>
>
>
>   

Re: Problem with XmlRpcClient.execute()

Posted by Lars Schnoor <La...@ifad.dk>.
Thank you Jochen, I am still testing if version 3.1.3 fixes my problem.

Jochen Wiedmann wrote:
> On Sun, May 10, 2009 at 1:51 PM, Lars Schnoor <La...@ifad.dk> wrote:
>
>   
>> Now I checked the newest source out, but how do I build it? I found some
>> eclipse files, but my NetBeans 6.5 does not want to import them as a Eclipse
>> project. Is there maybe some documentation to explain how to get the
>> jar-files generated?
>>     
>
> Lars, I have uploaded a snapshot to
>
>   https://repository.apache.org/content/repositories/snapshots/org/apache/xmlrpc
>
> Jochen
>
>
>   

Re: Problem with XmlRpcClient.execute()

Posted by Jochen Wiedmann <jo...@gmail.com>.
On Sun, May 10, 2009 at 1:51 PM, Lars Schnoor <La...@ifad.dk> wrote:

> Now I checked the newest source out, but how do I build it? I found some
> eclipse files, but my NetBeans 6.5 does not want to import them as a Eclipse
> project. Is there maybe some documentation to explain how to get the
> jar-files generated?

Lars, I have uploaded a snapshot to

  https://repository.apache.org/content/repositories/snapshots/org/apache/xmlrpc

Jochen


-- 
Don't trust a government that doesn't trust you.

Re: Problem with XmlRpcClient.execute()

Posted by Alan Burlison <Al...@sun.com>.
Lars Schnoor wrote:

> Now I checked the newest source out, but how do I build it? I found some 
> eclipse files, but my NetBeans 6.5 does not want to import them as a 
> Eclipse project. Is there maybe some documentation to explain how to get 
> the jar-files generated?

You can either set up new NetBeans projects using the 'New project with 
existing sources' option, or simpler still install the Maven plugin for 
NetBeans, then it will recognise the XML-RPC projects.  The only problem 
with maven is I haven't found any way of telling it how to do debug 
builds, but if you don't care about that the Maven NB plugin is the 
easiest way to build the XML-RPC source.

-- 
Alan Burlison
--

Re: Problem with XmlRpcClient.execute()

Posted by Lars Schnoor <La...@ifad.dk>.
Now I checked the newest source out, but how do I build it? I found some 
eclipse files, but my NetBeans 6.5 does not want to import them as a 
Eclipse project. Is there maybe some documentation to explain how to get 
the jar-files generated?


Jochen Wiedmann wrote:
> Funny, looks like https://issues.apache.org/jira/browse/XMLRPC-168
>
> Checkout and build the latest version from SVN.
>
>
> On Sat, May 9, 2009 at 11:21 PM, Lars Schnoor <La...@ifad.dk> wrote:
>   
>> Hi Alan
>> Now I have been able to recreate the problem and can post the stack traces.
>> I have actually one client and one server on each machine, but in the
>> example below the call from the client to the server does not return.
>> *On the client side:*
>>
>> /"XML-RPC-1" prio=6 tid=0x02bf1c00 nid=0xd70 in Object.wait()
>> [0x03a7f000..0x03a7fd14]
>>  java.lang.Thread.State: WAITING (on object monitor)
>>   at java.lang.Object.wait(Native Method)
>>   at java.lang.Object.wait(Object.java:485)
>>   at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:60)
>>   - locked <0x22f506b8> (a org.apache.xmlrpc.util.ThreadPool$Poolable$1)
>>
>>  Locked ownable synchronizers:
>>   - None
>>
>> "XML-RPC-0" prio=6 tid=0x02c8a400 nid=0xb00 in Object.wait()
>> [0x036df000..0x036dfb14]
>>  java.lang.Thread.State: WAITING (on object monitor)
>>   at java.lang.Object.wait(Native Method)
>>   at java.lang.Object.wait(Object.java:485)
>>   at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:60)
>>   - locked <0x22f42870> (a org.apache.xmlrpc.util.ThreadPool$Poolable$1)
>>
>>  Locked ownable synchronizers:
>>   - None
>>
>> "XML-RPC Weblistener" prio=6 tid=0x03008800 nid=0x798 runnable
>> [0x037df000..0x037dfb94]
>>  java.lang.Thread.State: RUNNABLE
>>   at java.net.PlainSocketImpl.socketAccept(Native Method)
>>   at java.net.PlainSocketImpl.accept(Unknown Source)
>>   - locked <0x22f13ec8> (a java.net.SocksSocketImpl)
>>   at java.net.ServerSocket.implAccept(Unknown Source)
>>   at java.net.ServerSocket.accept(Unknown Source)
>>   at org.apache.xmlrpc.webserver.WebServer.run(WebServer.java:326)
>>   at java.lang.Thread.run(Unknown Source)
>>
>>  Locked ownable synchronizers:
>>   - None/
>>
>> *On the server side:*
>>
>> /"XML-RPC-2" prio=6 tid=0x030e9400 nid=0xe64 waiting for monitor entry
>> [0x035af000..0x035afa94]
>>  java.lang.Thread.State: BLOCKED (on object monitor)
>>   at org.apache.xmlrpc.util.ThreadPool$Poolable.getTask(ThreadPool.java:99)
>>   - waiting to lock <0x09293ac0> (a
>> org.apache.xmlrpc.util.ThreadPool$Poolable)
>>   at
>> org.apache.xmlrpc.util.ThreadPool$Poolable.access$100(ThreadPool.java:47)
>>   at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:59)
>>   - locked <0x09293a50> (a org.apache.xmlrpc.util.ThreadPool$Poolable$1)
>>
>>  Locked ownable synchronizers:
>>   - None
>>
>> "XML-RPC-1" prio=6 tid=0x02d2f000 nid=0x26c in Object.wait()
>> [0x03baf000..0x03bafb14]
>>  java.lang.Thread.State: WAITING (on object monitor)
>>   at java.lang.Object.wait(Native Method)
>>   - waiting on <0x0928f800> (a org.apache.xmlrpc.util.ThreadPool$Poolable$1)
>>   at java.lang.Object.wait(Object.java:485)
>>   at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:60)
>>   - locked <0x0928f800> (a org.apache.xmlrpc.util.ThreadPool$Poolable$1)
>>
>>  Locked ownable synchronizers:
>>   - None
>>
>> "XML-RPC-0" prio=6 tid=0x02d3c800 nid=0x3d0 in Object.wait()
>> [0x03b5f000..0x03b5fb94]
>>  java.lang.Thread.State: WAITING (on object monitor)
>>   at java.lang.Object.wait(Native Method)
>>   - waiting on <0x0928e1e0> (a org.apache.xmlrpc.util.ThreadPool$Poolable$1)
>>   at java.lang.Object.wait(Object.java:485)
>>   at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:60)
>>   - locked <0x0928e1e0> (a org.apache.xmlrpc.util.ThreadPool$Poolable$1)
>>
>>  Locked ownable synchronizers:
>>   - None
>>
>> "XML-RPC Weblistener" prio=6 tid=0x0309b400 nid=0x584 waiting for monitor
>> entry [0x0340f000..0x0340fb94]
>>  java.lang.Thread.State: BLOCKED (on object monitor)
>>   at org.apache.xmlrpc.util.ThreadPool$Poolable.start(ThreadPool.java:107)
>>   - waiting to lock <0x09293a50> (a
>> org.apache.xmlrpc.util.ThreadPool$Poolable$1)
>>   - locked <0x09293ac0> (a org.apache.xmlrpc.util.ThreadPool$Poolable)
>>   at org.apache.xmlrpc.util.ThreadPool.startTask(ThreadPool.java:168)
>>   - locked <0x091a3c60> (a org.apache.xmlrpc.util.ThreadPool)
>>   at org.apache.xmlrpc.webserver.WebServer.run(WebServer.java:338)
>>   at java.lang.Thread.run(Unknown Source)
>>
>>  Locked ownable synchronizers:
>>   - None
>>
>>
>> Found one Java-level deadlock:
>> =============================
>> "XML-RPC-2":
>>  waiting to lock monitor 0x030fd5bc (object 0x09293ac0, a
>> org.apache.xmlrpc.util.ThreadPool$Poolable),
>>  which is held by "XML-RPC Weblistener"
>> "XML-RPC Weblistener":
>>  waiting to lock monitor 0x030a6134 (object 0x09293a50, a
>> org.apache.xmlrpc.util.ThreadPool$Poolable$1),
>>  which is held by "XML-RPC-2"
>>
>> Java stack information for the threads listed above:
>> ===================================================
>> "XML-RPC-2":
>>   at org.apache.xmlrpc.util.ThreadPool$Poolable.getTask(ThreadPool.java:99)
>>   - waiting to lock <0x09293ac0> (a
>> org.apache.xmlrpc.util.ThreadPool$Poolable)
>>   at
>> org.apache.xmlrpc.util.ThreadPool$Poolable.access$100(ThreadPool.java:47)
>>   at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:59)
>>   - locked <0x09293a50> (a org.apache.xmlrpc.util.ThreadPool$Poolable$1)
>> "XML-RPC Weblistener":
>>   at org.apache.xmlrpc.util.ThreadPool$Poolable.start(ThreadPool.java:107)
>>   - waiting to lock <0x09293a50> (a
>> org.apache.xmlrpc.util.ThreadPool$Poolable$1)
>>   - locked <0x09293ac0> (a org.apache.xmlrpc.util.ThreadPool$Poolable)
>>   at org.apache.xmlrpc.util.ThreadPool.startTask(ThreadPool.java:168)
>>   - locked <0x091a3c60> (a org.apache.xmlrpc.util.ThreadPool)
>>   at org.apache.xmlrpc.webserver.WebServer.run(WebServer.java:338)
>>   at java.lang.Thread.run(Unknown Source)
>>
>> Found 1 deadlock./
>>
>> Lars
>>
>> Alan Burlison wrote:
>>     
>>> Lars Schnoor wrote:
>>>
>>>       
>>>> Hi Alan
>>>> What is jstack and how do I run it?
>>>>         
>>> It is a Java utility that allows you to see what the JVM is doing, and it
>>> comes as part of the standard install on all platforms except Windows.  You
>>> should find it in your Java bin directory, e.g. /usr/java/bin.
>>>
>>> You should also see if there are any deadlocks reported at the end of the
>>> output.
>>>
>>> See http://java.sun.com/javase/6/docs/technotes/tools/share/jstack.html
>>>
>>>       
>
>
>
>   

Re: Problem with XmlRpcClient.execute()

Posted by Jochen Wiedmann <jo...@gmail.com>.
Funny, looks like https://issues.apache.org/jira/browse/XMLRPC-168

Checkout and build the latest version from SVN.


On Sat, May 9, 2009 at 11:21 PM, Lars Schnoor <La...@ifad.dk> wrote:
> Hi Alan
> Now I have been able to recreate the problem and can post the stack traces.
> I have actually one client and one server on each machine, but in the
> example below the call from the client to the server does not return.
> *On the client side:*
>
> /"XML-RPC-1" prio=6 tid=0x02bf1c00 nid=0xd70 in Object.wait()
> [0x03a7f000..0x03a7fd14]
>  java.lang.Thread.State: WAITING (on object monitor)
>   at java.lang.Object.wait(Native Method)
>   at java.lang.Object.wait(Object.java:485)
>   at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:60)
>   - locked <0x22f506b8> (a org.apache.xmlrpc.util.ThreadPool$Poolable$1)
>
>  Locked ownable synchronizers:
>   - None
>
> "XML-RPC-0" prio=6 tid=0x02c8a400 nid=0xb00 in Object.wait()
> [0x036df000..0x036dfb14]
>  java.lang.Thread.State: WAITING (on object monitor)
>   at java.lang.Object.wait(Native Method)
>   at java.lang.Object.wait(Object.java:485)
>   at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:60)
>   - locked <0x22f42870> (a org.apache.xmlrpc.util.ThreadPool$Poolable$1)
>
>  Locked ownable synchronizers:
>   - None
>
> "XML-RPC Weblistener" prio=6 tid=0x03008800 nid=0x798 runnable
> [0x037df000..0x037dfb94]
>  java.lang.Thread.State: RUNNABLE
>   at java.net.PlainSocketImpl.socketAccept(Native Method)
>   at java.net.PlainSocketImpl.accept(Unknown Source)
>   - locked <0x22f13ec8> (a java.net.SocksSocketImpl)
>   at java.net.ServerSocket.implAccept(Unknown Source)
>   at java.net.ServerSocket.accept(Unknown Source)
>   at org.apache.xmlrpc.webserver.WebServer.run(WebServer.java:326)
>   at java.lang.Thread.run(Unknown Source)
>
>  Locked ownable synchronizers:
>   - None/
>
> *On the server side:*
>
> /"XML-RPC-2" prio=6 tid=0x030e9400 nid=0xe64 waiting for monitor entry
> [0x035af000..0x035afa94]
>  java.lang.Thread.State: BLOCKED (on object monitor)
>   at org.apache.xmlrpc.util.ThreadPool$Poolable.getTask(ThreadPool.java:99)
>   - waiting to lock <0x09293ac0> (a
> org.apache.xmlrpc.util.ThreadPool$Poolable)
>   at
> org.apache.xmlrpc.util.ThreadPool$Poolable.access$100(ThreadPool.java:47)
>   at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:59)
>   - locked <0x09293a50> (a org.apache.xmlrpc.util.ThreadPool$Poolable$1)
>
>  Locked ownable synchronizers:
>   - None
>
> "XML-RPC-1" prio=6 tid=0x02d2f000 nid=0x26c in Object.wait()
> [0x03baf000..0x03bafb14]
>  java.lang.Thread.State: WAITING (on object monitor)
>   at java.lang.Object.wait(Native Method)
>   - waiting on <0x0928f800> (a org.apache.xmlrpc.util.ThreadPool$Poolable$1)
>   at java.lang.Object.wait(Object.java:485)
>   at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:60)
>   - locked <0x0928f800> (a org.apache.xmlrpc.util.ThreadPool$Poolable$1)
>
>  Locked ownable synchronizers:
>   - None
>
> "XML-RPC-0" prio=6 tid=0x02d3c800 nid=0x3d0 in Object.wait()
> [0x03b5f000..0x03b5fb94]
>  java.lang.Thread.State: WAITING (on object monitor)
>   at java.lang.Object.wait(Native Method)
>   - waiting on <0x0928e1e0> (a org.apache.xmlrpc.util.ThreadPool$Poolable$1)
>   at java.lang.Object.wait(Object.java:485)
>   at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:60)
>   - locked <0x0928e1e0> (a org.apache.xmlrpc.util.ThreadPool$Poolable$1)
>
>  Locked ownable synchronizers:
>   - None
>
> "XML-RPC Weblistener" prio=6 tid=0x0309b400 nid=0x584 waiting for monitor
> entry [0x0340f000..0x0340fb94]
>  java.lang.Thread.State: BLOCKED (on object monitor)
>   at org.apache.xmlrpc.util.ThreadPool$Poolable.start(ThreadPool.java:107)
>   - waiting to lock <0x09293a50> (a
> org.apache.xmlrpc.util.ThreadPool$Poolable$1)
>   - locked <0x09293ac0> (a org.apache.xmlrpc.util.ThreadPool$Poolable)
>   at org.apache.xmlrpc.util.ThreadPool.startTask(ThreadPool.java:168)
>   - locked <0x091a3c60> (a org.apache.xmlrpc.util.ThreadPool)
>   at org.apache.xmlrpc.webserver.WebServer.run(WebServer.java:338)
>   at java.lang.Thread.run(Unknown Source)
>
>  Locked ownable synchronizers:
>   - None
>
>
> Found one Java-level deadlock:
> =============================
> "XML-RPC-2":
>  waiting to lock monitor 0x030fd5bc (object 0x09293ac0, a
> org.apache.xmlrpc.util.ThreadPool$Poolable),
>  which is held by "XML-RPC Weblistener"
> "XML-RPC Weblistener":
>  waiting to lock monitor 0x030a6134 (object 0x09293a50, a
> org.apache.xmlrpc.util.ThreadPool$Poolable$1),
>  which is held by "XML-RPC-2"
>
> Java stack information for the threads listed above:
> ===================================================
> "XML-RPC-2":
>   at org.apache.xmlrpc.util.ThreadPool$Poolable.getTask(ThreadPool.java:99)
>   - waiting to lock <0x09293ac0> (a
> org.apache.xmlrpc.util.ThreadPool$Poolable)
>   at
> org.apache.xmlrpc.util.ThreadPool$Poolable.access$100(ThreadPool.java:47)
>   at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:59)
>   - locked <0x09293a50> (a org.apache.xmlrpc.util.ThreadPool$Poolable$1)
> "XML-RPC Weblistener":
>   at org.apache.xmlrpc.util.ThreadPool$Poolable.start(ThreadPool.java:107)
>   - waiting to lock <0x09293a50> (a
> org.apache.xmlrpc.util.ThreadPool$Poolable$1)
>   - locked <0x09293ac0> (a org.apache.xmlrpc.util.ThreadPool$Poolable)
>   at org.apache.xmlrpc.util.ThreadPool.startTask(ThreadPool.java:168)
>   - locked <0x091a3c60> (a org.apache.xmlrpc.util.ThreadPool)
>   at org.apache.xmlrpc.webserver.WebServer.run(WebServer.java:338)
>   at java.lang.Thread.run(Unknown Source)
>
> Found 1 deadlock./
>
> Lars
>
> Alan Burlison wrote:
>>
>> Lars Schnoor wrote:
>>
>>> Hi Alan
>>> What is jstack and how do I run it?
>>
>> It is a Java utility that allows you to see what the JVM is doing, and it
>> comes as part of the standard install on all platforms except Windows.  You
>> should find it in your Java bin directory, e.g. /usr/java/bin.
>>
>> You should also see if there are any deadlocks reported at the end of the
>> output.
>>
>> See http://java.sun.com/javase/6/docs/technotes/tools/share/jstack.html
>>
>



-- 
Don't trust a government that doesn't trust you.

Re: Problem with XmlRpcClient.execute()

Posted by Lars Schnoor <La...@ifad.dk>.
Hi Alan
Now I have been able to recreate the problem and can post the stack 
traces. I have actually one client and one server on each machine, but 
in the example below the call from the client to the server does not return.
*On the client side:*

/"XML-RPC-1" prio=6 tid=0x02bf1c00 nid=0xd70 in Object.wait() 
[0x03a7f000..0x03a7fd14]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    at java.lang.Object.wait(Object.java:485)
    at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:60)
    - locked <0x22f506b8> (a org.apache.xmlrpc.util.ThreadPool$Poolable$1)

   Locked ownable synchronizers:
    - None

"XML-RPC-0" prio=6 tid=0x02c8a400 nid=0xb00 in Object.wait() 
[0x036df000..0x036dfb14]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    at java.lang.Object.wait(Object.java:485)
    at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:60)
    - locked <0x22f42870> (a org.apache.xmlrpc.util.ThreadPool$Poolable$1)

   Locked ownable synchronizers:
    - None

"XML-RPC Weblistener" prio=6 tid=0x03008800 nid=0x798 runnable 
[0x037df000..0x037dfb94]
   java.lang.Thread.State: RUNNABLE
    at java.net.PlainSocketImpl.socketAccept(Native Method)
    at java.net.PlainSocketImpl.accept(Unknown Source)
    - locked <0x22f13ec8> (a java.net.SocksSocketImpl)
    at java.net.ServerSocket.implAccept(Unknown Source)
    at java.net.ServerSocket.accept(Unknown Source)
    at org.apache.xmlrpc.webserver.WebServer.run(WebServer.java:326)
    at java.lang.Thread.run(Unknown Source)

   Locked ownable synchronizers:
    - None/

*On the server side:*

/"XML-RPC-2" prio=6 tid=0x030e9400 nid=0xe64 waiting for monitor entry 
[0x035af000..0x035afa94]
   java.lang.Thread.State: BLOCKED (on object monitor)
    at 
org.apache.xmlrpc.util.ThreadPool$Poolable.getTask(ThreadPool.java:99)
    - waiting to lock <0x09293ac0> (a 
org.apache.xmlrpc.util.ThreadPool$Poolable)
    at 
org.apache.xmlrpc.util.ThreadPool$Poolable.access$100(ThreadPool.java:47)
    at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:59)
    - locked <0x09293a50> (a org.apache.xmlrpc.util.ThreadPool$Poolable$1)

   Locked ownable synchronizers:
    - None

"XML-RPC-1" prio=6 tid=0x02d2f000 nid=0x26c in Object.wait() 
[0x03baf000..0x03bafb14]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x0928f800> (a 
org.apache.xmlrpc.util.ThreadPool$Poolable$1)
    at java.lang.Object.wait(Object.java:485)
    at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:60)
    - locked <0x0928f800> (a org.apache.xmlrpc.util.ThreadPool$Poolable$1)

   Locked ownable synchronizers:
    - None

"XML-RPC-0" prio=6 tid=0x02d3c800 nid=0x3d0 in Object.wait() 
[0x03b5f000..0x03b5fb94]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x0928e1e0> (a 
org.apache.xmlrpc.util.ThreadPool$Poolable$1)
    at java.lang.Object.wait(Object.java:485)
    at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:60)
    - locked <0x0928e1e0> (a org.apache.xmlrpc.util.ThreadPool$Poolable$1)

   Locked ownable synchronizers:
    - None

"XML-RPC Weblistener" prio=6 tid=0x0309b400 nid=0x584 waiting for 
monitor entry [0x0340f000..0x0340fb94]
   java.lang.Thread.State: BLOCKED (on object monitor)
    at org.apache.xmlrpc.util.ThreadPool$Poolable.start(ThreadPool.java:107)
    - waiting to lock <0x09293a50> (a 
org.apache.xmlrpc.util.ThreadPool$Poolable$1)
    - locked <0x09293ac0> (a org.apache.xmlrpc.util.ThreadPool$Poolable)
    at org.apache.xmlrpc.util.ThreadPool.startTask(ThreadPool.java:168)
    - locked <0x091a3c60> (a org.apache.xmlrpc.util.ThreadPool)
    at org.apache.xmlrpc.webserver.WebServer.run(WebServer.java:338)
    at java.lang.Thread.run(Unknown Source)

   Locked ownable synchronizers:
    - None


Found one Java-level deadlock:
=============================
"XML-RPC-2":
  waiting to lock monitor 0x030fd5bc (object 0x09293ac0, a 
org.apache.xmlrpc.util.ThreadPool$Poolable),
  which is held by "XML-RPC Weblistener"
"XML-RPC Weblistener":
  waiting to lock monitor 0x030a6134 (object 0x09293a50, a 
org.apache.xmlrpc.util.ThreadPool$Poolable$1),
  which is held by "XML-RPC-2"

Java stack information for the threads listed above:
===================================================
"XML-RPC-2":
    at 
org.apache.xmlrpc.util.ThreadPool$Poolable.getTask(ThreadPool.java:99)
    - waiting to lock <0x09293ac0> (a 
org.apache.xmlrpc.util.ThreadPool$Poolable)
    at 
org.apache.xmlrpc.util.ThreadPool$Poolable.access$100(ThreadPool.java:47)
    at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:59)
    - locked <0x09293a50> (a org.apache.xmlrpc.util.ThreadPool$Poolable$1)
"XML-RPC Weblistener":
    at org.apache.xmlrpc.util.ThreadPool$Poolable.start(ThreadPool.java:107)
    - waiting to lock <0x09293a50> (a 
org.apache.xmlrpc.util.ThreadPool$Poolable$1)
    - locked <0x09293ac0> (a org.apache.xmlrpc.util.ThreadPool$Poolable)
    at org.apache.xmlrpc.util.ThreadPool.startTask(ThreadPool.java:168)
    - locked <0x091a3c60> (a org.apache.xmlrpc.util.ThreadPool)
    at org.apache.xmlrpc.webserver.WebServer.run(WebServer.java:338)
    at java.lang.Thread.run(Unknown Source)

Found 1 deadlock./

Lars

Alan Burlison wrote:
> Lars Schnoor wrote:
>
>> Hi Alan
>> What is jstack and how do I run it?
>
> It is a Java utility that allows you to see what the JVM is doing, and 
> it comes as part of the standard install on all platforms except 
> Windows.  You should find it in your Java bin directory, e.g. 
> /usr/java/bin.
>
> You should also see if there are any deadlocks reported at the end of 
> the output.
>
> See http://java.sun.com/javase/6/docs/technotes/tools/share/jstack.html
>

Re: Problem with XmlRpcClient.execute()

Posted by Alan Burlison <Al...@sun.com>.
Lars Schnoor wrote:

> Hi Alan
> What is jstack and how do I run it?

It is a Java utility that allows you to see what the JVM is doing, and 
it comes as part of the standard install on all platforms except 
Windows.  You should find it in your Java bin directory, e.g. /usr/java/bin.

You should also see if there are any deadlocks reported at the end of 
the output.

See http://java.sun.com/javase/6/docs/technotes/tools/share/jstack.html

-- 
Alan Burlison
--

Re: Problem with XmlRpcClient.execute()

Posted by Lars Schnoor <La...@ifad.dk>.
Hi Alan
What is jstack and how do I run it?

Lars

Alan Burlison wrote:
> Lars Schnoor wrote:
>
>> Hi everyone
>> I am a new user to XML-RPC. I have developed a program that uses 
>> XML-RPC to communicate with another of my programs on another 
>> machine. Both programs are in Java and use the same XML-RPC 
>> libraries. Everything seems to work fine until my programs have run 
>> for a couple of minutes, then all of a sudden a call to 
>> *XmlRpcClient.|execute 
>> <ci...@ifad.dk>(java.lang.String pMethodName, 
>> java.lang.Object[] pParams)|* does not return and my program freezes.
>> All my calls are in try catch blocks, but I do not get any 
>> exceptions. Does anyone have any idea what might be the problem and 
>> how I can fix it?
>> I am using the newest version of XML-RCP from Apache, version 3.1.2.
>> Thanks in advance!
>
> Can you run 'jstack' on each of the Java processes and send us the 
> stack traces for the XML-RPC threads?
>
> Thanks,
>

Re: Problem with XmlRpcClient.execute()

Posted by Alan Burlison <Al...@sun.com>.
Lars Schnoor wrote:

> Hi everyone
> I am a new user to XML-RPC. I have developed a program that uses XML-RPC to 
> communicate with another of my programs on another machine. Both programs are in 
> Java and use the same XML-RPC libraries. Everything seems to work fine until my 
> programs have run for a couple of minutes, then all of a sudden a call to 
> *XmlRpcClient.|execute 
> <ci...@ifad.dk>(java.lang.String pMethodName, 
> java.lang.Object[] pParams)|* does not return and my program freezes.
> All my calls are in try catch blocks, but I do not get any exceptions. Does 
> anyone have any idea what might be the problem and how I can fix it?
> I am using the newest version of XML-RCP from Apache, version 3.1.2.
> Thanks in advance!

Can you run 'jstack' on each of the Java processes and send us the stack 
traces for the XML-RPC threads?

Thanks,

-- 
Alan Burlison
--