Skip to content
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

pyon/rpc limits argument size #285

Closed
jordens opened this issue Feb 21, 2016 · 0 comments
Closed

pyon/rpc limits argument size #285

jordens opened this issue Feb 21, 2016 · 0 comments
Assignees
Milestone

Comments

@jordens
Copy link
Member

jordens commented Feb 21, 2016

RPCs with big arguments are broken:

(py35)rj@tito:~/work/nist/artiq/run (master)$ artiq_rpctool localhost 3251 call -t master_schedule foo
"'`seq -s. 20000`'"
Traceback (most recent call last):
  File "/home/rj/src/conda/envs/py35/bin/artiq_rpctool", line 9, in <module>
    load_entry_point('artiq', 'console_scripts', 'artiq_rpctool')()
  File "/home/rj/work/nist/artiq/artiq/frontend/artiq_rpctool.py", line 100, in main
    call_method(remote, args.method, args.args)
  File "/home/rj/work/nist/artiq/artiq/frontend/artiq_rpctool.py", line 79, in call_method
    ret = method(*[eval(arg) for arg in args])
  File "/home/rj/work/nist/artiq/artiq/protocols/pc_rpc.py", line 169, in proxy
    return self.__do_rpc(name, args, kwargs)
  File "/home/rj/work/nist/artiq/artiq/protocols/pc_rpc.py", line 161, in __do_rpc
    return self.__do_action(obj)
  File "/home/rj/work/nist/artiq/artiq/protocols/pc_rpc.py", line 151, in __do_action
    obj = self.__recv()
  File "/home/rj/work/nist/artiq/artiq/protocols/pc_rpc.py", line 146, in __recv
    return pyon.decode(buf)
  File "/home/rj/work/nist/artiq/artiq/protocols/pyon.py", line 190, in decode
    return eval(s, _eval_dict, {})
  File "<string>", line 0

    ^
SyntaxError: unexpected EOF while parsing

On the master:

ERROR:master:asyncio:Task exception was never retrieved
future: <Task finished coro=<Server._handle_connection_cr() done, defined at /home/rj/work/nist/artiq/artiq/protocols/pc_rpc.py:440> exception=ValueError('Line is too long',)>
Traceback (most recent call last):
  File "/home/rj/src/conda/envs/py35/lib/python3.5/asyncio/tasks.py", line 239, in _step
    result = coro.send(None)
  File "/home/rj/work/nist/artiq/artiq/protocols/pc_rpc.py", line 462, in _handle_connection_cr
    line = await reader.readline()
  File "/home/rj/src/conda/envs/py35/lib/python3.5/asyncio/streams.py", line 449, in readline
    raise ValueError('Line is too long')
ValueError: Line is too long

This limits the usability of pdq2 and will break things like other AWGs and things like camera controllers passing images around.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants