Closed Bug 1674049 Opened 4 years ago Closed 3 years ago

Don't send `ServerError: server exited with status 255: b'interrupted!'` errors to Sentry

Categories

(Conduit :: moz-phab, defect, P2)

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: glob, Assigned: glob)

Details

(Keywords: conduit-triaged)

Attachments

(1 file)

When Ctrl+C is used, Mercurial's server generates a ServerError exception instead of Python's standard KeyboardInterrupt exception.

We need to not send ServerErrors which are the result of being interrupted! to Sentry.

KeyboardInterrupt: 
(10 additional frame(s) were not displayed)
...
  File "http\client.py", line 1414, in connect
    server_hostname=server_hostname)
  File "ssl.py", line 423, in wrap_socket
    session=session
  File "ssl.py", line 870, in _create
    self.do_handshake()
  File "ssl.py", line 1139, in do_handshake
    self._sslobj.do_handshake()
  File "c:\mozilla-build\python3\lib\site-packages\mozphab\spinner.py", line 16, in signal_sigint
    raise KeyboardInterrupt()

ServerError: server exited with status 255: b'interrupted!'
(1 additional frame(s) were not displayed)
...
  File "c:\mozilla-build\python3\lib\site-packages\mozphab\mercurial.py", line 234, in cleanup
    bookmarks = self.hg_out(["bookmark", "-T", "{bookmark}\n"])
  File "c:\mozilla-build\python3\lib\site-packages\mozphab\mercurial.py", line 177, in hg_out
    out = self.repository.rawcommand(command, eh=error_handler)
  File "hglib\client.py", line 258, in rawcommand
    ret = self.runcommand(args, inchannels, outchannels)
  File "hglib\client.py", line 192, in runcommand
    channel, data = self._readchannel()
  File "hglib\client.py", line 153, in _readchannel
    % (ret, serr.strip()))

Also shows up as BrokenPipeError:

KeyboardInterrupt: 
(9 additional frame(s) were not displayed)
...
  File "http/client.py", line 268, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "socket.py", line 669, in readinto
    return self._sock.recv_into(b)
  File "ssl.py", line 1241, in recv_into
    return self.read(nbytes, buffer)
  File "ssl.py", line 1099, in read
    return self._sslobj.read(len, buffer)
  File "/home/user/.local/lib/python3.8/site-packages/mozphab/spinner.py", line 16, in signal_sigint
    raise KeyboardInterrupt()

BrokenPipeError: [Errno 32] Broken pipe
(1 additional frame(s) were not displayed)
...
  File "/home/user/.local/lib/python3.8/site-packages/mozphab/mercurial.py", line 234, in cleanup
    bookmarks = self.hg_out(["bookmark", "-T", "{bookmark}\n"])
  File "/home/user/.local/lib/python3.8/site-packages/mozphab/mercurial.py", line 177, in hg_out
    out = self.repository.rawcommand(command, eh=error_handler)
  File "hglib/client.py", line 258, in rawcommand
    ret = self.runcommand(args, inchannels, outchannels)
  File "hglib/client.py", line 189, in runcommand
    writeblock(b('\0').join(args))
  File "hglib/client.py", line 181, in writeblock
    self.server.stdin.flush()
Keywords: conduit-triaged
Priority: -- → P2
Assignee: nobody → glob
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: