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

Loss of QMP connection results in abort / crash of XQEMU-Manager #58

Open
JayFoxRox opened this issue Oct 21, 2019 · 0 comments
Open

Loss of QMP connection results in abort / crash of XQEMU-Manager #58

JayFoxRox opened this issue Oct 21, 2019 · 0 comments

Comments

@JayFoxRox
Copy link
Member

When pressing "Restart" it will crash XQEMU (See #50). When pressing the button again, XQEMU-Manager will try to send another QMP command before realizing that XQEMU crashed.

This leads to XQEMU-Manager aborting (closing):

Traceback (most recent call last):
  File "./main.py", line 426, in onRestartButtonClicked
    self.inst.restart()
  File "./main.py", line 330, in restart
    return self.run_cmd('system_reset')
  File "./main.py", line 318, in run_cmd
    resp = self._qmp.cmd_obj(cmd)
  File "xqemu-manager/qmp.py", line 174, in cmd_obj
    resp = self.__json_read()
  File "xqemu-manager/qmp.py", line 82, in __json_read
    data = self.__sockfile.readline()
  File "/usr/lib/python3.7/socket.py", line 589, in readinto
    return self._sock.recv_into(b)
ConnectionResetError: [Errno 104] Connection reset by peer
Aborted (core dumped)

or

Traceback (most recent call last):
  File "./main.py", line 426, in onRestartButtonClicked
    self.inst.restart()
  File "./main.py", line 330, in restart
    return self.run_cmd('system_reset')
  File "./main.py", line 320, in run_cmd
    raise Exception('Disconnected!')
Exception: Disconnected!
Aborted (core dumped)

We should handle the disconnection / loss of connection more gracefully.

This might also affect other QMP commands.

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

No branches or pull requests

1 participant