[execnet-dev] Internal errors calling channel.send
Shead, Timothy
tshead at sandia.gov
Fri Aug 19 17:19:18 CEST 2011
On Aug 18, 2011, at 2:05 AM, holger krekel wrote:
>> Sure 'nuff, here's a test case that always hangs in the same spot:
>>
>> def stress_server(channel):
>> for request in channel:
>> channel.send(request)
>>
>> gateway = execnet.makegateway("popen//python=jython")
>> channel = gateway.remote_exec(stress_server)
>>
>> for size in range(31):
>> sys.stderr.write("Sending string length %d\n" % 2**size)
>> original = "a" * (2**size)
>> channel.send(original)
>> response = channel.receive()
>> self.assertEqual(original, response)
> Hi Timothy,
>
> i presume this problem does not occur with CPython or PyPy versions, does it
Correct, this problem only manifests when using CPython <--> Jython. If I test CPython <--> CPython, I'm able to pass huge amounts of data back-and-forth without problem.
> I wonder if Jython maybe has some problem with socket-sending/receiving code
> or if there are race conditions between the receiving and sending thread
> (Jython has free threading - the other python implementations do not).
>
> Not sure i can help much but could you send the jython and java versions
> you are using?
Sure, this is Jython running on an OSX 10.6 workstation, installed with MacPorts:
Jython 2.5.2 (Release_2_5_2:7206, Mar 2 2011, 23:12:06)
[Java HotSpot(TM) 64-Bit Server VM (Apple Inc.)] on java1.6.0_24
Cheers,
Tim
Timothy M. Shead
Sandia National Laboratories
1461, Scalable Analysis and Visualization
More information about the execnet-dev
mailing list