Closed Bug 1796391 Opened 2 years ago Closed 2 years ago

Utility AudioDecoder not starting under MSIX

Categories

(Core :: Audio/Video: Playback, defect)

defect

Tracking

()

VERIFIED FIXED
108 Branch
Tracking Status
relnote-firefox --- 106+
firefox-esr102 --- unaffected
firefox106 --- verified
firefox107 --- verified
firefox108 --- verified

People

(Reporter: gerard-majax, Assigned: gerard-majax)

References

(Blocks 2 open bugs, Regression)

Details

(Keywords: regression)

Attachments

(3 files, 6 obsolete files)

STR:

  1. Build m-c with EARLY_BETA_OR_EARLIER= in build/defines.sh and remove a1 in browser/config/version_display
  2. mack repackage msix --sign
  3. Install the MSIX package: https://firefox-source-docs.mozilla.org/browser/installer/windows/installer/MSIX.html#local-developer-builds
  4. Open about:processes
  5. Load https://paul.cx/public/z.mp3

Expected:
Audio plays

Actual:
No audio for several seconds then some audio. Looking in about:processes one can see no Utility AudioDecoder process and decoding is happening on Content process?

The Bugbug bot thinks this bug should belong to the 'Core::Audio/Video: Playback' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: General → Audio/Video: Playback
Product: Firefox → Core

Set release status flags based on info from the regressing bug 1780796

Attachment #9299394 - Attachment is obsolete: true
Attachment #9299395 - Attachment is obsolete: true
Attachment #9299393 - Attachment description: WIP: Bug 1796391 - Do not enforce delayed MITIGATION_FORCE_MS_SIGNED_BINS on Utility under MSIX → Bug 1796391 - Always init signed policy rules r?bobowen!
Attachment #9299454 - Attachment is obsolete: true
Attachment #9299455 - Attachment is obsolete: true
Pushed by bobowencode@gmail.com: https://hg.mozilla.org/integration/autoland/rev/89d3bd40e892 Always init signed policy rules r=bobowen
Attachment #9299393 - Attachment description: Bug 1796391 - Always init signed policy rules r?bobowen! → Bug 1796391 - Force init signed policy rules for delayed mitigations on MSIX r?bobowen!
Attachment #9299475 - Attachment is obsolete: true
Attachment #9299476 - Attachment is obsolete: true
Flags: needinfo?(lissyx+mozillians)
Flags: needinfo?(lissyx+mozillians)

Comment on attachment 9299518 [details] [diff] [review]
0001-Bug-1796391-Force-init-signed-policy-rules-for-_beta.patch

Beta/Release Uplift Approval Request

  • User impact if declined: bug 1795909: Firefox stops working completely
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: Build MSIX and normal package, install, try to play some MP3 and AAC.
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Simple change and manually tested by several people
  • String changes made/needed: N/A
  • Is Android affected?: No

https://treeherder.mozilla.org/jobs?repo=try&revision=357435bec733bf8253fe1aa9815fac4f80640420

Attachment #9299518 - Flags: approval-mozilla-beta?
Flags: qe-verify+

Comment on attachment 9299519 [details] [diff] [review]
0001-Bug-1796391-Force-init-signed-policy-rules-f_release.patch

Beta/Release Uplift Approval Request

  • User impact if declined: bug 1795909: Firefox stops working completely
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: Build MSIX and normal package, install, try to play some MP3 and AAC.
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Simple change and manually tested by several people
  • String changes made/needed: N/A
  • Is Android affected?: No

https://treeherder.mozilla.org/jobs?repo=try&revision=2c90ae829c0688754d3b391738cd30500433503b

Attachment #9299519 - Flags: approval-mozilla-release?
Pushed by alissy@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2a5a0f3b5111 Force init signed policy rules for delayed mitigations on MSIX r=bobowen

Comment on attachment 9299518 [details] [diff] [review]
0001-Bug-1796391-Force-init-signed-policy-rules-for-_beta.patch

Approved for 107.0b3.

Attachment #9299518 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 108 Branch

Making custom Firefox builds is usually very time consuming for Desktop QA, which is why the team relies on Engineering providing these builds when verifying a fix requires them.
Alexandre, we'd be happy to take a look at this if you can provide an affected build for us to reproduce the initial issue, and a build that contains the patch so that we can verify it does not reproduce anymore.

Flags: needinfo?(lissyx+mozillians)

Builds are on treeherder, search for msixs for 64 bits

Flags: needinfo?(lissyx+mozillians) → needinfo?(brindusa.tot)
QA Whiteboard: [qa-triaged]
Flags: needinfo?(brindusa.tot)

Reproduced the issue with Firefox 106.0 MSIX on Windows 10x64. Opening https://paul.cx/public/z.mp3 does plays the audio only after some loading and there is no Utility > Audio Decoder displayed inside about:processes.
The issue is verified fixed on Windows 10x64 and Windows 11x64 with Firefox 107.0b4 (20221023135421) MSIX and 108.0a1 (20221024093150) MSIX from treeeherder. The mp3 audio file and AAC audio files are played as expected.

On Windows 10x64 the Utility > Generic Audio Decoder is displayed inside about:processes with Firefox 107.0b4 and Utility > Windows Media Framework Audio Decoder is displayed for the latest Nightly. On Windows 11x64 the decoder the Windows Media Framework Audio Decoder is displayed inside about:processes with Firefox 107.0b4 and Utility > Generic Audio Decoder is displayed for the latest Nightly. I have also take a look at 105.0.3 MSIX and it seems that it shows Utility Audio Decoder inside about:processes. Just to be extra safe here, does the decoder name matter or it's just important that the decoder is displayed inside about:processes when playing the mp3/aac files? Thank you!

Flags: needinfo?(lissyx+mozillians)

(In reply to Alexandru Trif, QA [:atrif] from comment #23)

Reproduced the issue with Firefox 106.0 MSIX on Windows 10x64. Opening https://paul.cx/public/z.mp3 does plays the audio only after some loading and there is no Utility > Audio Decoder displayed inside about:processes.
The issue is verified fixed on Windows 10x64 and Windows 11x64 with Firefox 107.0b4 (20221023135421) MSIX and 108.0a1 (20221024093150) MSIX from treeeherder. The mp3 audio file and AAC audio files are played as expected.

I dont think beta4 is a good candidate, because you need EARLY_BETA_OR_LATER and it's switched between beta6 and beta7. That's why I mentionned the need for builds.

On Windows 10x64 the Utility > Generic Audio Decoder is displayed inside about:processes with Firefox 107.0b4 and Utility > Windows Media Framework Audio Decoder is displayed for the latest Nightly. On Windows 11x64 the decoder the Windows Media Framework Audio Decoder is displayed inside about:processes with Firefox 107.0b4 and Utility > Generic Audio Decoder is displayed for the latest Nightly. I have also take a look at 105.0.3 MSIX and it seems that it shows Utility Audio Decoder inside about:processes. Just to be extra safe here, does the decoder name matter or it's just important that the decoder is displayed inside about:processes when playing the mp3/aac files? Thank you!

You should see both decoders. But about:processes can take some time to update, you might need to reload.

Flags: needinfo?(lissyx+mozillians)

(In reply to Alexandre LISSY :gerard-majax from comment #24)

I dont think beta4 is a good candidate, because you need EARLY_BETA_OR_LATER and it's switched between beta6 and beta7. That's why I mentionned the need for builds.

I will check this on 107.0b7 as well then.

You should see both decoders. But about:processes can take some time to update, you might need to reload.

Yup, you are right, I somehow missed it in the first place. Thank you!

Blocks: 1797136

Comment on attachment 9299519 [details] [diff] [review]
0001-Bug-1796391-Force-init-signed-policy-rules-f_release.patch

Approved for 106.0.2, thanks.

Attachment #9299519 - Flags: approval-mozilla-release? → approval-mozilla-release+

Verified the issue with Firefox 106.0.2 (20221024211236) MSIX from comment 27 on Windows 10x64 21H1 and Windows 11x64 21H2. The mp3 audio file and AAC audio files are played as expected and both Utility > Generic Audio Decoder and Windows Media Framework Audio Decode are displayed inside about:processes after playing the sound. I will leave this open and reverify this again on 107.0b7 when available and on 106.0.2 once it lands officially on Microsoft Store.

Blocks: 1797301

Verified this again with Firefox 106.0.2 (20221025065831) MSIX installed from Microsoft Store on two Windows 11x64 and two Windows 10x64 machines. The build is started accordingly and the mp3 audio file and AAC audio files are played as expected. Both Utility > Generic Audio Decoder and Windows Media Framework Audio Decode are displayed inside about:processes after playing the sound.

Just for archiving -- our current understanding of this problem is as follows. Our code contained paths where it will try to load non-Microsoft-signed libraries with the ProcessSignaturePolicy process mitigation policy being active. On regular installs and in our CI, failures with this mitigation are silent, they just generate an ETW event and make LoadLibrary return NULL -- and our code was relying on this behavior. But given our current config for the MSIX package, these failures seem doubly fatal, meaning they provoke the two things described below.

  1. They set the package status to 2, which implies that next time we try to launch the app we will not even try to start Firefox and just fail.
    Here is a part of the corresponding kernel call stack caught in procmon and manually annotated:
    0xfffff80763d78dd3 0x1c0008dd3 CI.dll KappxpSetPackageStatus
    0xfffff80763d79481 0x1c0009481 CI.dll KappxpNotifyPackagedFile
    0xfffff80763df1e2c 0x1c0081e2c CI.dll KappxNotifyIntegrityFailureInPackagedProcess
    0xfffff80763dc7a17 0x1c0057a17 CI.dll CipReportAndReprieveUMCIFailure
    0xfffff80763dc2daa 0x1c0052daa CI.dll CiValidateImageHeader
    (... 00000034`cf3fd5a0 ntdll.dll LdrLoadDll)
  1. They report an exception -- which maybe crashes our process although we are not 100% sure of the flow of that exception.
    Here is a part of the corresponding userland call stack caught in WinDbg:
    00 00000034`cf3fc868 00007fff`0b637c19 ntdll!NtRaiseException+0x14
    01 00000034`cf3fc870 00007fff`0b636cc8 ntdll!WerpBreakIntoDebuggerIfPresent+0x2d
    02 00000034`cf3fc8a0 00007fff`0b6267b5 ntdll!RtlReportException+0x38
    03 00000034`cf3fc920 00007fff`0b5f9f15 ntdll!LdrAppxHandleIntegrityFailure+0x1b5
    04 00000034`cf3fd060 00007fff`0b561770 ntdll!LdrpMapDllNtFileName+0x99321
    05 00000034`cf3fd160 00007fff`0b56153f ntdll!LdrpMapDllFullPath+0xe0
    06 00000034`cf3fd2f0 00007fff`0b578fd4 ntdll!LdrpProcessWork+0x77
    07 00000034`cf3fd340 00007fff`0b56932c ntdll!LdrpLoadDllInternal+0x1a0
    08 00000034`cf3fd3e0 00007fff`0b57a95a ntdll!LdrpLoadDll+0xb0
    09 00000034`cf3fd5a0 00007ff6`5bdf6e8e ntdll!LdrLoadDll+0xfa

The proposed patches appear to have fixed the problem.

Blocks: 1798069
Blocks: 1798070

Verified fixed with Firefox 107.0b9 (20221102185936) MSIX installed from treeherder on Windows 11x64 and Windows 10x64. The build is started accordingly and the mp3 audio file and AAC audio files are played as expected. Both Utility > Generic Audio Decoder and Windows Media Framework Audio Decode are displayed inside about:processes after playing the sound.

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-triaged]
Flags: qe-verify+
See Also: → 1801036
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: