Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   parallelpython 1.5.7 crash (http://www.velocityreviews.com/forums/t708473-parallelpython-1-5-7-crash.html)

makobu 12-12-2009 01:10 PM

parallelpython 1.5.7 crash
 
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_pytho n\pp.py",
line 762, in
__run
sresult = worker.t.receive()
File "C:\Users\tim\code_base\svn\octopus\parallel_pytho n
\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_pytho n\pp.py",
line 771, in
__run
job.finalize(sresult)
UnboundLocalError: local variable 'sresult' referenced before
assignment

zeph 12-13-2009 01:13 AM

Re: parallelpython 1.5.7 crash
 
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:
>>> sys.stdin.read(3544952156018063160L)

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

makobu 12-15-2009 09:00 AM

Re: parallelpython 1.5.7 crash
 
Thanks Zeph.


All times are GMT. The time now is 08:11 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.