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 458794 47048ef82b50e3130220d86b09f5addf0b58906e
parent 458747 c849fb69e2e79399567550e19030876d695cb762
child 458795 65b2066efbebe03adc4f8b23e414d85299fc5467
child 458851 3a58833843ab6272d9d7b4331a81ec5c529a047c
push id78029
push userrmaries@mozilla.com
push dateTue, 12 Feb 2019 21:58:24 +0000
treeherderautoland@65b2066efbeb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1521304
milestone67.0a1
backs out2161b075ce64dd9455574f1342c735bf1c631770
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).