parallelpython 1.5.7 crash

M

makobu

Hi all,

Hi all,

with the above version of parallelpython, what causes this?

Traceback (most recent call last):
File "C:\Users\tim\code_base\svn\octopus\parallel_python\pp.py",
line 762, in
__run
sresult = worker.t.receive()
File "C:\Users\tim\code_base\svn\octopus\parallel_python
\pptransport.py", line
133, in receive
msg = self.r.read(msg_len)
OverflowError: long int too large to convert to int
Unhandled exception in thread started by <bound method Server.__run of
<parallel
_python.pp.Server object at 0x017EEC70>>
Traceback (most recent call last):
File "C:\Users\tim\code_base\svn\octopus\parallel_python\pp.py",
line 771, in
__run
job.finalize(sresult)
UnboundLocalError: local variable 'sresult' referenced before
assignment
 
Z

zeph

I looked in the browsable svn repo for parallel python at
http://parallelpython.googlecode.com/svn/trunk/

1) OverflowError: long int too large to convert to int

This is a bug in their code (comments are mine) in pytransport.py:

size_packed = self.r.read(struct.calcsize("!Q")) # reads in 8-
character string
msg_len = struct.unpack("!Q", size_packed)[0] # unpacks to a long
value, e.g. "12345678" -> 3544952156018063160L
msg = self.r.read(msg_len) #
3544952156018063160L is too long for file.read, which I presume must
be able to cast as an int

As an example:Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OverflowError: long int too large to convert to int



2) UnboundLocalError: local variable 'sresult' referenced before
assignment

This is another bug in their code. This is an error in pp.py (again,
comments are mine, some code omitted for brevity):

try:
# ...snip...
sresult = worker.t.receive() # sets sresult
except:
if self.__exiting:
return
else:
# at this point, __run doesn't return, but sresult was not defined
since the
# execution was unwound because, presumable, the first fatal you
got, the OverflowError
sys.excepthook(*sys.exc_info())
# ...snip...
job.finalize(sresult) # UnboundLocalError here from missing sresult


You can submit these as a bug report to the author if you want - feel
free to copy-paste or link to this post :)

- zeph
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top