W3C home > Mailing lists > Public > public-webrtc-logs@w3.org > April 2020

[webrtc-pc] onnegotiationneeded still races with onmessage under stress (#2508)

From: Jan-Ivar Bruaroey via GitHub <sysbot+gh@w3.org>
Date: Tue, 07 Apr 2020 23:42:36 +0000
To: public-webrtc-logs@w3.org
Message-ID: <issues.opened-596214769-1586302954-sysbot+gh@w3.org>
jan-ivar has just created a new issue for https://github.com/w3c/webrtc-pc:

== onnegotiationneeded still races with onmessage under stress ==
New perfect negotiation WPT tests reveal ONN may still race with onmessage under stress.
We observe ONN firing _during_ `onmessage`. Not POLA. For details see [bug 1628139](https://bugzil.la/1628139).

TL;DR: We specifically chain ONN now to avoid this. The idea was that as long as `onmessage` checks ONN hasn't started (`if (!makingOffer)`) and then immediately calls SRD(offer)—which it must anyway because candidates—then ONN can't interrupt.

But we find that it can when the [updateNegotiationNeeded](https://w3c.github.io/webrtc-pc/#dfn-update-the-negotiation-needed-flag) algorithm is already on the chain. Under stress (e.g. from lots of modification methods), lots of things may be on the chain.

**Proposal:** Only  fire ONN when the chain is/becomes empty.

Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/2508 using your GitHub account
Received on Tuesday, 7 April 2020 23:42:39 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 6 May 2023 21:19:50 UTC