Edgewall Software

Opened 16 years ago

Last modified 16 years ago

#2688 closed defect

tracd crashes on connection resets — at Version 1

Reported by: mr_seaworthy@… Owned by: Christian Boos
Priority: normal Milestone:
Component: general Version: 0.9.3
Severity: normal Keywords: pysqlite windows
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Christian Boos)

We are using tracd on Windows 2003 SP1 and most of the times it is running fine. Lately more and more users are browsing the websites and every now and then the daemon crashes.

Some of these crashes can be reproduced by for instance pressing the reload button in the website a couple of times (try to make it reload the page while the last reload was not finished yet).

----------------------------------------
Exception happened during processing of request from ('myip', 3104)
Traceback (most recent call last):
    self.RequestHandlerClass(request, client_address, self)
  File "C:\Python23\lib\SocketServer.py", line 463, in process_request_thread
  File "C:\Python23\lib\SocketServer.py", line 521, in __init__
    self.finish_request(request, client_address)
    self.handle()
  File "C:\Python23\lib\SocketServer.py", line 254, in finish_request
  File "C:\Python23\lib\BaseHTTPServer.py", line 324, in handle
    self.RequestHandlerClass(request, client_address, self)
    self.handle_one_request()
  File "C:\Python23\lib\SocketServer.py", line 521, in __init__
  File "C:\Python23\lib\BaseHTTPServer.py", line 318, in handle_one_request
    self.handle()
    method()
  File "C:\Python23\lib\BaseHTTPServer.py", line 324, in handle
  File "C:\Python23\lib\site-packages\trac\web\standalone.py", line 264, in do_G
ET
    self.handle_one_request()
    self._do_trac_req()
  File "C:\Python23\lib\BaseHTTPServer.py", line 318, in handle_one_request
  File "C:\Python23\lib\site-packages\trac\web\standalone.py", line 308, in _do_
trac_req
    method()
    dispatch_request(path_info, req, env)
  File "C:\Python23\lib\site-packages\trac\web\standalone.py", line 264, in do_G
ET
  File "C:\Python23\Lib\site-packages\trac\web\main.py", line 139, in dispatch_r
equest
    self._do_trac_req()
    dispatcher.dispatch(req)
  File "C:\Python23\lib\site-packages\trac\web\standalone.py", line 308, in _do_
trac_req
  File "C:\Python23\Lib\site-packages\trac\web\main.py", line 107, in dispatch
    dispatch_request(path_info, req, env)
    resp = chosen_handler.process_request(req)
  File "C:\Python23\Lib\site-packages\trac\web\main.py", line 139, in dispatch_r
equest
  File "C:\Python23\Lib\site-packages\trac\attachment.py", line 275, in process_
request
    dispatcher.dispatch(req)
    self._render_view(req, attachment)
  File "C:\Python23\Lib\site-packages\trac\attachment.py", line 435, in _render_
view
  File "C:\Python23\Lib\site-packages\trac\web\main.py", line 107, in dispatch
    mime_type + ';charset=' + charset)
  File "C:\Python23\Lib\site-packages\trac\web\api.py", line 202, in send_file
    resp = chosen_handler.process_request(req)
  File "C:\Python23\Lib\site-packages\trac\attachment.py", line 275, in process_
request
    self._render_view(req, attachment)
    self.write(data)
  File "C:\Python23\Lib\site-packages\trac\attachment.py", line 435, in _render_
view
  File "C:\Python23\lib\site-packages\trac\web\standalone.py", line 357, in writ
e
    mime_type + ';charset=' + charset)
    self.__handler.wfile.write(data)
  File "C:\Python23\Lib\site-packages\trac\web\api.py", line 202, in send_file
    self.write(data)
  File "C:\Python23\lib\socket.py", line 254, in write
    self.flush()
  File "C:\Python23\lib\site-packages\trac\web\standalone.py", line 357, in writ
e
  File "C:\Python23\lib\socket.py", line 241, in flush
    self.__handler.wfile.write(data)
    self._sock.sendall(buffer)
  File "C:\Python23\lib\socket.py", line 254, in write
error: (10054, 'Connection reset by peer')
    self.flush()
----------------------------------------
  File "C:\Python23\lib\socket.py", line 241, in flush
    self._sock.sendall(buffer)
error: (10054, 'Connection reset by peer')
----------------------------------------

Sometimes it is an error like the following:

----------------------------------------
Exception happened during processing of request from ('otherip', 4003)
Traceback (most recent call last):
  File "C:\Python23\lib\SocketServer.py", line 463, in process_request_thread
    self.finish_request(request, client_address)
  File "C:\Python23\lib\SocketServer.py", line 254, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "C:\Python23\lib\SocketServer.py", line 521, in __init__
    self.handle()
  File "C:\Python23\lib\BaseHTTPServer.py", line 324, in handle
    self.handle_one_request()
  File "C:\Python23\lib\BaseHTTPServer.py", line 307, in handle_one_request
    self.raw_requestline = self.rfile.readline()
  File "C:\Python23\lib\socket.py", line 338, in readline
    data = self._sock.recv(self._rbufsize)
error: (10054, 'Connection reset by peer')
----------------------------------------

We upgraded to 0.9.3 recently but still have this problem (we started at 0.8.4 and had the same problem then, and in all versions in between).

Change History (1)

comment:1 by Christian Boos, 16 years ago

Description: modified (diff)
Milestone: 0.9.4
Owner: changed from Jonas Borgström to Christian Boos
Status: newassigned

When you say tracd "crash", you actually means it only produces the above error in the log, or do you really mean that the server process dies (segfaults?)

If it's only about the errors, it's not that problematic. This error is caused by the clients (i.e. browsers) interrupting their requests, either because the user presses the Stop button, or … hits Reload in rapid succession!

We should however filter out such errors… We already do it for error code 32 (EPIPE on Unix), 10053 (WSAECONNABORTED on Windows), so we should do it for 10054 (WSAECONNRESET on Windows) as well.

Note: See TracTickets for help on using tickets.