memory_cache_http_server.py does not handle socket errors
Reported by
rkuk...@yandex-team.ru,
Sep 14
|
|||
Issue description
UserAgent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.103 YaBrowser/18.7.0.2695 Yowser/2.5 Safari/537.36
Steps to reproduce the problem:
The problem appears for example in media.tough_video_cases
What is the expected behavior?
What went wrong?
There are some Telemetry issues containing stack traces like this:
[ RUN ] video.html?src=garden2_10s.ogv
Traceback (most recent call last):
File "C:\b\depot_tools\python276_bin\lib\SocketServer.py", line 593, in process_request_thread
self.finish_request(request, client_address)
File "C:\b\depot_tools\python276_bin\lib\SocketServer.py", line 334, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "C:\b\depot_tools\python276_bin\lib\SocketServer.py", line 651, in __init__
self.finish()
File "C:\b\depot_tools\python276_bin\lib\SocketServer.py", line 710, in finish
self.wfile.close()
File "C:\b\depot_tools\python276_bin\lib\socket.py", line 279, in close
self.flush()
File "C:\b\depot_tools\python276_bin\lib\socket.py", line 303, in flush
self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 10053] An established connection was aborted by the software in your host machine
They are unrelated to these issues and they are distracting.
Moreover, I noticed _MemoryCacheHTTPServerImpl stops handling requests on rare occasions (I can't reproduce this on chrome, it happens in our forked tests) and for some reason handling errors fixes the problem.
Did this work before? N/A
Chrome version: dev Channel: n/a
OS Version: 10.0
Flash Version: Shockwave Flash 31.0 r0
,
Nov 15
The following revision refers to this bug: https://chromium.googlesource.com/catapult/+/d098799efb325031b0a231cf4774955b086ab6e7 commit d098799efb325031b0a231cf4774955b086ab6e7 Author: Sergey Abbakumov <sabbakumov@yandex-team.ru> Date: Thu Nov 15 04:27:31 2018 Fix race condition while handling errors We override handle_error method of our base TCPServer class. It does the same but uses thread-safe logging.error instead of print, because SocketServer.ThreadingMixIn runs network operations on multiple threads and there's a race condition on stdout. Bug=chromium:884155 Change-Id: Ie02c8e82419861bcf7cde461287076df216d41d0 Reviewed-on: https://chromium-review.googlesource.com/c/1282583 Reviewed-by: Ned Nguyen <nednguyen@google.com> Commit-Queue: Ned Nguyen <nednguyen@google.com> [modify] https://crrev.com/d098799efb325031b0a231cf4774955b086ab6e7/telemetry/telemetry/core/memory_cache_http_server.py
,
Jan 16
(6 days ago)
,
Jan 16
(6 days ago)
|
|||
►
Sign in to add a comment |
|||
Comment 1 by eroman@chromium.org
, Sep 14