Closed Bug 1758468 Opened 2 years ago Closed 2 years ago

MIDI port IDs are not stable (regardless of origin)

Categories

(Core :: DOM: Device Interfaces, defect, P2)

defect

Tracking

()

RESOLVED FIXED
101 Branch
Tracking Status
firefox100 --- fixed
firefox101 --- fixed

People

(Reporter: padenot, Assigned: gsvelto)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

They are stable only in the same process.

Assignee: nobody → padenot
Blocks: webmidi
Severity: -- → S3
Priority: -- → P2
Blocks: 1748641

Taking this, will implement using MediaManager::AnonymizeId() which should provide stable & anonymous IDs.

Assignee: padenot → gsvelto
Status: NEW → ASSIGNED

The change here is going to be a bit more complicated than I thought: I based everything on the assumption that we'd have a 1-on-1 mapping between the midir ports (i.e. the actual ones) and the child ports and they were randomly generated every time. If we hash the ID per origin then the same midir port will appear with different IDs in different child ports (one per origin) so I need to handle the child-id-to-midir-id mapping too.

Alright, the patches needed another spin because some tests change the origin and thus the IDs as seen in the tests. To work around this problem I removed the hard-coded IDs in the test and added a helper function which computes the IDs like the platform implementation does. This way we can know the IDs of the fake ports beforehand. If this run comes out green this should be ready to land.

As a follow-up it might be worth refactoring this code given the changed assumptions. The port info structures don't need the ID anymore (since it's computed on the fly) and the midir-to-gecko mapping can be done with 64-bit integers instead of strings to tighten the code. Since these are changes that would touch many unrelated parts I didn't do them here as they'd be out of scope and would increase the risk of regressions.

Pushed by gsvelto@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c0eb987d0f76
Factor out the function to generate stable, anonymous IDs r=padenot
https://hg.mozilla.org/integration/autoland/rev/cfba299e5067
Use stable, anonymous IDs for Web MIDI ports r=padenot

Backed out for causing web midi related mochitest failures.

Push with failures: https://treeherder.mozilla.org/jobs?repo=autoland&resultStatus=testfailed%2Cbusted%2Cexception%2Cretry%2Cusercancel&revision=cfba299e5067a4eab3f3b982374b0770970a3401&selectedTaskRun=XSn1IG-_QFWBTMvMSO2Usg.0

Failure logs: https://treeherder.mozilla.org/logviewer?job_id=374107757&repo=autoland
https://treeherder.mozilla.org/logviewer?job_id=374107542&repo=autoland
https://treeherder.mozilla.org/logviewer?job_id=374108415&repo=autoland

Backout link: https://hg.mozilla.org/integration/autoland/rev/c23b36e856dcbbd1f3c490e4201ecfda6400977f

[task 2022-04-11T18:18:51.223Z] 18:18:51     INFO - GECKO(2652) | Assertion failure: aNewLength <= base_string_type::mLength (Truncate cannot make string longer), at /builds/worker/workspace/obj-build/dist/include/nsTSubstring.h:856
[task 2022-04-11T18:18:51.223Z] 18:18:51     INFO - GECKO(2652) | #01: mozilla::dom::MIDIPortChild::GenerateStableId(nsTSubstring<char> const&) [dom/midi/MIDIPortChild.cpp:72]
[task 2022-04-11T18:18:51.224Z] 18:18:51     INFO - GECKO(2652) | #02: mozilla::dom::MIDIPort::Initialize(mozilla::dom::MIDIPortInfo const&, bool) [dom/midi/MIDIPort.cpp:78]
[task 2022-04-11T18:18:51.224Z] 18:18:51     INFO - GECKO(2652) | Assertion failure: aNewLength <= base_string_type::mLength (Truncate cannot make string longer), at /builds/worker/workspace/obj-build/dist/include/nsTSubstring.h:856
[task 2022-04-11T18:18:51.224Z] 18:18:51     INFO - GECKO(2652) | #03: mozilla::dom::MIDIAccess::MaybeCreateMIDIPort(mozilla::dom::MIDIPortInfo const&, mozilla::ErrorResult&) [dom/midi/MIDIAccess.cpp:153]
[task 2022-04-11T18:18:51.225Z] 18:18:51     INFO - GECKO(2652) | #04: mozilla::dom::MIDIAccess::Notify(mozilla::dom::MIDIPortList const&) [dom/midi/MIDIAccess.cpp:212]
[task 2022-04-11T18:18:51.225Z] 18:18:51     INFO - GECKO(2652) | #05: mozilla::dom::MIDIAccessManager::Update(mozilla::dom::MIDIPortList const&) [dom/midi/MIDIAccessManager.cpp:139]
[task 2022-04-11T18:18:51.226Z] 18:18:51     INFO - GECKO(2652) | #06: mozilla::dom::MIDIManagerChild::RecvMIDIPortListUpdate(mozilla::dom::MIDIPortList const&) [dom/midi/MIDIManagerChild.cpp:23]
[task 2022-04-11T18:18:51.226Z] 18:18:51     INFO - GECKO(2652) | #07: mozilla::dom::PMIDIManagerChild::OnMessageReceived(IPC::Message const&) [s3:gecko-generated-sources:2c180fcb70f1f55cccbcb544692bd08775dd691b9f42224b01e45cde748490c1602f34dc3032065f1e8f7fe74b626c0ee8c0dd70610340a1d24119ff8ba0c3e1/ipc/ipdl/PMIDIManagerChild.cpp::155]
[task 2022-04-11T18:18:51.227Z] 18:18:51     INFO - GECKO(2652) | #01: mozilla::dom::MIDIPortChild::GenerateStableId(nsTSubstring<char> const&) [dom/midi/MIDIPortChild.cpp:72]
[task 2022-04-11T18:18:51.227Z] 18:18:51     INFO - GECKO(2652) | #08: mozilla::ipc::PBackgroundChild::OnMessageReceived(IPC::Message const&) [s3:gecko-generated-sources:ffbf2209f44e647a3e074f6d49a161ce1a22cf827901b88b5099f3e68e72786ba64829429efbbd8479bca109d08ef630ef822994e51ea9e147d8a5c491c53d30/ipc/ipdl/PBackgroundChild.cpp::6518]
[task 2022-04-11T18:18:51.228Z] 18:18:51     INFO - GECKO(2652) | #09: mozilla::ipc::MessageChannel::DispatchAsyncMessage(mozilla::ipc::ActorLifecycleProxy*, IPC::Message const&) [ipc/glue/MessageChannel.cpp:1707]
[task 2022-04-11T18:18:51.228Z] 18:18:51     INFO - GECKO(2652) | #02: mozilla::dom::MIDIPort::Initialize(mozilla::dom::MIDIPortInfo const&, bool) [dom/midi/MIDIPort.cpp:78]
[task 2022-04-11T18:18:51.229Z] 18:18:51     INFO - GECKO(2652) | #10: mozilla::ipc::MessageChannel::DispatchMessage(mozilla::ipc::ActorLifecycleProxy*, IPC::Message&&) [ipc/glue/MessageChannel.cpp:1632]
[task 2022-04-11T18:18:51.229Z] 18:18:51     INFO - GECKO(2652) | #03: mozilla::dom::MIDIAccess::MaybeCreateMIDIPort(mozilla::dom::MIDIPortInfo const&, mozilla::ErrorResult&) [dom/midi/MIDIAccess.cpp:153]
[task 2022-04-11T18:18:51.230Z] 18:18:51     INFO - GECKO(2652) | #11: mozilla::ipc::MessageChannel::RunMessage(mozilla::ipc::ActorLifecycleProxy*, mozilla::ipc::MessageChannel::MessageTask&) [ipc/glue/MessageChannel.cpp:1493]
[task 2022-04-11T18:18:51.230Z] 18:18:51     INFO - GECKO(2652) | #04: mozilla::dom::MIDIAccess::Notify(mozilla::dom::MIDIPortList const&) [dom/midi/MIDIAccess.cpp:212]
[task 2022-04-11T18:18:51.231Z] 18:18:51     INFO - GECKO(2652) | #12: mozilla::ipc::MessageChannel::MessageTask::Run() [ipc/glue/MessageChannel.cpp:1530]
[task 2022-04-11T18:18:51.231Z] 18:18:51     INFO - GECKO(2652) | #05: mozilla::dom::MIDIAccessManager::Update(mozilla::dom::MIDIPortList const&) [dom/midi/MIDIAccessManager.cpp:139]
[task 2022-04-11T18:18:51.231Z] 18:18:51     INFO - GECKO(2652) | #13: mozilla::RunnableTask::Run() [xpcom/threads/TaskController.cpp:468]
[task 2022-04-11T18:18:51.232Z] 18:18:51     INFO - GECKO(2652) | #06: mozilla::dom::MIDIManagerChild::RecvMIDIPortListUpdate(mozilla::dom::MIDIPortList const&) [dom/midi/MIDIManagerChild.cpp:23]
[task 2022-04-11T18:18:51.232Z] 18:18:51     INFO - GECKO(2652) | #14: mozilla::TaskController::DoExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) [xpcom/threads/TaskController.cpp:780]
[task 2022-04-11T18:18:51.233Z] 18:18:51     INFO - GECKO(2652) | #15: mozilla::TaskController::ExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) [xpcom/threads/TaskController.cpp:612]
[task 2022-04-11T18:18:51.234Z] 18:18:51     INFO - GECKO(2652) | #07: mozilla::dom::PMIDIManagerChild::OnMessageReceived(IPC::Message const&) [s3:gecko-generated-sources:2c180fcb70f1f55cccbcb544692bd08775dd691b9f42224b01e45cde748490c1602f34dc3032065f1e8f7fe74b626c0ee8c0dd70610340a1d24119ff8ba0c3e1/ipc/ipdl/PMIDIManagerChild.cpp::155]
[task 2022-04-11T18:18:51.234Z] 18:18:51     INFO - GECKO(2652) | #16: mozilla::TaskController::ProcessPendingMTTask(bool) [xpcom/threads/TaskController.cpp:390]
[task 2022-04-11T18:18:51.235Z] 18:18:51     INFO - GECKO(2652) | #08: mozilla::ipc::PBackgroundChild::OnMessageReceived(IPC::Message const&) [s3:gecko-generated-sources:ffbf2209f44e647a3e074f6d49a161ce1a22cf827901b88b5099f3e68e72786ba64829429efbbd8479bca109d08ef630ef822994e51ea9e147d8a5c491c53d30/ipc/ipdl/PBackgroundChild.cpp::6518]
[task 2022-04-11T18:18:51.235Z] 18:18:51     INFO - GECKO(2652) | #09: mozilla::ipc::MessageChannel::DispatchAsyncMessage(mozilla::ipc::ActorLifecycleProxy*, IPC::Message const&) [ipc/glue/MessageChannel.cpp:1707]
[task 2022-04-11T18:18:51.235Z] 18:18:51     INFO - GECKO(2652) | #17: mozilla::detail::RunnableFunction<mozilla::TaskController::InitializeInternal()::$_0>::Run() [xpcom/threads/nsThreadUtils.h:532]
[task 2022-04-11T18:18:51.236Z] 18:18:51     INFO - GECKO(2652) | #10: mozilla::ipc::MessageChannel::DispatchMessage(mozilla::ipc::ActorLifecycleProxy*, IPC::Message&&) [ipc/glue/MessageChannel.cpp:1632]
[task 2022-04-11T18:18:51.236Z] 18:18:51     INFO - GECKO(2652) | #18: nsThread::ProcessNextEvent(bool, bool*) [xpcom/threads/nsThread.cpp:1191]
[task 2022-04-11T18:18:51.237Z] 18:18:51     INFO - GECKO(2652) | #11: mozilla::ipc::MessageChannel::RunMessage(mozilla::ipc::ActorLifecycleProxy*, mozilla::ipc::MessageChannel::MessageTask&) [ipc/glue/MessageChannel.cpp:1493]
[task 2022-04-11T18:18:51.237Z] 18:18:51     INFO - GECKO(2652) | #19: NS_ProcessNextEvent(nsIThread*, bool) [xpcom/threads/nsThreadUtils.cpp:465]
[task 2022-04-11T18:18:51.238Z] 18:18:51     INFO - GECKO(2652) | #12: mozilla::ipc::MessageChannel::MessageTask::Run() [ipc/glue/MessageChannel.cpp:1530]
[task 2022-04-11T18:18:51.238Z] 18:18:51     INFO - GECKO(2652) | #20: mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) [ipc/glue/MessagePump.cpp:85]
[task 2022-04-11T18:18:51.238Z] 18:18:51     INFO - GECKO(2652) | #13: mozilla::RunnableTask::Run() [xpcom/threads/TaskController.cpp:468]
[task 2022-04-11T18:18:51.239Z] 18:18:51     INFO - GECKO(2652) | #21: MessageLoop::Run() [ipc/chromium/src/base/message_loop.cc:356]
[task 2022-04-11T18:18:51.239Z] 18:18:51     INFO - GECKO(2652) | #14: mozilla::TaskController::DoExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) [xpcom/threads/TaskController.cpp:780]
[task 2022-04-11T18:18:51.240Z] 18:18:51     INFO - GECKO(2652) | #22: nsBaseAppShell::Run() [widget/nsBaseAppShell.cpp:139]
[task 2022-04-11T18:18:51.240Z] 18:18:51     INFO - GECKO(2652) | #15: mozilla::TaskController::ExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) [xpcom/threads/TaskController.cpp:612]
[task 2022-04-11T18:18:51.240Z] 18:18:51     INFO - GECKO(2652) | #23: nsAppShell::Run() [widget/cocoa/nsAppShell.mm:803]
[task 2022-04-11T18:18:51.241Z] 18:18:51     INFO - GECKO(2652) | #16: mozilla::TaskController::ProcessPendingMTTask(bool) [xpcom/threads/TaskController.cpp:390]
[task 2022-04-11T18:18:51.241Z] 18:18:51     INFO - GECKO(2652) | #24: XRE_RunAppShell() [toolkit/xre/nsEmbedFunctions.cpp:870]
[task 2022-04-11T18:18:51.242Z] 18:18:51     INFO - GECKO(2652) | #17: mozilla::detail::RunnableFunction<mozilla::TaskController::InitializeInternal()::$_0>::Run() [xpcom/threads/nsThreadUtils.h:532]
[task 2022-04-11T18:18:51.242Z] 18:18:51     INFO - GECKO(2652) | #25: mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) [ipc/glue/MessagePump.cpp:235]
[task 2022-04-11T18:18:51.242Z] 18:18:51     INFO - GECKO(2652) | #18: nsThread::ProcessNextEvent(bool, bool*) [xpcom/threads/nsThread.cpp:1191]
[task 2022-04-11T18:18:51.243Z] 18:18:51     INFO - GECKO(2652) | #26: MessageLoop::Run() [ipc/chromium/src/base/message_loop.cc:356]
[task 2022-04-11T18:18:51.243Z] 18:18:51     INFO - GECKO(2652) | #19: NS_ProcessNextEvent(nsIThread*, bool) [xpcom/threads/nsThreadUtils.cpp:465]
[task 2022-04-11T18:18:51.244Z] 18:18:51     INFO - GECKO(2652) | #27: XRE_InitChildProcess(int, char**, XREChildData const*) [toolkit/xre/nsEmbedFunctions.cpp:733]
[task 2022-04-11T18:18:51.244Z] 18:18:51     INFO - GECKO(2652) | #28: main [ipc/app/MozillaRuntimeMain.cpp:72]
[task 2022-04-11T18:18:51.244Z] 18:18:51     INFO - GECKO(2652) | #20: mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) [ipc/glue/MessagePump.cpp:85]
[task 2022-04-11T18:18:51.245Z] 18:18:51     INFO - GECKO(2652) | #21: MessageLoop::Run() [ipc/chromium/src/base/message_loop.cc:356]
[task 2022-04-11T18:18:51.245Z] 18:18:51     INFO - GECKO(2652) | #22: nsBaseAppShell::Run() [widget/nsBaseAppShell.cpp:139]
[task 2022-04-11T18:18:51.245Z] 18:18:51     INFO - GECKO(2652) | #23: nsAppShell::Run() [widget/cocoa/nsAppShell.mm:803]
[task 2022-04-11T18:18:51.246Z] 18:18:51     INFO - GECKO(2652) | #24: XRE_RunAppShell() [toolkit/xre/nsEmbedFunctions.cpp:870]
[task 2022-04-11T18:18:51.246Z] 18:18:51     INFO - GECKO(2652) | #25: mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) [ipc/glue/MessagePump.cpp:235]
[task 2022-04-11T18:18:51.247Z] 18:18:51     INFO - GECKO(2652) | #26: MessageLoop::Run() [ipc/chromium/src/base/message_loop.cc:356]
[task 2022-04-11T18:18:51.247Z] 18:18:51     INFO - GECKO(2652) | #27: XRE_InitChildProcess(int, char**, XREChildData const*) [toolkit/xre/nsEmbedFunctions.cpp:733]
[task 2022-04-11T18:18:51.247Z] 18:18:51     INFO - GECKO(2652) | #28: main [ipc/app/MozillaRuntimeMain.cpp:72]
[task 2022-04-11T18:18:51.248Z] 18:18:51     INFO - GECKO(2652) | ### XPCOM_MEM_BLOAT_LOG defined -- logging bloat/leaks to /var/folders/kx/31_6_74x6951ctnrlr8l16q8000014/T/tmpt3lr4gjs.mozrunner/runtests_leaks_tab_pid2668.log
[task 2022-04-11T18:18:51.248Z] 18:18:51     INFO - GECKO(2652) | [2668, Main Thread] WARNING: XPCOM_MEM_BLOAT_LOG is set, disabling native allocations.: file /builds/worker/checkouts/gecko/tools/profiler/core/platform.cpp:339
[task 2022-04-11T18:18:51.249Z] 18:18:51     INFO - GECKO(2652) | [Parent 2652, IPC I/O Parent] WARNING: [1.1]: Ignoring message 'EVENT_MESSAGE' to unknown peer BB67DC7275BEA03F.277382901C2789DD: file /builds/worker/checkouts/gecko/ipc/glue/NodeController.cpp:340
[task 2022-04-11T18:18:51.249Z] 18:18:51     INFO - GECKO(2652) | [Parent 2652, IPC I/O Parent] WARNING: [1.1]: Ignoring message 'EVENT_MESSAGE' to unknown peer BB67DC7275BEA03F.277382901C2789DD: file /builds/worker/checkouts/gecko/ipc/glue/NodeController.cpp:340
[task 2022-04-11T18:18:51.250Z] 18:18:51     INFO - GECKO(2652) | [Parent 2652, IPC I/O Parent] WARNING: [1.1]: Ignoring message 'EVENT_MESSAGE' to unknown peer BB67DC7275BEA03F.277382901C2789DD: file /builds/worker/checkouts/gecko/ipc/glue/NodeController.cpp:340
[task 2022-04-11T18:18:51.251Z] 18:18:51     INFO - GECKO(2652) | [Parent 2652, IPC I/O Parent] WARNING: [1.1]: Ignoring message 'EVENT_MESSAGE' to unknown peer BB67DC7275BEA03F.277382901C2789DD: file /builds/worker/checkouts/gecko/ipc/glue/NodeController.cpp:340
[task 2022-04-11T18:18:51.251Z] 18:18:51     INFO - GECKO(2652) | [Parent 2652, IPC I/O Parent] WARNING: [1.1]: Ignoring message 'EVENT_MESSAGE' to unknown peer BB67DC7275BEA03F.277382901C2789DD: file /builds/worker/checkouts/gecko/ipc/glue/NodeController.cpp:340
[task 2022-04-11T18:18:51.252Z] 18:18:51     INFO - GECKO(2652) | [Parent 2652, IPC I/O Parent] WARNING: [1.1]: Ignoring message 'EVENT_MESSAGE' to unknown peer BB67DC7275BEA03F.277382901C2789DD: file /builds/worker/checkouts/gecko/ipc/glue/NodeController.cpp:340
[task 2022-04-11T18:18:51.252Z] 18:18:51     INFO - GECKO(2652) | [Parent 2652, IPC I/O Parent] WARNING: [1.1]: Ignoring message 'EVENT_MESSAGE' to unknown peer BB67DC7275BEA03F.277382901C2789DD: file /builds/worker/checkouts/gecko/ipc/glue/NodeController.cpp:340
[task 2022-04-11T18:18:51.253Z] 18:18:51     INFO - GECKO(2652) | [Parent 2652, IPC I/O Parent] WARNING: [1.1]: Ignoring message 'EVENT_MESSAGE' to unknown peer BB67DC7275BEA03F.277382901C2789DD: file /builds/worker/checkouts/gecko/ipc/glue/NodeController.cpp:340
[task 2022-04-11T18:18:51.253Z] 18:18:51     INFO - GECKO(2652) | [Parent 2652, IPC I/O Parent] WARNING: [1.1]: Ignoring message 'EVENT_MESSAGE' to unknown peer BB67DC7275BEA03F.277382901C2789DD: file /builds/worker/checkouts/gecko/ipc/glue/NodeController.cpp:340
[task 2022-04-11T18:18:51.254Z] 18:18:51     INFO - GECKO(2652) | [Parent 2652, IPC I/O Parent] WARNING: [1.1]: Ignoring message 'EVENT_MESSAGE' to unknown peer BB67DC7275BEA03F.277382901C2789DD: file /builds/worker/checkouts/gecko/ipc/glue/NodeController.cpp:340
[task 2022-04-11T18:18:51.254Z] 18:18:51     INFO - GECKO(2652) | [Parent 2652, IPC I/O Parent] WARNING: [1.1]: Ignoring message 'EVENT_MESSAGE' to unknown peer BB67DC7275BEA03F.277382901C2789DD: file /builds/worker/checkouts/gecko/ipc/glue/NodeController.cpp:340
[task 2022-04-11T18:18:51.255Z] 18:18:51     INFO - GECKO(2652) | [Parent 2652, IPC I/O Parent] WARNING: [1.1]: Ignoring message 'EVENT_MESSAGE' to unknown peer BB67DC7275BEA03F.277382901C2789DD: file /builds/worker/checkouts/gecko/ipc/glue/NodeController.cpp:340
[task 2022-04-11T18:18:51.255Z] 18:18:51     INFO - GECKO(2652) | [Parent 2652, Main Thread] WARNING: IPC message 'PBrowser::Msg_StopIMEStateManagement' discarded: actor cannot send: file /builds/worker/checkouts/gecko/ipc/glue/ProtocolUtils.cpp:506
[task 2022-04-11T18:18:51.256Z] 18:18:51     INFO - GECKO(2652) | [Parent 2652, Main Thread] WARNING: IPC message 'PBrowser::Msg_Destroy' discarded: actor cannot send: file /builds/worker/checkouts/gecko/ipc/glue/ProtocolUtils.cpp:506
[task 2022-04-11T18:18:51.256Z] 18:18:51     INFO - GECKO(2652) | [Parent 2652, Main Thread] WARNING: No build ID mismatch: file /builds/worker/checkouts/gecko/dom/base/nsFrameLoader.cpp:3849
[task 2022-04-11T18:18:51.256Z] 18:18:51     INFO - GECKO(2652) | [Parent 2652, Main Thread] WARNING: IPC message 'PContent::Msg_CommitBrowsingContextTransaction' discarded: actor cannot send: file /builds/worker/checkouts/gecko/ipc/glue/ProtocolUtils.cpp:506
[task 2022-04-11T18:18:51.257Z] 18:18:51     INFO - GECKO(2652) | [Parent 2652, Main Thread] WARNING: IPC message 'PContent::Msg_DiscardBrowsingContext' discarded: actor cannot send: file /builds/worker/checkouts/gecko/ipc/glue/ProtocolUtils.cpp:506
[task 2022-04-11T18:18:51.257Z] 18:18:51     INFO - GECKO(2652) | [Parent 2652: Main Thread]: I/DocShellAndDOMWindowLeak ++DOCSHELL 1104b3400 == 6 [pid = 2652] [id = 5]
[task 2022-04-11T18:18:51.257Z] 18:18:51     INFO - GECKO(2652) | [Parent 2652: Main Thread]: I/DocShellAndDOMWindowLeak ++DOMWINDOW == 12 (10a93bf10) [pid = 2652] [serial = 12] [outer = 0]
[task 2022-04-11T18:18:51.257Z] 18:18:51     INFO - GECKO(2652) | [Parent 2652: Main Thread]: I/DocShellAndDOMWindowLeak ++DOMWINDOW == 13 (13260c400) [pid = 2652] [serial = 13] [outer = 10a93bf10]
[task 2022-04-11T18:18:51.258Z] 18:18:51     INFO - GECKO(2652) | ### XPCOM_MEM_BLOAT_LOG defined -- logging bloat/leaks to /var/folders/kx/31_6_74x6951ctnrlr8l16q8000014/T/tmpt3lr4gjs.mozrunner/runtests_leaks_tab_pid2669.log
[task 2022-04-11T18:18:51.258Z] 18:18:51     INFO - GECKO(2652) | [2669, Main Thread] WARNING: XPCOM_MEM_BLOAT_LOG is set, disabling native allocations.: file /builds/worker/checkouts/gecko/tools/profiler/core/platform.cpp:339
[task 2022-04-11T18:18:51.258Z] 18:18:51     INFO - TEST-INFO | started process screencapture
[task 2022-04-11T18:18:51.331Z] 18:18:51     INFO - TEST-INFO | screencapture: exit 0
[task 2022-04-11T18:18:51.332Z] 18:18:51     INFO - Buffered messages logged at 18:18:41
[task 2022-04-11T18:18:51.332Z] 18:18:51     INFO - Entering test bound 
[task 2022-04-11T18:18:51.332Z] 18:18:51     INFO - Buffered messages finished
[task 2022-04-11T18:18:51.333Z] 18:18:51     INFO - TEST-UNEXPECTED-FAIL | dom/midi/tests/browser_stable_midi_port_ids.js | Uncaught exception in test - AbortError: Actor 'SpecialPowers' destroyed before query 'Spawn' was resolved
[task 2022-04-11T18:18:51.333Z] 18:18:51     INFO - Leaving test bound 
[task 2022-04-11T18:18:51.334Z] 18:18:51     INFO - Console message: [JavaScript Error: "remote browser crashed while on https://example.org/browser/dom/midi/tests/port_ids_page_2.html
[task 2022-04-11T18:18:51.334Z] 18:18:51     INFO - " {file: "chrome://mochikit/content/mochitest-e10s-utils.js" line: 10}]
[task 2022-04-11T18:18:51.334Z] 18:18:51     INFO - e10s_init/<@chrome://mochikit/content/mochitest-e10s-utils.js:10:10
[task 2022-04-11T18:18:51.334Z] 18:18:51     INFO - 
[task 2022-04-11T18:18:51.335Z] 18:18:51     INFO - GECKO(2652) | MEMORY STAT vsizeMaxContiguous not supported in this build configuration.
[task 2022-04-11T18:18:51.335Z] 18:18:51     INFO - GECKO(2652) | MEMORY STAT | vsize 15294MB | residentFast 317MB | heapAllocated 143MB
[task 2022-04-11T18:18:51.335Z] 18:18:51     INFO - TEST-OK | dom/midi/tests/browser_stable_midi_port_ids.js | took 1088ms
[task 2022-04-11T18:18:51.336Z] 18:18:51     INFO - Not taking screenshot here: see the one that was previously logged
[task 2022-04-11T18:18:51.336Z] 18:18:51     INFO - TEST-UNEXPECTED-FAIL | dom/midi/tests/browser_stable_midi_port_ids.js | Found an unexpected tab at the end of test run: about:blank - 
[task 2022-04-11T18:18:51.337Z] 18:18:51     INFO - GECKO(2652) | [Parent 2652, Main Thread] WARNING: '!inner', file /builds/worker/checkouts/gecko/dom/ipc/jsactor/JSWindowActorProtocol.cpp:184
[task 2022-04-11T18:18:51.337Z] 18:18:51     INFO - GECKO(2652) | [Parent 2652, Main Thread] WARNING: '!inner', file /builds/worker/checkouts/gecko/dom/ipc/jsactor/JSWindowActorProtocol.cpp:184
[task 2022-04-11T18:18:51.338Z] 18:18:51     INFO - Not taking screenshot here: see the one that was previously logged
[task 2022-04-11T18:18:51.338Z] 18:18:51     INFO - TEST-UNEXPECTED-FAIL | dom/midi/tests/browser_stable_midi_port_ids.js | Found an unexpected tab at the end of test run: https://example.org/browser/dom/midi/tests/port_ids_page_1.html - 
[task 2022-04-11T18:18:51.339Z] 18:18:51     INFO - Not taking screenshot here: see the one that was previously logged
[task 2022-04-11T18:18:51.339Z] 18:18:51     INFO - TEST-UNEXPECTED-FAIL | dom/midi/tests/browser_stable_midi_port_ids.js | Found an unexpected tab at the end of test run: https://example.com/browser/dom/midi/tests/port_ids_page_1.html - 
[task 2022-04-11T18:18:51.340Z] 18:18:51     INFO - GECKO(2652) | [Parent 2652, IPC I/O Parent] WARNING: [1.1]: Ignoring message 'EVENT_MESSAGE' to unknown peer A969D3ED7E9F9B44.735B7FBA9164D2EA: file /builds/worker/checkouts/gecko/ipc/glue/NodeController.cpp:340
[task 2022-04-11T18:18:51.340Z] 18:18:51     INFO - GECKO(2652) | [Parent 2652, IPC I/O Parent] WARNING: [1.1]: Ignoring message 'EVENT_MESSAGE' to unknown peer A969D3ED7E9F9B44.735B7FBA9164D2EA: file /builds/worker/checkouts/gecko/ipc/glue/NodeController.cpp:340
[task 2022-04-11T18:18:51.341Z] 18:18:51     INFO - GECKO(2652) | [Parent 2652, IPC I/O Parent] WARNING: [1.1]: Ignoring message 'EVENT_MESSAGE' to unknown peer A969D3ED7E9F9B44.735B7FBA9164D2EA: file /builds/worker/checkouts/gecko/ipc/glue/NodeController.cpp:340
[task 2022-04-11T18:18:51.341Z] 18:18:51     INFO - GECKO(2652) | [Parent 2652, IPC I/O Parent] WARNING: [1.1]: Ignoring message 'EVENT_MESSAGE' to unknown peer A969D3ED7E9F9B44.735B7FBA9164D2EA: file /builds/worker/checkouts/gecko/ipc/glue/NodeController.cpp:340
[task 2022-04-11T18:18:51.342Z] 18:18:51     INFO - GECKO(2652) | [Parent 2652, IPC I/O Parent] WARNING: [1.1]: Ignoring message 'EVENT_MESSAGE' to unknown peer A969D3ED7E9F9B44.735B7FBA9164D2EA: file /builds/worker/checkouts/gecko/ipc/glue/NodeController.cpp:340
[task 2022-04-11T18:18:51.343Z] 18:18:51     INFO - GECKO(2652) | [Parent 2652, IPC I/O Parent] WARNING: [1.1]: Ignoring message 'EVENT_MESSAGE' to unknown peer A969D3ED7E9F9B44.735B7FBA9164D2EA: file /builds/worker/checkouts/gecko/ipc/glue/NodeController.cpp:340
[task 2022-04-11T18:18:51.343Z] 18:18:51     INFO - GECKO(2652) | [Parent 2652, IPC I/O Parent] WARNING: [1.1]: Ignoring message 'EVENT_MESSAGE' to unknown peer A969D3ED7E9F9B44.735B7FBA9164D2EA: file /builds/worker/checkouts/gecko/ipc/glue/NodeController.cpp:340
[task 2022-04-11T18:18:51.344Z] 18:18:51     INFO - GECKO(2652) | [Parent 2652, IPC I/O Parent] WARNING: [1.1]: Ignoring message 'EVENT_MESSAGE' to unknown peer A969D3ED7E9F9B44.735B7FBA9164D2EA: file /builds/worker/checkouts/gecko/ipc/glue/NodeController.cpp:340
[task 2022-04-11T18:18:51.344Z] 18:18:51     INFO - GECKO(2652) | [Parent 2652, IPC I/O Parent] WARNING: [1.1]: Ignoring message 'EVENT_MESSAGE' to unknown peer A969D3ED7E9F9B44.735B7FBA9164D2EA: file /builds/worker/checkouts/gecko/ipc/glue/NodeController.cpp:340
[task 2022-04-11T18:18:51.345Z] 18:18:51     INFO - GECKO(2652) | [Parent 2652, IPC I/O Parent] WARNING: [1.1]: Ignoring message 'EVENT_MESSAGE' to unknown peer A969D3ED7E9F9B44.735B7FBA9164D2EA: file /builds/worker/checkouts/gecko/ipc/glue/NodeController.cpp:340
[task 2022-04-11T18:18:51.345Z] 18:18:51     INFO - GECKO(2652) | [Parent 2652, IPC I/O Parent] WARNING: [1.1]: Ignoring message 'EVENT_MESSAGE' to unknown peer A969D3ED7E9F9B44.735B7FBA9164D2EA: file /builds/worker/checkouts/gecko/ipc/glue/NodeController.cpp:340
[task 2022-04-11T18:18:51.346Z] 18:18:51     INFO - GECKO(2652) | [Parent 2652, IPC I/O Parent] WARNING: [1.1]: Ignoring message 'EVENT_MESSAGE' to unknown peer A969D3ED7E9F9B44.735B7FBA9164D2EA: file /builds/worker/checkouts/gecko/ipc/glue/NodeController.cpp:340
[task 2022-04-11T18:18:51.346Z] 18:18:51     INFO - GECKO(2652) | ###!!! [Parent][PContentParent] Error: Send(msgname=PContent::Msg_CommitBrowsingContextTransaction) Channel error: cannot send/recv
[task 2022-04-11T18:18:51.347Z] 18:18:51     INFO - GECKO(2652) | ###!!! [Parent][PContentParent] Error: Send(msgname=PBrowser::Msg_RenderLayers) Channel error: cannot send/recv
[task 2022-04-11T18:18:51.347Z] 18:18:51     INFO - GECKO(2652) | ###!!! [Parent][PContentParent] Error: Send(msgname=PBrowser::Msg_Activate) Channel error: cannot send/recv
[task 2022-04-11T18:18:51.347Z] 18:18:51     INFO - Not taking screenshot here: see the one that was previously logged
[task 2022-04-11T18:18:51.348Z] 18:18:51     INFO - TEST-UNEXPECTED-FAIL | dom/midi/tests/browser_stable_midi_port_ids.js | Found an unexpected tab at the end of test run: https://example.com/browser/dom/midi/tests/port_ids_page_1.html -
Flags: needinfo?(gsvelto)

I made a silly mistake in the ID generator that would cause it to assert. Good thing it did assert because it would have been a real problem. If this try run comes out green I'll re-land with a fix.

Flags: needinfo?(gsvelto)

It appears that the problem is fixed. Re-landing.

Pushed by gsvelto@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3c6e6d0d7b38
Factor out the function to generate stable, anonymous IDs r=padenot
https://hg.mozilla.org/integration/autoland/rev/225adb498b09
Use stable, anonymous IDs for Web MIDI ports r=padenot
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 101 Branch

Shall we uplift this?

Flags: needinfo?(gsvelto)

Yeah, it's got good test coverage so I'm confident it should work.

Flags: needinfo?(gsvelto)

Comment on attachment 9270223 [details]
Bug 1758468 - Use stable, anonymous IDs for Web MIDI ports r=padenot

Beta/Release Uplift Approval Request

  • User impact if declined: Web MIDI ports change between sessions causing problems with most existing pages using the API. Additionally the port IDs within a session are the same across origins which is also undesirable because of fingerprinting.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): The change is well covered by tests and will affect a very small number of users relying on the API.
  • String changes made/needed: none
Attachment #9270223 - Flags: approval-mozilla-beta?
Attachment #9270222 - Flags: approval-mozilla-beta?

Comment on attachment 9270222 [details]
Bug 1758468 - Factor out the function to generate stable, anonymous IDs r=padenot

Approved for 100.0b6

Attachment #9270222 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9270223 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Regressions: 1851847
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: