mirror of
https://github.com/chromium/crashpad.git
synced 2025-03-09 22:26:06 +00:00
end_to_end_test.py was producing these error messages 6 times (32-bit x86) and 7 times (x86_64) per run: [pid:tid:yyyymmdd,hhmmss.mmm:ERROR file_io.cc:89] ReadExactly: expected 36, observed 0 These messages were being produced by crashpad_handler, in the LoggingReadFileExactly() call in ExceptionHandlerServer::ServiceClientConnection(). sizeof(ClientToServerMessage) is 36. crashpad_handler believed that a client was connecting, but the client sent no data. This was tracked down to the use of os.path.exists() in end_to_end_test.py to wait for crashpad_handler’s named pipe to be created. Checking named pipe existence in this way appeared to be a client connecting to the the pipe server in crashpad_handler, although of course no real client was connecting and no message was forthcoming. I found that running “dir” on the named pipe’s path produced the same result. Using WaitNamedPipe() is an alternative that can be used to signal when the named pipe’s path exists. Furthermore, it tests more than mere creation, it indicates that the pipe server has become ready to service clients. That’s not necessary in this case as proper clients already need to deal with this on their own, but checking it in end_to_end_test.py should be harmless. Test: end_to_end_test.py Change-Id: Ida29a3d2325368f58930cdf8fb053449f621ea52 Reviewed-on: https://chromium-review.googlesource.com/703276 Reviewed-by: Leonard Mosescu <mosescu@chromium.org>