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

GUI no longer closes gracefully #925

Open
tbekolay opened this issue Nov 3, 2017 · 6 comments
Open

GUI no longer closes gracefully #925

tbekolay opened this issue Nov 3, 2017 · 6 comments
Labels

Comments

@tbekolay
Copy link
Member

tbekolay commented Nov 3, 2017

When I was fixing the voltage plot crash (#924) I noticed that the GUI no longer closes gracefully when I close the tab associated with the GUI. Here's what I get in the console:

ERROR:nengo_gui.server:Server error.
Traceback (most recent call last):
  File "/usr/lib/python2.7/SocketServer.py", line 597, in process_request_thread
    self.shutdown_request(request)
  File "/home/tbekolay/Code/nengo_gui_release/nengo_gui/server.py", line 227, in shutdown_request
    request.shutdown(socket.SHUT_WR)
  File "/usr/lib/python2.7/socket.py", line 228, in meth
    return getattr(self._sock,name)(*args)
error: [Errno 107] Transport endpoint is not connected
ERROR:nengo_gui.server:Exception while handling request.
Traceback (most recent call last):
  File "/usr/lib/python2.7/SocketServer.py", line 597, in process_request_thread
    self.shutdown_request(request)
  File "/home/tbekolay/Code/nengo_gui_release/nengo_gui/server.py", line 227, in shutdown_request
    request.shutdown(socket.SHUT_WR)
  File "/usr/lib/python2.7/socket.py", line 228, in meth
    return getattr(self._sock,name)(*args)
error: [Errno 107] Transport endpoint is not connected
Exception in thread Thread-65:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/tbekolay/Code/nengo_gui_release/nengo_gui/server.py", line 275, in process_request_thread
    self, request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 600, in process_request_thread
    self.shutdown_request(request)
  File "/home/tbekolay/Code/nengo_gui_release/nengo_gui/server.py", line 227, in shutdown_request
    request.shutdown(socket.SHUT_WR)
  File "/usr/lib/python2.7/socket.py", line 228, in meth
    return getattr(self._sock,name)(*args)
error: [Errno 107] Transport endpoint is not connected

ERROR:nengo_gui.server:Server error.
Traceback (most recent call last):
  File "/usr/lib/python2.7/SocketServer.py", line 597, in process_request_thread
    self.shutdown_request(request)
  File "/home/tbekolay/Code/nengo_gui_release/nengo_gui/server.py", line 227, in shutdown_request
    request.shutdown(socket.SHUT_WR)
  File "/usr/lib/python2.7/socket.py", line 228, in meth
    return getattr(self._sock,name)(*args)
error: [Errno 107] Transport endpoint is not connected
ERROR:nengo_gui.server:Exception while handling request.
Traceback (most recent call last):
  File "/usr/lib/python2.7/SocketServer.py", line 597, in process_request_thread
    self.shutdown_request(request)
  File "/home/tbekolay/Code/nengo_gui_release/nengo_gui/server.py", line 227, in shutdown_request
    request.shutdown(socket.SHUT_WR)
  File "/usr/lib/python2.7/socket.py", line 228, in meth
    return getattr(self._sock,name)(*args)
error: [Errno 107] Transport endpoint is not connected
Exception in thread Thread-64:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/tbekolay/Code/nengo_gui_release/nengo_gui/server.py", line 275, in process_request_thread
    self, request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 600, in process_request_thread
    self.shutdown_request(request)
  File "/home/tbekolay/Code/nengo_gui_release/nengo_gui/server.py", line 227, in shutdown_request
    request.shutdown(socket.SHUT_WR)
  File "/usr/lib/python2.7/socket.py", line 228, in meth
    return getattr(self._sock,name)(*args)
error: [Errno 107] Transport endpoint is not connected

ERROR:nengo_gui.server:Server error.
Traceback (most recent call last):
  File "/usr/lib/python2.7/SocketServer.py", line 597, in process_request_thread
    self.shutdown_request(request)
  File "/home/tbekolay/Code/nengo_gui_release/nengo_gui/server.py", line 227, in shutdown_request
    request.shutdown(socket.SHUT_WR)
  File "/usr/lib/python2.7/socket.py", line 228, in meth
    return getattr(self._sock,name)(*args)
error: [Errno 107] Transport endpoint is not connected
ERROR:nengo_gui.server:Exception while handling request.
Traceback (most recent call last):
  File "/usr/lib/python2.7/SocketServer.py", line 597, in process_request_thread
    self.shutdown_request(request)
  File "/home/tbekolay/Code/nengo_gui_release/nengo_gui/server.py", line 227, in shutdown_request
    request.shutdown(socket.SHUT_WR)
  File "/usr/lib/python2.7/socket.py", line 228, in meth
    return getattr(self._sock,name)(*args)
error: [Errno 107] Transport endpoint is not connected
Exception in thread Thread-62:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/tbekolay/Code/nengo_gui_release/nengo_gui/server.py", line 275, in process_request_thread
    self, request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 600, in process_request_thread
    self.shutdown_request(request)
  File "/home/tbekolay/Code/nengo_gui_release/nengo_gui/server.py", line 227, in shutdown_request
    request.shutdown(socket.SHUT_WR)
  File "/usr/lib/python2.7/socket.py", line 228, in meth
    return getattr(self._sock,name)(*args)
error: [Errno 107] Transport endpoint is not connected

ERROR:nengo_gui.server:Error response
Traceback (most recent call last):
  File "/home/tbekolay/Code/nengo_gui_release/nengo_gui/server.py", line 363, in do_GET
    self.handle_upgrade()
  File "/home/tbekolay/Code/nengo_gui_release/nengo_gui/server.py", line 390, in handle_upgrade
    self.upgrade_to_ws()
  File "/home/tbekolay/Code/nengo_gui_release/nengo_gui/server.py", line 436, in upgrade_to_ws
    self.ws_default()
  File "/home/tbekolay/Code/nengo_gui_release/nengo_gui/guibackend.py", line 92, in auth_checked
    return fn(inst)
  File "/home/tbekolay/Code/nengo_gui_release/nengo_gui/guibackend.py", line 241, in ws_default
    component.finish()
  File "/home/tbekolay/Code/nengo_gui_release/nengo_gui/components/sim_control.py", line 59, in finish
    self.page.finish()
  File "/home/tbekolay/Code/nengo_gui_release/nengo_gui/page.py", line 393, in finish
    self.gui.remove_page(self)
  File "/home/tbekolay/Code/nengo_gui_release/nengo_gui/guibackend.py", line 405, in remove_page
    self.shutdown()
  File "/home/tbekolay/Code/nengo_gui_release/nengo_gui/server.py", line 296, in shutdown
    self.shutdown_request(request)
  File "/home/tbekolay/Code/nengo_gui_release/nengo_gui/server.py", line 227, in shutdown_request
    request.shutdown(socket.SHUT_WR)
  File "/usr/lib/python2.7/socket.py", line 228, in meth
    return getattr(self._sock,name)(*args)
error: [Errno 107] Transport endpoint is not connected
Exception in thread Thread-61:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/tbekolay/Code/nengo_gui_release/nengo_gui/server.py", line 275, in process_request_thread
    self, request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 600, in process_request_thread
    self.shutdown_request(request)
  File "/home/tbekolay/Code/nengo_gui_release/nengo_gui/server.py", line 227, in shutdown_request
    request.shutdown(socket.SHUT_WR)
  File "/usr/lib/python2.7/socket.py", line 228, in meth
    return getattr(self._sock,name)(*args)
error: [Errno 107] Transport endpoint is not connected

It then hangs until I press Ctrl+C, which shuts the server down normally.

@jgosmann
Copy link
Collaborator

jgosmann commented Nov 3, 2017

Can't reproduce ... can you do a git bisect to figure out the exact commit introducing this problem?
What OS are you using?

@tbekolay
Copy link
Member Author

tbekolay commented Nov 3, 2017

Debian unstable with Python 2.7 and Nengo master. I'll do the git bisect shortly to find the commit.

@tbekolay
Copy link
Member Author

tbekolay commented Nov 3, 2017

9047ef2 is the commit at which the error started.

@jgosmann
Copy link
Collaborator

jgosmann commented Nov 3, 2017

Managed to reproduce with Python 2.7 on macOS, I will look into it.

@jgosmann jgosmann self-assigned this Nov 3, 2017
@jgosmann jgosmann added the bug label Nov 3, 2017
@jgosmann
Copy link
Collaborator

jgosmann commented Nov 3, 2017

This is fixed in PR #921, more specifically in commit 3eb7a57, and even more specifically the changes to nengo_gui/server.py. We could cherry pick those changes or just wait until #921 is merged.

@jgosmann jgosmann removed their assignment Nov 3, 2017
@tcstewar
Copy link
Collaborator

tcstewar commented Nov 6, 2017

This is fixed in PR #921, more specifically in commit 3eb7a57, and even more specifically the changes to nengo_gui/server.py. We could cherry pick those changes or just wait until #921 is merged.

Since that PR is dependent on the token stuff, and there's still a few things I'd like to address with that, I'd prefer to just cherry-pick those changes.

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

No branches or pull requests

3 participants