ObjectWeb Consortium
Search ObjectWeb Mail Archive: 

Advanced Search - Powered by Google


Mail Archive Home | proactive List | May 2005 Index

<--  Date Index  --> <--  Thread Index  -->

Re: FW: [Fwd: Re: [Fwd: Re: [Fwd: [proactive] P2P question]]]



--- Begin Message ---
Hi Romain,
 I changed several methods in a few classes to void type in an attempt to
solve the deadlock problem. However, now I run into a weird problem which
freezes the AOs of NormalPeers. I traced it to almost one particular line
and but couldn't figure out why it freezes there. In NormalPeer, from line
890 to 893, when I try to print out the resourceID through
currEntry.getDownloadResource().getID(), it works fine; next when I try to
print out information about the hostPeer which holds the resource (i.e.,
System.out.println("downloading peer is: " + p1)), p1 seems to be there
(i.e., not NULL), but when I use (System.out.println("downloading peer id
is: " + p1.getPeerID()) to print out the peerID of the peer, it just freezes
there. It does not appear to be a deadlock situation to me.
 I have attached the modified code to the email.

Thanks,

Lee 

-----Original Message-----
From: Romain Quilici [mailto:Romain.Quilici@xxxxxxxxxxxxxxx] 
Sent: Tuesday, 24 May 2005 8:51 PM
To: Lee Rong; Proactive
Subject: Re: FW: [Fwd: Re: [Fwd: Re: [Fwd: [proactive] P2P question]]]

Hi Lee,
First about the trace I get when doing Ctrl Alt \ while the application 
is hanging up. I don't attach the whole trace just interesting pieces:
"main" prio=1 tid=0x0805b640 nid=0x7501 in Object.wait() 
[bfffc000..bfffd168]
        at java.lang.Object.wait(Native Method)
        at 
org.objectweb.proactive.core.body.future.FutureProxy.waitFor(FutureProxy.jav
a:369)
        - locked <0x452512c8> (a 
org.objectweb.proactive.core.body.future.FutureProxy)
        at 
org.objectweb.proactive.core.body.future.FutureProxy.waitFor(FutureProxy.jav
a:328)
        - locked <0x452512c8> (a 
org.objectweb.proactive.core.body.future.FutureProxy)
        at 
org.objectweb.proactive.core.body.future.FutureProxy.getRaisedException(Futu
reProxy.java:245)
        - locked <0x452512c8> (a 
org.objectweb.proactive.core.body.future.FutureProxy)
        at 
org.objectweb.proactive.core.body.proxy.AbstractBodyProxy.reifyAsSynchronous
(AbstractBodyProxy.java:314)
        at 
org.objectweb.proactive.core.body.proxy.AbstractBodyProxy.reify(AbstractBody
Proxy.java:130)
        at 
pa.stub.pr.p_media.p2p.simulation.Stub_NormalPeer.sendResourceRequestToSuper
PeerTraditional(<generated>)
        - locked <0x45250ea0> (a 
pa.stub.pr.p_media.p2p.simulation.Stub_NormalPeer)
        at 
pr.p_media.p2p.simulation.P2PSimulator.startSimulation(P2PSimulator.java:346
)
        at pr.p_media.p2p.simulation.P2PSimulator.main(P2PSimulator.java:63)

As expected the main is waiting on sendResourceRequestToSuperPeerTraditional

NormalPeer on //sea.inria.fr/Dispatcher-632083611" daemon prio=1 
tid=0x605afc28 nid=0x784e in Object.wait() [65ba9000..65ba9cd8]
        at java.lang.Object.wait(Native Method)
        at 
org.objectweb.proactive.core.body.future.FutureProxy.waitFor(FutureProxy.jav
a:369)
        - locked <0x45170c30> (a 
org.objectweb.proactive.core.body.future.FutureProxy)
        at 
org.objectweb.proactive.core.body.future.FutureProxy.waitFor(FutureProxy.jav
a:328)
        - locked <0x45170c30> (a 
org.objectweb.proactive.core.body.future.FutureProxy)
        at 
org.objectweb.proactive.core.body.future.FutureProxy.getRaisedException(Futu
reProxy.java:245)
        - locked <0x45170c30> (a 
org.objectweb.proactive.core.body.future.FutureProxy)
        at 
org.objectweb.proactive.core.body.proxy.AbstractBodyProxy.reifyAsSynchronous
(AbstractBodyProxy.java:314)
        at 
org.objectweb.proactive.core.body.proxy.AbstractBodyProxy.reify(AbstractBody
Proxy.java:130)
        at 
pa.stub.pr.p_media.p2p.simulation.Stub_NormalPeer.getPeerID(<generated>)
        at sun.reflect.GeneratedMethodAccessor32.invoke(Unknown Source)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at 
org.objectweb.proactive.core.mop.MethodCall.execute(MethodCall.java:384)
        at 
org.objectweb.proactive.core.body.future.FutureProxy.reify(FutureProxy.java:
448)
        at 
pa.stub.pr.p_media.p2p.simulation.Stub_NormalPeer.getPeerID(<generated>)
        at pr.p_media.p2p.simulation.NormalPeer.start(NormalPeer.java:798)
        at sun.reflect.GeneratedMethodAccessor50.invoke(Unknown Source)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at 
org.objectweb.proactive.core.mop.MethodCall.execute(MethodCall.java:384)
        at 
org.objectweb.proactive.core.body.request.RequestImpl.serveInternal(RequestI
mpl.java:175)
        at 
org.objectweb.proactive.core.body.request.RequestImpl.serve(RequestImpl.java
:109)
        at 
org.objectweb.proactive.core.body.BodyImpl$ActiveLocalBodyStrategy.serve(Bod
yImpl.java:335)
        at 
org.objectweb.proactive.core.body.AbstractBody.serve(AbstractBody.java:846)
        at 
org.objectweb.proactive.core.body.ActiveBody$FIFORunActive.runActivity(Activ
eBody.java:241)
        at 
org.objectweb.proactive.core.body.ActiveBody.run(ActiveBody.java:145)
        at java.lang.Thread.run(Thread.java:534)

This trace shows one part of  the deadlock, it means that the NormalPeer 
located on //sea.inria.fr/Dispatcher-632083611 is waiting for the result 
of  NormalPeer.getPeerID call.
In fact this peer calls getID method on an AO Peer reference, since the 
call is synchronous, it waits until the result is back, so it waits on 
the FutureProxy of the not yet returned value.
In this run I got around 15 traces like this one, all stcuked on the 
same method, so it seems very similar to cycles. This is the reasons of 
the deadlock

All other traces about Thread for AC, or NormalPeer waitng on the 
request queue are normal (it means that their queue is empty, and that 
they are waiting for a request to arrive)
Hope this helps, I can send you the whole trace if you want.

For your second question, all should be printed out in the main jvm, 
even if you run a distributed simulation.
Regards
Lee Rong wrote:

>
>
> ------------------------------------------------------------------------
>
> Subject:
> RE: FW: [Fwd: Re: [Fwd: Re: [Fwd: [proactive] P2P question]]]
> From:
> "Lee Rong" <lr98@xxxxxxxxxx>
> Date:
> Tue, 24 May 2005 02:39:41 +1000
> To:
> "'Romain Quilici'" <Romain.Quilici@xxxxxxxxxxxxxxx>, "'Proactive'" 
> <proactive@xxxxxxxxxxxxx>
>
> To:
> "'Romain Quilici'" <Romain.Quilici@xxxxxxxxxxxxxxx>, "'Proactive'" 
> <proactive@xxxxxxxxxxxxx>
>
>
>Hi Romain,
> It is OK with the tracing, I should be able to figure it out myself. Just
>one question, when I try to run the simulation on just the local JVM, it
>seems that the program displays messages which are not in the two JVMs
>setting. The messages are actually some system.out.println statement in my
>code (i.e., "The requested index in dl complete notice is: ...") and they
>are not supposed to be displayed if the simulation runs accordingly. So
does
>that mean when the simulation runs in two JVMs setting, the printing
>statements are actually printed elsewhere and not on the main JVM?
>
>Thanks,
>
>Lee
>
>  
>


-- 
Romain Quilici
Software Engineer
OASIS Team - INRIA Sophia-Antipolis
04 92 38 71 65
Romain.Quilici@xxxxxxxxxxxxxxx
http://www.inria.fr/oasis/Romain.Quilici/


Attachment: Distributed_P2PSimulation.zip
Description: Zip compressed data


--- End Message ---


<--  Date Index  --> <--  Thread Index  -->

Reply via email to:

Powered by MHonArc.

Copyright © 1999-2005, ObjectWeb Consortium | contact | webmaster.