Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Issue 1900733002: Fixing a Dr. Memory hang in the remoting_unittests (Closed)

Created:
4 years, 8 months ago by joedow
Modified:
4 years, 8 months ago
Reviewers:
Sergey Ulanov
CC:
chromium-reviews, chromoting-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fixing a Dr. Memory hang in the remoting_unittests There were two problems that needed to be addressed. One was a failure that occurred if a stream writer wrote the message type and payload in separate write actions (timing problem) the second was a test bug in the MultipleMessages test which did not check for success/failure for each loop iteration. The first problem was a timing issue where the reader might fail if the message payload was written separately from the type and was not written quickly. This was not repro'd on normal builds but we see it on the Dr. Memory bot since operations are slowed down as a result of the build flags used for the tool. I fixed this problem by reading in the type and payload separately. The second problem was in the unit test itself. If an error occurred in the Multiple messages test, the loop would write to the end of the pipe and wait (forever) for an answer. We now verify the message was written after every iteration. BUG=603357 Committed: https://crrev.com/35b79b13f17c4429107bef826c8b773f0c9b2336 Cr-Commit-Position: refs/heads/master@{#388307}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : Fixing the formatting for the changed files. #

Total comments: 2

Patch Set 4 : Updating the logic used for reading from the stream. #

Patch Set 5 : Fixing up a callsite where we passed the message string #

Total comments: 6

Patch Set 6 : Addressing CR feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+80 lines, -24 lines) Patch
M remoting/host/security_key/remote_security_key_message_reader_impl.h View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M remoting/host/security_key/remote_security_key_message_reader_impl.cc View 1 2 3 4 5 2 chunks +30 lines, -19 lines 0 comments Download
M remoting/host/security_key/remote_security_key_message_reader_impl_unittest.cc View 1 2 3 2 chunks +46 lines, -5 lines 0 comments Download

Messages

Total messages: 13 (4 generated)
joedow
This change updates some behavior and fixes a unit test problem that were causing issues ...
4 years, 8 months ago (2016-04-18 18:30:33 UTC) #2
joedow
This change updates some behavior and fixes a unit test problem that were causing issues ...
4 years, 8 months ago (2016-04-18 18:30:34 UTC) #3
Sergey Ulanov
https://codereview.chromium.org/1900733002/diff/40001/remoting/host/security_key/remote_security_key_message_reader_impl.cc File remoting/host/security_key/remote_security_key_message_reader_impl.cc (right): https://codereview.chromium.org/1900733002/diff/40001/remoting/host/security_key/remote_security_key_message_reader_impl.cc#newcode102 remoting/host/security_key/remote_security_key_message_reader_impl.cc:102: read_stream_.ReadAtCurrentPos(&message_data[1], remaining_bytes); I don't understand why you need to ...
4 years, 8 months ago (2016-04-18 18:57:32 UTC) #4
joedow
Great feedback, updated Cl based on it. https://codereview.chromium.org/1900733002/diff/40001/remoting/host/security_key/remote_security_key_message_reader_impl.cc File remoting/host/security_key/remote_security_key_message_reader_impl.cc (right): https://codereview.chromium.org/1900733002/diff/40001/remoting/host/security_key/remote_security_key_message_reader_impl.cc#newcode102 remoting/host/security_key/remote_security_key_message_reader_impl.cc:102: read_stream_.ReadAtCurrentPos(&message_data[1], remaining_bytes); ...
4 years, 8 months ago (2016-04-19 17:28:10 UTC) #5
Sergey Ulanov
lgtm when my comments are addressed https://codereview.chromium.org/1900733002/diff/80001/remoting/host/security_key/remote_security_key_message_reader_impl.cc File remoting/host/security_key/remote_security_key_message_reader_impl.cc (right): https://codereview.chromium.org/1900733002/diff/80001/remoting/host/security_key/remote_security_key_message_reader_impl.cc#newcode102 remoting/host/security_key/remote_security_key_message_reader_impl.cc:102: uint32_t bytes_to_read) { ...
4 years, 8 months ago (2016-04-19 17:36:40 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1900733002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1900733002/100001
4 years, 8 months ago (2016-04-19 21:07:40 UTC) #9
joedow
Thanks! https://codereview.chromium.org/1900733002/diff/80001/remoting/host/security_key/remote_security_key_message_reader_impl.cc File remoting/host/security_key/remote_security_key_message_reader_impl.cc (right): https://codereview.chromium.org/1900733002/diff/80001/remoting/host/security_key/remote_security_key_message_reader_impl.cc#newcode102 remoting/host/security_key/remote_security_key_message_reader_impl.cc:102: uint32_t bytes_to_read) { On 2016/04/19 17:36:39, Sergey Ulanov ...
4 years, 8 months ago (2016-04-19 21:07:56 UTC) #10
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 8 months ago (2016-04-19 21:11:51 UTC) #11
commit-bot: I haz the power
4 years, 8 months ago (2016-04-22 19:16:17 UTC) #13
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/35b79b13f17c4429107bef826c8b773f0c9b2336
Cr-Commit-Position: refs/heads/master@{#388307}

Powered by Google App Engine
This is Rietveld 408576698