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

Issue 580163003: DCHECK -> CHECK for UDPSocket Read/Write calls when previouse in progress. (Closed)

Created:
6 years, 3 months ago by Vitaly Buka (NO REVIEWS)
Modified:
6 years, 2 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

DCHECK -> CHECK for UDPSocket Read/Write calls when previous in progress. Crashes in net::AssertEventNotSignaled() are hard reproduce, but looks like this is the primary reason. With crash on CHECK(..._callback_.is_null()) we could identify incorrect code. BUG=415753 Committed: https://crrev.com/17ee0af873389eba94ebe7629a44045ecf0b681a Cr-Commit-Position: refs/heads/master@{#296234}

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -4 lines) Patch
M net/udp/udp_socket_libevent.cc View 2 chunks +2 lines, -2 lines 1 comment Download
M net/udp/udp_socket_win.cc View 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 21 (3 generated)
Vitaly Buka (NO REVIEWS)
6 years, 3 months ago (2014-09-19 06:46:35 UTC) #2
Sergey Ulanov
For this particular crash the bug is obviously in MDnsConnection::SocketHandler. MDnsConnection::SocketHandler::Send() just calls Socket::Send() but ...
6 years, 3 months ago (2014-09-19 20:09:09 UTC) #3
Vitaly Buka (NO REVIEWS)
That's true. CHnage already on review https://codereview.chromium.org/581813004/ Would not be just more obvious to crash ...
6 years, 3 months ago (2014-09-19 20:11:26 UTC) #4
Vitaly Buka (NO REVIEWS)
I am asking because I already noticed similar crashes, but blamed issue like https://code.google.com/p/chromium/issues/detail?id=121085, until ...
6 years, 3 months ago (2014-09-19 20:16:25 UTC) #5
Sergey Ulanov
On 2014/09/19 20:16:25, Vitaly Buka wrote: > I am asking because I already noticed similar ...
6 years, 3 months ago (2014-09-20 00:36:26 UTC) #6
Vitaly Buka (NO REVIEWS)
6 years, 3 months ago (2014-09-22 19:19:14 UTC) #8
Ryan Hamilton
Is this CL necessary if https://codereview.chromium.org/581813004/ lands?
6 years, 3 months ago (2014-09-22 20:52:46 UTC) #9
Vitaly Buka (NO REVIEWS)
This CL would just help to have more meaningful crashes for bugs like this. mDns ...
6 years, 3 months ago (2014-09-22 23:00:40 UTC) #10
wtc
Patch set 1 LGTM. This change seems reasonable. Note that I am no longer a ...
6 years, 3 months ago (2014-09-23 14:05:19 UTC) #11
Ryan Hamilton
lgtm
6 years, 3 months ago (2014-09-23 14:11:32 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/580163003/1
6 years, 3 months ago (2014-09-23 17:59:15 UTC) #14
commit-bot: I haz the power
Committed patchset #1 (id:1) as d6dc083f1e0fa63176541673020a887cd528eaba
6 years, 3 months ago (2014-09-23 20:59:21 UTC) #15
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/17ee0af873389eba94ebe7629a44045ecf0b681a Cr-Commit-Position: refs/heads/master@{#296234}
6 years, 3 months ago (2014-09-23 21:00:17 UTC) #16
wtc
https://codereview.chromium.org/580163003/diff/1/net/udp/udp_socket_libevent.cc File net/udp/udp_socket_libevent.cc (right): https://codereview.chromium.org/580163003/diff/1/net/udp/udp_socket_libevent.cc#newcode173 net/udp/udp_socket_libevent.cc:173: CHECK(read_callback_.is_null()); Ryan: I think it would be better to ...
6 years, 3 months ago (2014-09-24 15:10:07 UTC) #17
Ryan Hamilton
Sure, that'd probably be better... Though that wouldn't help track down the places where people ...
6 years, 3 months ago (2014-09-24 15:40:19 UTC) #18
Vitaly Buka (NO REVIEWS)
On 2014/09/24 15:40:19, Ryan Hamilton wrote: > Sure, that'd probably be better... Though that wouldn't ...
6 years, 3 months ago (2014-09-24 16:59:13 UTC) #19
Vitaly Buka (NO REVIEWS)
On 2014/09/24 15:10:07, wtc wrote: > https://codereview.chromium.org/580163003/diff/1/net/udp/udp_socket_libevent.cc > File net/udp/udp_socket_libevent.cc (right): > > https://codereview.chromium.org/580163003/diff/1/net/udp/udp_socket_libevent.cc#newcode173 > ...
6 years, 2 months ago (2014-09-24 22:20:20 UTC) #20
Ryan Hamilton
6 years, 2 months ago (2014-09-25 03:05:13 UTC) #21
Message was sent while issue was closed.
On 2014/09/24 22:20:20, Vitaly Buka wrote:
> On 2014/09/24 15:10:07, wtc wrote:
> >
>
https://codereview.chromium.org/580163003/diff/1/net/udp/udp_socket_libevent.cc
> > File net/udp/udp_socket_libevent.cc (right):
> > 
> >
>
https://codereview.chromium.org/580163003/diff/1/net/udp/udp_socket_libevent....
> > net/udp/udp_socket_libevent.cc:173: CHECK(read_callback_.is_null());
> > 
> > Ryan: I think it would be better to add a new net error
> > code, say ERR_BUSY or ERR_IN_USE, and make these functions
> > return that error code rather than crashing with a CHECK
> > failure:
> > 
> >   if (!read_callback_.is_null())
> >     return ERR_BUSY;
> 
> maybe it's better to move QUEUE logic inside sockets
> looks like all clients should implements something like this?

I don't think that is a good idea because it leads to potentially infinite
buffering within the socket, which consumes memory, and leads to non-performant
code.

Powered by Google App Engine
This is Rietveld 408576698