Re: hang observed using Pyro4

Arend van Spriel <[email protected]> Sat, 23 May 2015 11:23:05 +0200
Newsgroups gmane.comp.python.pyro
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--------------070102060904000306010703
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 7bit

On 23-05-15 00:00, Irmen de Jong wrote:
> On 22-5-2015 19:57, Arend van Spriel wrote:
>> I am thinking about using Pyro4 in a testing framework with a controller
>> accessing objects on DUT (device under test). The package for the
>> objects on the DUT are on GitHub [1]. I have a pyro-experiment branch there.
>>
>> As experiment I create a server object (in lib/server.py) which exposes
>> a create_instance() method through which the client can request the
>> creation of a particular class on the server, which is registered with
>> the Daemon and returned. The requested class instance may create other
>> custom objects which are also registered with the Daemon. The result is
>> an object hierarchy with Proxy objects. So far so good. In my experiment
>> the client (in examples/example06.py) accesses those Proxy objects to
>> show data in terminal. However, it hangs after a couple of Proxy calls
>> on socket recv.
>
> What hangs, client? server?
>
>> I also tried with USE_MSG_WAITALL set to False, but the
>> result is the same. The experiment is done with client and server on the
>> same machine. Any suggestions about what might be going on or how to
>> debug this would be appreciated.
>
> Enable pyro logging and see what's happening in there.
>
> Are you by any chance using gevent to monkeypatch socket stuff?
> What OS/python are you running this on?
>
>
> Do you also observe similar issues when running any of the examples that come with Pyro?

I ran the autoproxy example and slightly modified it to match my 
use-case. Each Thingy has list of 20 SubThingy that I iterate through on 
client side and make it speak. It hangs on item 13 in the list. Same in 
my use-case (exactly on item 13).

server output

Thingy 1 says: I am the first
Thingy 2 says: I am second
Thingy 3 says: I am last then...
SubThingy 1.1 says: I am also here!!
SubThingy 1.2 says: I am also here!!
SubThingy 1.3 says: I am also here!!
SubThingy 1.4 says: I am also here!!
SubThingy 1.5 says: I am also here!!
SubThingy 1.6 says: I am also here!!
SubThingy 1.7 says: I am also here!!
SubThingy 1.8 says: I am also here!!
SubThingy 1.9 says: I am also here!!
SubThingy 1.10 says: I am also here!!
SubThingy 1.11 says: I am also here!!
SubThingy 1.12 says: I am also here!!

Attached is my modified autoproxy and the pyro logging. It can not 
establish the connection to SubThingy #13.

Regards,
Arend

--------------070102060904000306010703
Content-Type: application/x-bzip;
 name="autoproxy.tar.bz2"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
 filename="autoproxy.tar.bz2"

QlpoOTFBWSZTWfOcF+0AApJ/xMzyAIB67f+W7Sbfav///+oAAIABgAhQBHvWcp3J1kIiIEop
lT8FR6hptT1GmmgGnpAAGgABp6gABqNNA0TVPJMgNDRoaAAAAAAAASIiaRT0TyZTZTDKYh6g
AAaGgBoaAA40ZMjCMQDCaDAJoNAyZNGTIYQGEiU0GSYk9AoemU0jTGowIxBiGQ0xA09PU4w/
C297Qv9UMUAhlgUNAg366rQBKjSRBq7OVgayYDBsBglChANq81CSDeuh8354fSh9WXtukTzQ
Xq+BxxW4nPnYUtDwxy3Q8CGMPMeMEGWAxwQIAogiMERH4eppXu/Vkjlrz7ODKpwbNzQZQWh2
v5eFdtxull8GNWZc4pGyoUbfCFEXubOpGSShQ1RRHsa9vcK7cYTimYubL3wVqFALJCxijCWB
7mwEEOT/sQgHWggmGVlC7UwU9Ls5obyGNJ0zaTyUKhmjeCbhmtmEo6e7xwoIiDVN9CoYRqqk
/JsTnqColr2DsxBbXRyzKRKyWEgdnB8g51VLx4Cv6BNlW7AcYeTFGvSW2eHUth0VsNaL4Ko5
3K7EfBYWpFgg45yuNfj4ZxidG+ArQWTqoryuxlCV99B2aObPJ4zDYvH5ANYFV0AHsXL3QUgY
ggIAqwzeKf2Y/TuwXcd+AMNJKN7UATgIte3UWNzI8YSVaiy2OFDqr1dkpargDIGXNYqvG5xA
EVMjVrBcITvSWy04c70mdkge+xfz7f4nYg9r7QTIPc4/uBn73z+Ff9dIUMiQMYXVObGQJA7I
VKai8lYqN1qxRXBiiX1+Y/EEPtWY5hkHwD7g9IerAwE2qE+rlTl2cczNTvEu2kfsSA1+jC7c
2PHINOBXjWohAwLme90IrRn2yJRm0dWFl5IKaKHkQ4kINxJpdI0chkYnbgSuVUIupqE5AUZu
Y98ZBbyTIbQQQO0dpNHOG9h4JhLK/LrpY+6oDUwXX3WtGE4frr5ziR0hWkaGI3BioSNqRQaQ
eNsTzKmNkZFNLK02X7lz2wijBElwsoIasNlVJG/goCg/rHwSMxGtTO+8yEUKmWeIkhkW2CNw
SkICoq5xSXQyHEIo1cQBWYxXWpZCLmkVZNoV1lADTG1Yy9GHEKF2NrNfmggbA4alkNSqfwMJ
Xg2NFWpdXNMmlLANoqgJIK7aaW8hYXWGhLX8eB0DVD/x2pdZbVGBuVAaqafNAgtOsQM1i6pq
4E8FbYLSInQqF50jaq0edow22igm0QBwuedfK2V01DubOzSwYVz9IGSXEQ3qck62dp6uHOEm
hZgdY0Bsqtz3RuINLK9DecYFfn510sossyFpYrMuKKKsrBBAUFMymQXiMm3shtQaSrBrOheU
ktAFQGg0RFhIvRZgbOhWgcqrxLiWVBiaZqoXIOKxAuLkYbXK5RxQWrjQu+0qgZEQm4lvkpSR
0IKzMvLw9R6TpBL5i7kinChIec4L9oA=
--------------070102060904000306010703
Content-Type: text/x-log;
 name="pyro.log"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="pyro.log"

[2015-05-23 11:14:02.414,Pyro4,INFO] Pyro log configured using built-in defaults, level=DEBUG
[2015-05-23 11:14:02.453,Pyro4.core,DEBUG] exposing all members of <class 'Pyro4.core.DaemonObject'>
[2015-05-23 11:14:07.448,Pyro4.core,DEBUG] getting metadata for object example.autoproxy
[2015-05-23 11:14:07.448,Pyro4.core,DEBUG] connecting to PYRO:example.autoproxy@localhost:60878
[2015-05-23 11:14:07.450,Pyro4.core,DEBUG] connected to PYRO:example.autoproxy@localhost:60878
[2015-05-23 11:14:07.450,Pyro4.core,DEBUG] getting metadata for object example.autoproxy
[2015-05-23 11:14:07.452,Pyro4.core,DEBUG] from meta: oneway methods=[]
[2015-05-23 11:14:07.452,Pyro4.core,DEBUG] from meta: methods=[u'createSomething']
[2015-05-23 11:14:07.452,Pyro4.core,DEBUG] from meta: attributes=[]
[2015-05-23 11:14:07.466,Pyro4.core,DEBUG] connecting to PYRO:obj_c51d2236ea8845edb9e5c1849bca69e6@localhost:60878
[2015-05-23 11:14:07.478,Pyro4.core,DEBUG] connected to PYRO:obj_c51d2236ea8845edb9e5c1849bca69e6@localhost:60878
[2015-05-23 11:14:07.478,Pyro4.core,DEBUG] reusing existing metadata
[2015-05-23 11:14:07.479,Pyro4.core,DEBUG] connecting to PYRO:obj_aed6b9f6023a4e1db7bc55abc469741b@localhost:60878
[2015-05-23 11:14:07.480,Pyro4.core,DEBUG] connected to PYRO:obj_aed6b9f6023a4e1db7bc55abc469741b@localhost:60878
[2015-05-23 11:14:07.481,Pyro4.core,DEBUG] reusing existing metadata
[2015-05-23 11:14:07.482,Pyro4.core,DEBUG] connecting to PYRO:obj_9d88e16887b64160aa68603b3ef76b32@localhost:60878
[2015-05-23 11:14:07.483,Pyro4.core,DEBUG] connected to PYRO:obj_9d88e16887b64160aa68603b3ef76b32@localhost:60878
[2015-05-23 11:14:07.483,Pyro4.core,DEBUG] reusing existing metadata
[2015-05-23 11:14:07.491,Pyro4.core,DEBUG] connecting to PYRO:obj_608ae55801e141ef98688d62cd486eb9@localhost:60878
[2015-05-23 11:14:07.492,Pyro4.core,DEBUG] connected to PYRO:obj_608ae55801e141ef98688d62cd486eb9@localhost:60878
[2015-05-23 11:14:07.492,Pyro4.core,DEBUG] reusing existing metadata
[2015-05-23 11:14:07.493,Pyro4.core,DEBUG] connecting to PYRO:obj_a8bdb74d2ecb45208e01b0d90d1bf113@localhost:60878
[2015-05-23 11:14:07.494,Pyro4.core,DEBUG] connected to PYRO:obj_a8bdb74d2ecb45208e01b0d90d1bf113@localhost:60878
[2015-05-23 11:14:07.494,Pyro4.core,DEBUG] reusing existing metadata
[2015-05-23 11:14:07.495,Pyro4.core,DEBUG] connecting to PYRO:obj_9498ebaa23c145ef90d58a92109d48db@localhost:60878
[2015-05-23 11:14:07.496,Pyro4.core,DEBUG] connected to PYRO:obj_9498ebaa23c145ef90d58a92109d48db@localhost:60878
[2015-05-23 11:14:07.496,Pyro4.core,DEBUG] reusing existing metadata
[2015-05-23 11:14:07.497,Pyro4.core,DEBUG] connecting to PYRO:obj_ff22289258e64805a00300b18b67b02a@localhost:60878
[2015-05-23 11:14:07.498,Pyro4.core,DEBUG] connected to PYRO:obj_ff22289258e64805a00300b18b67b02a@localhost:60878
[2015-05-23 11:14:07.498,Pyro4.core,DEBUG] reusing existing metadata
[2015-05-23 11:14:07.499,Pyro4.core,DEBUG] connecting to PYRO:obj_cfb21b203ed74d46a99c058df6e98a6e@localhost:60878
[2015-05-23 11:14:07.499,Pyro4.core,DEBUG] connected to PYRO:obj_cfb21b203ed74d46a99c058df6e98a6e@localhost:60878
[2015-05-23 11:14:07.500,Pyro4.core,DEBUG] reusing existing metadata
[2015-05-23 11:14:07.501,Pyro4.core,DEBUG] connecting to PYRO:obj_276706a061ec4108a017c76ae969ada0@localhost:60878
[2015-05-23 11:14:07.501,Pyro4.core,DEBUG] connected to PYRO:obj_276706a061ec4108a017c76ae969ada0@localhost:60878
[2015-05-23 11:14:07.501,Pyro4.core,DEBUG] reusing existing metadata
[2015-05-23 11:14:07.502,Pyro4.core,DEBUG] connecting to PYRO:obj_b51e137c5f164f50a92dd549066d1ac8@localhost:60878
[2015-05-23 11:14:07.503,Pyro4.core,DEBUG] connected to PYRO:obj_b51e137c5f164f50a92dd549066d1ac8@localhost:60878
[2015-05-23 11:14:07.503,Pyro4.core,DEBUG] reusing existing metadata
[2015-05-23 11:14:07.504,Pyro4.core,DEBUG] connecting to PYRO:obj_8a2039f9e7a44551a427b58c7c512660@localhost:60878
[2015-05-23 11:14:07.505,Pyro4.core,DEBUG] connected to PYRO:obj_8a2039f9e7a44551a427b58c7c512660@localhost:60878
[2015-05-23 11:14:07.505,Pyro4.core,DEBUG] reusing existing metadata
[2015-05-23 11:14:07.506,Pyro4.core,DEBUG] connecting to PYRO:obj_88b4688a6e2f4f9dbc43d4ea259d8d2f@localhost:60878
[2015-05-23 11:14:07.507,Pyro4.core,DEBUG] connected to PYRO:obj_88b4688a6e2f4f9dbc43d4ea259d8d2f@localhost:60878
[2015-05-23 11:14:07.507,Pyro4.core,DEBUG] reusing existing metadata
[2015-05-23 11:14:07.508,Pyro4.core,DEBUG] connecting to PYRO:obj_01e1bc795e714481bc0590d9b5ecbb22@localhost:60878
[2015-05-23 11:14:07.508,Pyro4.core,DEBUG] connected to PYRO:obj_01e1bc795e714481bc0590d9b5ecbb22@localhost:60878
[2015-05-23 11:14:07.508,Pyro4.core,DEBUG] reusing existing metadata
[2015-05-23 11:14:07.509,Pyro4.core,DEBUG] connecting to PYRO:obj_590442dd25e64a86b317a99a0741db6c@localhost:60878
[2015-05-23 11:14:07.510,Pyro4.core,DEBUG] connected to PYRO:obj_590442dd25e64a86b317a99a0741db6c@localhost:60878
[2015-05-23 11:14:07.510,Pyro4.core,DEBUG] reusing existing metadata
[2015-05-23 11:14:07.512,Pyro4.core,DEBUG] connecting to PYRO:obj_83bf0ce4c8784a4fa1a455e31fa028ed@localhost:60878
[2015-05-23 11:14:07.512,Pyro4.core,DEBUG] connected to PYRO:obj_83bf0ce4c8784a4fa1a455e31fa028ed@localhost:60878
[2015-05-23 11:14:07.512,Pyro4.core,DEBUG] reusing existing metadata
[2015-05-23 11:14:07.514,Pyro4.core,DEBUG] connecting to PYRO:obj_05ace462cd70457e8493c31ea2006045@localhost:60878
[2015-05-23 11:14:18.345,Pyro4.core,DEBUG] connection released
[2015-05-23 11:14:18.346,Pyro4.core,DEBUG] connection released
[2015-05-23 11:14:18.346,Pyro4.core,DEBUG] connection released
[2015-05-23 11:14:18.346,Pyro4.core,DEBUG] connection released
[2015-05-23 11:14:18.346,Pyro4.core,DEBUG] connection released
[2015-05-23 11:14:18.346,Pyro4.core,DEBUG] connection released
[2015-05-23 11:14:18.346,Pyro4.core,DEBUG] connection released
[2015-05-23 11:14:18.346,Pyro4.core,DEBUG] connection released
[2015-05-23 11:14:18.346,Pyro4.core,DEBUG] connection released
[2015-05-23 11:14:18.347,Pyro4.core,DEBUG] connection released
[2015-05-23 11:14:18.347,Pyro4.core,DEBUG] connection released
[2015-05-23 11:14:18.347,Pyro4.core,DEBUG] connection released
[2015-05-23 11:14:18.355,Pyro4.core,DEBUG] connection released
[2015-05-23 11:14:18.356,Pyro4.core,DEBUG] connection released
[2015-05-23 11:14:18.357,Pyro4.core,DEBUG] connection released
[2015-05-23 11:14:18.357,Pyro4.core,DEBUG] connection released

--------------070102060904000306010703
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
--------------070102060904000306010703
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Pyro-core mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyro-core

--------------070102060904000306010703--