Open Bug 1808049 Opened 2 years ago Updated 11 months ago

netwerk/test/unit/test_socks.js times out when run under MSIX

Categories

(Core :: Networking: Proxy, defect, P3)

defect

Tracking

()

People

(Reporter: bhearsum, Unassigned)

References

Details

(Whiteboard: [necko-triaged])

[task 2022-12-30T19:08:38.102Z] 19:08:38     INFO -  TEST-START | toolkit/components/places/tests/history/test_remove.js
[task 2022-12-30T19:08:38.106Z] 19:08:38     INFO -  ['C:\\Program Files\\WindowsApps\\Mozilla.MozillaFirefoxNightly_110.2212.3017.0_x64__5x4grbbqzn2q4\\VFS\\ProgramFiles\\MozillaFirefoxNightly Package Root\\firefox.exe', '--xpcshell', '-g', 'C:\\Program Files\\WindowsApps\\Mozilla.MozillaFirefoxNightly_110.2212.3017.0_x64__5x4grbbqzn2q4\\VFS\\ProgramFiles\\MozillaFirefoxNightly Package Root', '-a', 'C:\\Program Files\\WindowsApps\\Mozilla.MozillaFirefoxNightly_110.2212.3017.0_x64__5x4grbbqzn2q4\\VFS\\ProgramFiles\\MozillaFirefoxNightly Package Root', '-m', '-e', 'const _HEAD_JS_PATH = "Z:/task_167242471845322/build/tests/xpcshell/head.js";', '-e', 'const _MOZINFO_JS_PATH = "C:\\\\Users\\\\task_167242471845322\\\\AppData\\\\Local\\\\Temp\\\\xpc-profile-nnc4yfzc\\\\mozinfo.json";', '-e', 'const _PREFS_FILE = "C:\\\\Users\\\\task_167242471845322\\\\AppData\\\\Local\\\\Temp\\\\user.js";', '-e', 'const _TESTING_MODULES_DIR = "Z:\\\\task_167242471845322\\\\build\\\\tests\\\\xpcshell\\\\..\\\\modules";', '-f', 'Z:\\task_167242471845322\\build\\tests\\xpcshell\\head.js', '-e', 'const _HEAD_FILES = ["Z:/task_167242471845322/build/tests/xpcshell/tests/toolkit/components/places/tests/history/head_history.js"];', '-e', 'const _JSDEBUGGER_PORT = 0;', '-e', 'const _TEST_FILE = ["Z:/task_167242471845322/build/tests/xpcshell/tests/toolkit/components/places/tests/history/test_remove.js"];', '-e', 'const _TEST_NAME = "toolkit/components/places/tests/history/test_remove.js";', '-e', '_execute_test(); quit(0);']
[task 2022-12-30T19:08:38.444Z] 19:08:38     INFO -  TEST-TIMEOUT | netwerk/test/unit/test_socks.js | took 300001ms
[task 2022-12-30T19:08:38.487Z] 19:08:38     INFO -  xpcshell return code: None
[task 2022-12-30T19:08:38.498Z] 19:08:38     INFO -  netwerk/test/unit/test_socks.js failed or timed out, will retry.

Full log available at https://treeherder.mozilla.org/jobs?repo=try&resultStatus=success%2Ctestfailed%2Cbusted%2Cexception%2Cretry%2Crunning%2Cpending%2Crunnable&revision=2cb72935d61dd3765f6c2b9589f6821b725facab&searchStr=xpc&selectedTaskRun=VSFZdT9FSoevKFmpktkubQ.0

Hi Ben,

Could you explain how to reproduce this bug?
I assume all that's needed is to build via ./mach repackage msix, then run the unit test ./mach test netwerk/test/unit/test_socks.js?

I've tried running repackage, but I encountered a few issues:

$ ./mach repackage msix
 0:00.42 Adding files from 'C:/mozilla-unified/obj-x86_64-pc-mingw32\dist\bin'
 0:02.12 AppConstants.sys.mjs display version is '110.0a1' and build ID is '20230102085603': embedded version will be '110.2301.208.0'
 0:02.13 Read 'MOZ_BRANDING_DIRECTORY' from browser/confvars.sh:
 0:02.13 Checking buildconfig.html for --with-branding build flag.
 0:02.13 No branding set; Using branding from ''.
Error running mach:

    ['repackage', 'msix']

The error occurred in code that was called by the mach command. This is either
a bug in the called code itself or in the way that mach is calling it.
You can invoke |./mach busted| to check if this issue is already on file. If it
isn't, please use |./mach busted file repackage| to report it. If |./mach busted| is
misbehaving, you can also inspect the dependencies of bug 1543241.

If filing a bug, please include the full output of mach, including this error
message.

The details of the failure are as follows:

FileNotFoundError: [Errno 2] No such file or directory: 'C:/mozilla-unified/configure.sh'

  File "C:\mozilla-unified\python\mozbuild\mozbuild\mach_commands.py", line 2459, in repackage_msix
    output = repackage_msix(
  File "c:\mozilla-unified\python\mozbuild\mozbuild\repackaging\msix.py", line 505, in repackage_msix
    lines = open(mozpath.join(branding, "configure.sh")).readlines()

Sentry event ID: 9ebd2dae3c7745169ba074cef6f4b4eb
Sentry is attempting to send 0 pending error messages
Waiting up to 2 seconds
Press Ctrl-Break to quit

If I change msix.py to use configure instead of configure.sh, then I get this:

$ ./mach repackage msix
 0:00.39 Adding files from 'C:/mozilla-unified/obj-x86_64-pc-mingw32\dist\bin'
 0:01.07 AppConstants.sys.mjs display version is '110.0a1' and build ID is '20230102085603': embedded version will be '110.2301.208.0'
 0:01.07 Read 'MOZ_BRANDING_DIRECTORY' from browser/confvars.sh:
 0:01.07 Checking buildconfig.html for --with-branding build flag.
 0:01.07 No branding set; Using branding from ''.
 0:01.07 Repackaging to: C:/Users/valen/.mozbuild/cache/mach-msix/Mozilla.MozillaNightly_110.2301.208.0_x64.msix
 0:01.42 Adding distribution files from C:/mozilla-unified/browser/installer/windows/msix/distribution
 0:02.85 Elapsed: 1.41s; From C:/Users/valen/.mozbuild/cache/mach-msix/msix-temp-unofficial: Kept 0 existing; Added/updated 6336; Removed 0 files and 0 directories.
 0:02.88 Invoking: 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.19041.0/x64/makeappx.exe' pack /d C:/Users/valen/.mozbuild/cache/mach-msix/msix-temp-unofficial /p C:/Users/valen/.mozbuild/cache/mach-msix/Mozilla.MozillaNightly_110.2301.208.0_x64.msix /overwrite
Microsoft (R) MakeAppx Tool

Copyright (C) 2013 Microsoft.  All rights reserved.



The path (/p) parameter is: "\\?\C:\Users\valen\.mozbuild\cache\mach-msix\Mozilla.MozillaNightly_110.2301.208.0_x64.msix"

The content directory (/d) parameter is: "\\?\C:\Users\valen\.mozbuild\cache\mach-msix\msix-temp-unofficial"

Enumerating files from directory "\\?\C:\Users\valen\.mozbuild\cache\mach-msix\msix-temp-unofficial"

Packing 6336 file(s) in "\\?\C:\Users\valen\.mozbuild\cache\mach-msix\msix-temp-unofficial" (content directory) to "\\?\C:\Users\valen\.mozbuild\cache\mach-msix\Mozilla.MozillaNightly_110.2301.208.0_x64.msix" (output file name).

Memory limit defaulting to 17059833856 bytes.

Using "\\?\C:\Users\valen\.mozbuild\cache\mach-msix\msix-temp-unofficial\AppxManifest.xml" as the manifest for the package.

MakeAppx : error: Package creation failed.

MakeAppx : error: 0x80070020 - The process cannot access the file because it is being used by another process.

Error running mach:

    ['repackage', 'msix']

The error occurred in code that was called by the mach command. This is either
a bug in the called code itself or in the way that mach is calling it.
You can invoke |./mach busted| to check if this issue is already on file. If it
isn't, please use |./mach busted file repackage| to report it. If |./mach busted| is
misbehaving, you can also inspect the dependencies of bug 1543241.

If filing a bug, please include the full output of mach, including this error
message.

The details of the failure are as follows:

subprocess.CalledProcessError: Command '['C:/Program Files (x86)/Windows Kits/10/bin/10.0.19041.0/x64/makeappx.exe', 'pack', '/d', 'C:/Users/valen/.mozbuild/cache/mach-msix/msix-temp-unofficial', '/p', 'C:/Users/valen/.mozbuild/cache/mach-msix/Mozilla.MozillaNightly_110.2301.208.0_x64.msix', '/overwrite']' returned non-zero exit status 1.

  File "C:\mozilla-unified\python\mozbuild\mozbuild\mach_commands.py", line 2459, in repackage_msix
    output = repackage_msix(
  File "c:\mozilla-unified\python\mozbuild\mozbuild\repackaging\msix.py", line 790, in repackage_msix
    subprocess.check_output(args, universal_newlines=True)
  File "C:\mozilla-build\python3\lib\subprocess.py", line 424, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "C:\mozilla-build\python3\lib\subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,

Let me know if I'm doing something wrong.

Flags: needinfo?(bhearsum)
Duplicate of this bug: 1808048

(In reply to Valentin Gosu [:valentin] (he/him) from comment #1)

Hi Ben,

Could you explain how to reproduce this bug?
I assume all that's needed is to build via ./mach repackage msix, then run the unit test ./mach test netwerk/test/unit/test_socks.js?

I've tried running repackage, but I encountered a few issues:

$ ./mach repackage msix
 0:00.42 Adding files from 'C:/mozilla-unified/obj-x86_64-pc-mingw32\dist\bin'
 0:02.12 AppConstants.sys.mjs display version is '110.0a1' and build ID is '20230102085603': embedded version will be '110.2301.208.0'
 0:02.13 Read 'MOZ_BRANDING_DIRECTORY' from browser/confvars.sh:
 0:02.13 Checking buildconfig.html for --with-branding build flag.
 0:02.13 No branding set; Using branding from ''.
Error running mach:

As, you'll need --with-branding=browser/branding/nightly - that ought to fix the packaging.

(This will also be available on try in the near-ish future, hopefully later this week.)

Flags: needinfo?(bhearsum)

The severity field is not set for this bug.
:jesup, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(rjesup)

Still having trouble packaging but will try again.

Flags: needinfo?(rjesup) → needinfo?(valentin.gosu)
Flags: needinfo?(valentin.gosu)

Hi Valentin - can you try this again?

Flags: needinfo?(valentin.gosu)
Component: Networking → Networking: Proxy

I managed to run the test under msix, but I'm getting non-local access to the network errors

    ./mach repackage msix
    # fixup the path to avoid spaces
    mv /C/Users/Valentin/.mozbuild/cache/mach-msix/msix-temp-unofficial/VFS/ProgramFiles/Mozilla\ Nightly\ Package\ Root /C/Users/Valentin/.mozbuild/cache/mach-msix/msix-temp-unofficial/VFS/ProgramFiles/msix
    ./mach xpcshell-test netwerk/test/unit/test_socks.js --msix-app-binary /c/Users/Valentin/.mozbuild/cache/mach-msix/msix-temp-unofficial/VFS/ProgramFiles/msix/firefox.exe --variant msix --msix-app-path /c/Users/Valentin/.mozbuild/cache/mach-msix/msix-temp-unofficial/VFS/ProgramFiles/msix --msix-xre-path /c/Users/Valentin/.mozbuild/cache/mach-msix/msix-temp-unofficial/VFS/ProgramFiles/msix 

But I'm not sure this actually ran the test properly.

Severity: -- → S3
Flags: needinfo?(valentin.gosu)
Priority: -- → P3
Whiteboard: [necko-triaged]
You need to log in before you can comment on or make changes to this bug.