-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Race condition when using the "deploy" action #22
Comments
Hi Daniel,
This happens if the underlying implementation throws an exception.
“User implementation raised exception”
I recommend catching the exception in your code and logging them to see why
it happens.
Cheers,
Julian
…On Sat, 25 Jan 2020 at 14:34, Daniel F Moisset ***@***.***> wrote:
Hi, I've been working on an interview assignment and I've found that
sometimes the send_command_to_server script fails:
$ PYTHONPATH=lib python lib/send_command_to_server.py
Connecting to run.befaster.io
Your progress (0/3):
@ SUM (1 round) - warmup - Add two numbers
> └── SUM_R1 - running for 2 min (+0 min penalty)
. HLO (2 rounds) - warmup - Hello World !
├── HLO_R1 - not started
└── HLO_R2 - not started
. CHK (5 rounds) - official - Supermarket checkout
├── CHK_R1 - not started
├── CHK_R2 - not started
├── CHK_R3 - not started
├── CHK_R4 - not started
└── CHK_R5 - not started
---------------------
Type "deploy" if you have answered all the requests.
Type "pause" if you need a break.
> deploy
Selected action is: deploy
Starting client
Waiting for requests
id = SUM_R1_001, req = sum(0, 1), error = "user implementation raised exception", (NOT PUBLISHED)
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python3.7/threading.py", line 926, in _bootstrap_inner
self.run()
File "/usr/lib/python3.7/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/home/dmoisset/Documents/job/iwoca/accelerate_runner/env/lib/python3.7/site-packages/stomp/transport.py", line 296, in __receiver_loop
self.process_frame(f, frame)
File "/home/dmoisset/Documents/job/iwoca/accelerate_runner/env/lib/python3.7/site-packages/stomp/transport.py", line 164, in process_frame
self.notify(frame_type, f.headers, f.body)
File "/home/dmoisset/Documents/job/iwoca/accelerate_runner/env/lib/python3.7/site-packages/stomp/transport.py", line 206, in notify
for listener in self.listeners.values():
RuntimeError: dictionary changed size during iteration
Stopping client
Notify round "SUM_R1", event "deploy"
Exception in thread Thread-3:
Traceback (most recent call last):
File "/usr/lib/python3.7/threading.py", line 926, in _bootstrap_inner
self.run()
File "/usr/lib/python3.7/threading.py", line 1177, in run
self.function(*self.args, **self.kwargs)
File "/home/dmoisset/Documents/job/iwoca/accelerate_runner/env/lib/python3.7/site-packages/tdl/queue/transport/remote_broker.py", line 54, in close
self.conn.disconnect()
File "/home/dmoisset/Documents/job/iwoca/accelerate_runner/env/lib/python3.7/site-packages/stomp/connect.py", line 110, in disconnect
Protocol11.disconnect(self, receipt, headers, **keyword_headers)
File "/home/dmoisset/Documents/job/iwoca/accelerate_runner/env/lib/python3.7/site-packages/stomp/protocol.py", line 185, in disconnect
self.send_frame(CMD_DISCONNECT, headers)
File "/home/dmoisset/Documents/job/iwoca/accelerate_runner/env/lib/python3.7/site-packages/stomp/protocol.py", line 130, in send_frame
self.transport.transmit(frame)
File "/home/dmoisset/Documents/job/iwoca/accelerate_runner/env/lib/python3.7/site-packages/stomp/transport.py", line 254, in transmit
self.send(encode(packed_frame))
File "/home/dmoisset/Documents/job/iwoca/accelerate_runner/env/lib/python3.7/site-packages/stomp/transport.py", line 594, in send
raise exception.NotConnectedException()
stomp.exception.NotConnectedException
--------------------------------------------
Result is: INCONCLUSIVE
Not enough responses received. Have you solved the challenge?
Challenge description saved to file: challenges/SUM_R1.txt.
After this failure I tried to run it right away and it worked. I managed
to reproduce the problem quite consistently on the second warmup test (the
hello world one) by using a raise "Hello, World!" instead of return (I
mean, besides the expected challenge failure, I also get this RuntimeError:
dictionary changed size during iteration which shouldn't happen.
I think it's quite likely that the problem is related to this bug in
stomp.py: jasonrbriggs/stomp.py#174
<jasonrbriggs/stomp.py#174> ; and pip installing
stomp.py==4.1.23 seems to fix the problem, but I'm not sure if the new
version has any other changes that might be incompatible with your system.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#22?email_source=notifications&email_token=ABG2UKLBITPAGZVYDX6R4NTQ7REX3A5CNFSM4KLRETUKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IIWBD7Q>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABG2UKP7IUQWKL5W37AI32DQ7REX3ANCNFSM4KLRETUA>
.
|
Hi, this was in the warmup problems while I was intentionally trying to see what happened if my code had exceptions (to be prepared for the real scenario). The long internal traceback (instead of a traceback in my code) is somewhat unexpected, and as I mentioned it gets fixed (so I only get a message about my own exception) by upgrading stomp.py |
Thanks for this, Daniel. I will look at upgrading the Stomp library. |
Hi, I've been working on an interview assignment and I've found that sometimes the
send_command_to_server
script fails:After this failure I tried to run it right away and it worked. I managed to reproduce the problem quite consistently on the second warmup test (the hello world one) by using a
raise "Hello, World!"
instead ofreturn
(I mean, besides the expected challenge failure, I also get thisRuntimeError: dictionary changed size during iteration
which shouldn't happen.I think it's quite likely that the problem is related to this bug in
stomp.py
: jasonrbriggs/stomp.py#174 ; and pip installingstomp.py==4.1.23
seems to fix the problem, but I'm not sure if the new version has any other changes that might be incompatible with your system.The text was updated successfully, but these errors were encountered: