Finally getting where I can replicate problems with stockquotes phase3 tutorial
Kenneth Martin <martin-TxPoQvD3IN4C6LszWs/[email protected]> Wed, 07 Jan 2015 15:03:06 -0500
| Newsgroups | gmane.comp.python.pyro |
|---|---|
| Message-ID | <[email protected]> |
I've been going back and forth a number of times and I can now replicate
issue.
Details: running Debian Linux beaglebone 3.8.13-bone47 #1 SMP Fri Apr 11
01:36:09 UTC 2014 armv7l GNU/Linux
on a Beaglebone Black C.
Pyro4: 4.31
1) Tutorial works fine with serpent serializer.
2) I have not spent time to figure out if I need to set environment
variable SERIALIZERS_ACCEPTED
in all three terminals or just in terminal with stockmarket.py, or in
both terminals with stockmarket.py and aggregator.py, but for tests, I
am setting in all three terminal windows to be sure. (actually see j
below - I did spend some time and it appears only terminal 0 needs the
environment variable). I also change
Pyro4.config.SERIALIZER = 'pickle'
Pyro4.config.SERIALIZERS_ACCEPTED.add('pickle')
in all three files
3) Note: even with serpent, tutorial does not work with
Pyro4.config.COMMTIMEOUT = 4.0
I believe problem is with aggregator.py and error message is not getting
enough data (probably from viewer.py)
4) After running successfully with serpent, and going back to running
with pickle;
a) I stop all programs including name server.
b) I set environment variables in all three terminals
c) I change all three files to pickle
d) I start name server in terminal '0'
e) I run >python stockmarket.py & in terminal 0 and get the error
message in the terminal
> /usr/local/lib/python2.7/dist-packages/Pyro4/naming.py:211:
UserWarning: Pyro protocol error occurred: message used serializer that
is not accepted: 4
warnings.warn("Pyro protocol error occurred: " + str(x))
d) I kill python stockmarket.py
e) I try running a second time, now no error message
f) I kill python stockmarket.py
g) I run again under winpdb and find it has hung in core.py, line 327
waiting to get a threading.Lock(). The lines are:
def _pyroRelease(self):
"""release the connection to the pyro daemon"""
with self.__pyroConnLock:
it hangs on the last line.
h) The stack is (in reverse order and short-form)
stockmarket.py: 70, 79 (note, I added some lines to attach to winpdb)
naming.py: 365
core.py: 231, 475, 466, 483, 398, 327
i) I carefully go back to serpent everywhere, and verify it is working
again.
j) I unset environment variables in terminals 1 (i.e. aggregator.py) and
2 (i.e. viewer.py); tutorial 2 still works, it appears the environment
variable may only be need for the name server/ server terminal.
Summary:
In my board, there is a hanging problem when trying to acquire a
threading lock when pickle is used as the serializer. serpent works fine
as long as
communication time-outs are not used.
I hope this helps.
Bit_Pusher
------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net