jquast / x84

A python telnet/ssh server for modern terminals. In spirit of classic software such as ami/x, teleguard, renegade, iniquity.
http://x84.readthedocs.org/
Other
373 stars 56 forks source link

__new__ / pickling error on disconnect #113

Closed jquast closed 10 years ago

jquast commented 10 years ago

also previously reported by @tehmaze

Sun-08-24 08:46PM INFO  session.py 648 mrmittens[censored:54096] run script 'tetris' args=().
Sun-08-24 08:46PM DEBUG  session.py 186 mrmittens[censored:54096] activity=playing tetris
Sun-08-24 08:46PM ERROR   engine.py 469 unpickling error
Traceback (most recent call last):
  File "/usr/local/src/x84/x84/engine.py", line 460, in session_recv
    event, data = tty.master_read.recv()
TypeError: __new__() takes exactly 1 argument (2 given)
Sun-08-24 08:47PM DEBUG   engine.py 345 censored:54096: disconnect on recv: Closed by client (EOF)
Sun-08-24 08:47PM DEBUG   client.py 126 censored:54096: socket shutdown TelnetClient
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/local/src/x84/x84/engine.py", line 634, in <module>
    exit(main())
  File "/usr/local/src/x84/x84/engine.py", line 49, in main
    _loop(servers)
  File "/usr/local/src/x84/x84/engine.py", line 611, in _loop
    client_recv(servers, log)
  File "/usr/local/src/x84/x84/engine.py", line 346, in client_recv
    kill_session(client, 'disconnected: {err}'.format(err=err))
  File "x84/terminal.py", line 205, in kill_session
    unregister_tty(tty)
  File "x84/terminal.py", line 163, in unregister_tty
    flush_queue(tty.master_read)
  File "x84/terminal.py", line 140, in flush_queue
    event, data = queue.recv()
TypeError: __new__() takes exactly 1 argument (2 given)
jquast commented 10 years ago

^c leaves

^CProcess Process-869:
Traceback (most recent call last):
  File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "x84/terminal.py", line 245, in start_process
    Session(**kwargs).run()
  File "x84/bbs/session.py", line 366, in run
    self.runscript(*self._script_stack.pop())
  File "x84/bbs/session.py", line 660, in runscript
    value = script.main(*args)
  File "/usr/local/src/x84/x84/default/nua.py", line 189, in main
    set_handle(user)
  File "/usr/local/src/x84/x84/default/nua.py", line 45, in set_handle
    user.handle = LineEditor(width, user.handle).read()
  File "x84/bbs/editor.py", line 173, in read
    inp = getch()
  File "x84/bbs/__init__.py", line 111, in getch
Process Process-241:
Traceback (most recent call last):
  File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
    keystroke = getterminal().inkey(timeout)
  File "x84/terminal.py", line 31, in inkey
    return BlessedTerminal.inkey(self, timeout, esc_delay=0.35)
  File "/usr/local/lib/python2.7/dist-packages/blessed/terminal.py", line 708, in inkey
    while not ks and self.kbhit(_timeleft(stime, timeout), _intr_continue):
  File "x84/terminal.py", line 49, in kbhit
    val = self.session.read_event('input', timeout)
  File "x84/bbs/session.py", line 592, in read_event
    return self.read_events(events=(event,), timeout=timeout)[1]
  File "x84/bbs/session.py", line 615, in read_events
    if self.reader.poll(poll):
KeyboardInterrupt
    self.run()
  File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "x84/terminal.py", line 245, in start_process
    Session(**kwargs).run()
  File "x84/bbs/session.py", line 366, in run
    self.runscript(*self._script_stack.pop())
  File "x84/bbs/session.py", line 660, in runscript
    value = script.main(*args)
  File "/usr/local/src/x84/x84/default/main.py", line 135, in main
    gosub('lord')
  File "x84/bbs/__init__.py", line 125, in gosub
    return getsession().runscript(*(arg[0],) + arg[1:])
  File "x84/bbs/session.py", line 660, in runscript
    value = script.main(*args)
  File "/usr/local/src/x84/x84/default/lord.py", line 85, in main
    door.run()
  File "x84/bbs/door.py", line 589, in run
    Door.run(self)
  File "x84/bbs/door.py", line 406, in run
    self._loop()
  File "x84/bbs/door.py", line 485, in _loop
    echo(self.output_filter(data))
  File "x84/bbs/output.py", line 54, in echo
    return session.write(ucs)
  File "x84/bbs/session.py", line 435, in write
    self.terminal.stream.write(ucs, encoding)
  File "x84/bbs/ipc.py", line 78, in write
    self.writer.send(('output', (ucs, encoding)))
KeyboardInterrupt
jquast commented 10 years ago

This has not been seen in some time.