Backed out changeset 2161b075ce64 (bug 1521304) for high frequency mochitest failure, a=backout
authorRazvan Maries <rmaries@mozilla.com>
Tue, 12 Feb 2019 21:58:27 +0200
changeset 458704 47048ef82b50
parent 458703 c849fb69e2e7
child 458726 3a58833843ab
child 458805 65b2066efbeb
push id35545
push userrmaries@mozilla.com
push dateTue, 12 Feb 2019 19:59:04 +0000
treeherdermozilla-central@47048ef82b50 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1521304
milestone67.0a1
backs out2161b075ce64
first release with
nightly linux32
47048ef82b50 / 67.0a1 / 20190212195904 / files
nightly linux64
47048ef82b50 / 67.0a1 / 20190212195904 / files
nightly mac
47048ef82b50 / 67.0a1 / 20190212195904 / files
nightly win32
47048ef82b50 / 67.0a1 / 20190212195904 / files
nightly win64
47048ef82b50 / 67.0a1 / 20190212195904 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 2161b075ce64 (bug 1521304) for high frequency mochitest failure, a=backout
netwerk/sctp/datachannel/DataChannel.cpp
--- a/netwerk/sctp/datachannel/DataChannel.cpp
+++ b/netwerk/sctp/datachannel/DataChannel.cpp
@@ -260,17 +260,16 @@ static DataChannelConnection *GetConnect
 
   return connection;
 }
 
 // called when the buffer empties to the threshold value
 static int threshold_event(struct socket *sock, uint32_t sb_free) {
   DataChannelConnection *connection = GetConnectionFromSocket(sock);
   if (connection) {
-    MutexAutoLock lock(connection->mLock);
     connection->SendDeferredMessages();
   } else {
     LOG(("Can't find connection for socket %p", sock));
   }
   return 0;
 }
 
 static void debug_printf(const char *format, ...) {
@@ -837,16 +836,17 @@ void DataChannelConnection::SctpDtlsInpu
 
     if ((buf = usrsctp_dumppacket((void *)packet.data(), packet.len(),
                                   SCTP_DUMP_INBOUND)) != nullptr) {
       SCTP_LOG(("%s", buf));
       usrsctp_freedumpbuffer(buf);
     }
   }
   // Pass the data to SCTP
+  MutexAutoLock lock(mLock);
   usrsctp_conninput(static_cast<void *>(this), packet.data(), packet.len(), 0);
 }
 
 void DataChannelConnection::SendPacket(nsAutoPtr<MediaPacket> packet) {
   // LOG(("%p: SCTP/DTLS sent %ld bytes", this, len));
   if (!mTransportId.empty() && mTransportHandler) {
     mTransportHandler->SendPacket(mTransportId, std::move(*packet));
   }
@@ -2308,17 +2308,17 @@ void DataChannelConnection::HandleNotifi
 int DataChannelConnection::ReceiveCallback(struct socket *sock, void *data,
                                            size_t datalen,
                                            struct sctp_rcvinfo rcv, int flags) {
   ASSERT_WEBRTC(!NS_IsMainThread());
 
   if (!data) {
     LOG(("ReceiveCallback: SCTP has finished shutting down"));
   } else {
-    MutexAutoLock lock(mLock);
+    mLock.AssertCurrentThreadOwns();
     if (flags & MSG_NOTIFICATION) {
       HandleNotification(static_cast<union sctp_notification *>(data), datalen);
     } else {
       HandleMessage(data, datalen, ntohl(rcv.rcv_ppid), rcv.rcv_sid, flags);
     }
   }
   // sctp allocates 'data' with malloc(), and expects the receiver to free
   // it (presumably with free).