|
|
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. |
DescriptionDCHECK -> 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
Messages
Total messages: 21 (3 generated)
vitalybuka@chromium.org changed reviewers: + sergeyu@chromium.org, wtc@chromium.org
For this particular crash the bug is obviously in MDnsConnection::SocketHandler. MDnsConnection::SocketHandler::Send() just calls Socket::Send() but there is nothing in there to make sure that the previous Send() has completed. net::Socket does not support multiple concurrent Send() requests.
That's true. CHnage already on review https://codereview.chromium.org/581813004/ Would not be just more obvious to crash on this CHECK and not on event? On 2014/09/19 20:09:09, Sergey Ulanov wrote: > For this particular crash the bug is obviously in MDnsConnection::SocketHandler. > MDnsConnection::SocketHandler::Send() just calls Socket::Send() but there is > nothing in there to make sure that the previous Send() has completed. > net::Socket does not support multiple concurrent Send() requests.
I am asking because I already noticed similar crashes, but blamed issue like https://code.google.com/p/chromium/issues/detail?id=121085, until recently I realized that the event is reset in posted task. On 2014/09/19 20:11:26, Vitaly Buka wrote: > That's true. CHnage already on review https://codereview.chromium.org/581813004/ > > Would not be just more obvious to crash on this CHECK and not on event? > > On 2014/09/19 20:09:09, Sergey Ulanov wrote: > > For this particular crash the bug is obviously in > MDnsConnection::SocketHandler. > > MDnsConnection::SocketHandler::Send() just calls Socket::Send() but there is > > nothing in there to make sure that the previous Send() has completed. > > net::Socket does not support multiple concurrent Send() requests.
On 2014/09/19 20:16:25, Vitaly Buka wrote: > I am asking because I already noticed similar crashes, but blamed issue like > https://code.google.com/p/chromium/issues/detail?id=121085, until recently I > realized that the event is reset in posted task. I see. Makes sense. LGTM
vitalybuka@chromium.org changed reviewers: + rch@chromium.org
Is this CL necessary if https://codereview.chromium.org/581813004/ lands?
This CL would just help to have more meaningful crashes for bugs like this. mDns is the top source of such crashes today but is not the only one. On 2014/09/22 20:52:46, Ryan Hamilton wrote: > Is this CL necessary if https://codereview.chromium.org/581813004/ lands?
Patch set 1 LGTM. This change seems reasonable. Note that I am no longer a net owner, so you should wait for Ryan's approval. The CL's description has a spelling error: indentify
lgtm
The CQ bit was checked by vitalybuka@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/580163003/1
Message was sent while issue was closed.
Committed patchset #1 (id:1) as d6dc083f1e0fa63176541673020a887cd528eaba
Message was sent while issue was closed.
Patchset 1 (id:??) landed as https://crrev.com/17ee0af873389eba94ebe7629a44045ecf0b681a Cr-Commit-Position: refs/heads/master@{#296234}
Message was sent while issue was closed.
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;
Sure, that'd probably be better... Though that wouldn't help track down the places where people are reading while reading. But not crashing is always nice :> To unsubscribe from this group and stop receiving emails from it, send an email to chromium-reviews+unsubscribe@chromium.org.
Message was sent while issue was closed.
On 2014/09/24 15:40:19, Ryan Hamilton wrote: > Sure, that'd probably be better... Though that wouldn't help track down the > places where people are reading while reading. But not crashing is always > nice :> > > To unsubscribe from this group and stop receiving emails from it, send an email > to mailto:chromium-reviews+unsubscribe@chromium.org. This case was hard to reproduce for mDns. Without crashing in prod we'd probably didn't notice that.
Message was sent while issue was closed.
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?
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. |