From 8d4f1615dcad182d79ab624cc2518207410735dd Mon Sep 17 00:00:00 2001 From: Thays Grazia Date: Mon, 31 Jul 2023 16:16:57 -0300 Subject: [PATCH 01/11] Run the tests in debug mode to get more information. --- eng/pipelines/common/templates/wasm-debugger-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/common/templates/wasm-debugger-tests.yml b/eng/pipelines/common/templates/wasm-debugger-tests.yml index fd19fe5385cbb..410cfa2133c49 100644 --- a/eng/pipelines/common/templates/wasm-debugger-tests.yml +++ b/eng/pipelines/common/templates/wasm-debugger-tests.yml @@ -16,7 +16,7 @@ jobs: parameters: jobTemplate: /eng/pipelines/common/global-build-job.yml helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml - buildConfig: Release + buildConfig: Debug runtimeFlavor: mono platforms: ${{ parameters.platforms }} shouldContinueOnError: ${{ parameters.shouldContinueOnError }} From f19e83dc52659c7d331660459437fbe6b8f2c37a Mon Sep 17 00:00:00 2001 From: Thays Grazia Date: Mon, 31 Jul 2023 18:28:47 -0300 Subject: [PATCH 02/11] Adding log messages --- src/mono/wasm/runtime/loader/assets.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mono/wasm/runtime/loader/assets.ts b/src/mono/wasm/runtime/loader/assets.ts index 92c944e975293..14b9a7d319937 100644 --- a/src/mono/wasm/runtime/loader/assets.ts +++ b/src/mono/wasm/runtime/loader/assets.ts @@ -604,7 +604,8 @@ function fetchResource(request: ResourceRequest): Promise { // there's anything they don't like about it. fetchOptions.integrity = isCacheAvailable() ? (request.hash ?? "") : undefined; } - + console.log("hey thays 1 - " + url); + console.log("hey thays 2 - " + JSON.stringify(fetchOptions)); return loaderHelpers.fetch_like(url, fetchOptions); } From ac75e0a04b638560a06a1fdf5e05476ef334a49c Mon Sep 17 00:00:00 2001 From: Thays Grazia Date: Tue, 1 Aug 2023 12:23:00 -0300 Subject: [PATCH 03/11] Fix build --- src/mono/wasm/runtime/loader/assets.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mono/wasm/runtime/loader/assets.ts b/src/mono/wasm/runtime/loader/assets.ts index 14b9a7d319937..54d1aad893f9f 100644 --- a/src/mono/wasm/runtime/loader/assets.ts +++ b/src/mono/wasm/runtime/loader/assets.ts @@ -604,7 +604,9 @@ function fetchResource(request: ResourceRequest): Promise { // there's anything they don't like about it. fetchOptions.integrity = isCacheAvailable() ? (request.hash ?? "") : undefined; } + // eslint-disable-next-line no-console console.log("hey thays 1 - " + url); + // eslint-disable-next-line no-console console.log("hey thays 2 - " + JSON.stringify(fetchOptions)); return loaderHelpers.fetch_like(url, fetchOptions); } From 20e9414a1c872e3c89346a7621687f112482ab15 Mon Sep 17 00:00:00 2001 From: Thays Grazia Date: Tue, 1 Aug 2023 15:10:58 -0300 Subject: [PATCH 04/11] Adding more messages --- src/mono/wasm/runtime/loader/assets.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/mono/wasm/runtime/loader/assets.ts b/src/mono/wasm/runtime/loader/assets.ts index 54d1aad893f9f..d626b84f0a2cf 100644 --- a/src/mono/wasm/runtime/loader/assets.ts +++ b/src/mono/wasm/runtime/loader/assets.ts @@ -350,22 +350,32 @@ export async function start_asset_download(asset: AssetEntryInternal): Promise Date: Tue, 1 Aug 2023 17:33:54 -0300 Subject: [PATCH 05/11] Adding more logs --- src/mono/wasm/runtime/loader/assets.ts | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/mono/wasm/runtime/loader/assets.ts b/src/mono/wasm/runtime/loader/assets.ts index d626b84f0a2cf..2cb1327dc22f1 100644 --- a/src/mono/wasm/runtime/loader/assets.ts +++ b/src/mono/wasm/runtime/loader/assets.ts @@ -351,31 +351,31 @@ export async function start_asset_download(asset: AssetEntryInternal): Promise { // there's anything they don't like about it. fetchOptions.integrity = isCacheAvailable() ? (request.hash ?? "") : undefined; } - // eslint-disable-next-line no-console - console.log("hey thays 1 - " + url); - // eslint-disable-next-line no-console - console.log("hey thays 2 - " + JSON.stringify(fetchOptions)); return loaderHelpers.fetch_like(url, fetchOptions); } From 472983c94b409ce122037b24f0fbb236e644cf38 Mon Sep 17 00:00:00 2001 From: Thays Grazia Date: Tue, 1 Aug 2023 19:06:19 -0300 Subject: [PATCH 06/11] Removing task.delay. --- src/mono/wasm/runtime/loader/assets.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/mono/wasm/runtime/loader/assets.ts b/src/mono/wasm/runtime/loader/assets.ts index 2cb1327dc22f1..eeb136a1a5030 100644 --- a/src/mono/wasm/runtime/loader/assets.ts +++ b/src/mono/wasm/runtime/loader/assets.ts @@ -389,8 +389,6 @@ export async function start_asset_download(asset: AssetEntryInternal): Promise Date: Tue, 1 Aug 2023 22:37:40 -0300 Subject: [PATCH 07/11] Reducing maxParallelDownloads --- src/mono/wasm/runtime/loader/globals.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mono/wasm/runtime/loader/globals.ts b/src/mono/wasm/runtime/loader/globals.ts index 7b2225f1c84ea..aae1aa48a22a5 100644 --- a/src/mono/wasm/runtime/loader/globals.ts +++ b/src/mono/wasm/runtime/loader/globals.ts @@ -67,7 +67,7 @@ export function setLoaderGlobals( config: globalObjects.module.config, diagnosticTracing: false, - maxParallelDownloads: 16, + maxParallelDownloads: 10, enableDownloadRetry: true, assertAfterExit: !ENVIRONMENT_IS_WEB, From ad4756e3c90be051e3fee853cf732a1bedd60673 Mon Sep 17 00:00:00 2001 From: Thays Grazia Date: Wed, 2 Aug 2023 10:31:15 -0300 Subject: [PATCH 08/11] Adding more messages --- src/mono/wasm/runtime/loader/assets.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mono/wasm/runtime/loader/assets.ts b/src/mono/wasm/runtime/loader/assets.ts index eeb136a1a5030..b8605f2682fbf 100644 --- a/src/mono/wasm/runtime/loader/assets.ts +++ b/src/mono/wasm/runtime/loader/assets.ts @@ -349,6 +349,7 @@ export async function start_asset_download(asset: AssetEntryInternal): Promise Date: Wed, 2 Aug 2023 10:59:30 -0300 Subject: [PATCH 09/11] Fix compilation --- src/mono/wasm/runtime/loader/assets.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mono/wasm/runtime/loader/assets.ts b/src/mono/wasm/runtime/loader/assets.ts index b8605f2682fbf..e59ce99e66b4e 100644 --- a/src/mono/wasm/runtime/loader/assets.ts +++ b/src/mono/wasm/runtime/loader/assets.ts @@ -349,6 +349,7 @@ export async function start_asset_download(asset: AssetEntryInternal): Promise Date: Wed, 2 Aug 2023 12:07:09 -0300 Subject: [PATCH 10/11] Trying to fix CI. --- .../common/templates/wasm-debugger-tests.yml | 2 +- .../tests/debugger-test/debugger-main.js | 1 + src/mono/wasm/runtime/loader/assets.ts | 20 ++++--------------- src/mono/wasm/runtime/loader/globals.ts | 2 +- 4 files changed, 7 insertions(+), 18 deletions(-) diff --git a/eng/pipelines/common/templates/wasm-debugger-tests.yml b/eng/pipelines/common/templates/wasm-debugger-tests.yml index 410cfa2133c49..fd19fe5385cbb 100644 --- a/eng/pipelines/common/templates/wasm-debugger-tests.yml +++ b/eng/pipelines/common/templates/wasm-debugger-tests.yml @@ -16,7 +16,7 @@ jobs: parameters: jobTemplate: /eng/pipelines/common/global-build-job.yml helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml - buildConfig: Debug + buildConfig: Release runtimeFlavor: mono platforms: ${{ parameters.platforms }} shouldContinueOnError: ${{ parameters.shouldContinueOnError }} diff --git a/src/mono/wasm/debugger/tests/debugger-test/debugger-main.js b/src/mono/wasm/debugger/tests/debugger-test/debugger-main.js index cb6273ed31e63..d2317525a2e9f 100644 --- a/src/mono/wasm/debugger/tests/debugger-test/debugger-main.js +++ b/src/mono/wasm/debugger/tests/debugger-test/debugger-main.js @@ -8,6 +8,7 @@ import { dotnet, exit } from './_framework/dotnet.js' try { const runtime = await dotnet .withEnvironmentVariable("DOTNET_MODIFIABLE_ASSEMBLIES", "debug") + .withConfig({ maxParallelDownloads: 1 }) // For custom logging patch the functions below //.withDiagnosticTracing(true) //.withEnvironmentVariable("MONO_LOG_LEVEL", "debug") diff --git a/src/mono/wasm/runtime/loader/assets.ts b/src/mono/wasm/runtime/loader/assets.ts index e59ce99e66b4e..92c944e975293 100644 --- a/src/mono/wasm/runtime/loader/assets.ts +++ b/src/mono/wasm/runtime/loader/assets.ts @@ -349,35 +349,23 @@ export async function start_asset_download(asset: AssetEntryInternal): Promise { // there's anything they don't like about it. fetchOptions.integrity = isCacheAvailable() ? (request.hash ?? "") : undefined; } + return loaderHelpers.fetch_like(url, fetchOptions); } diff --git a/src/mono/wasm/runtime/loader/globals.ts b/src/mono/wasm/runtime/loader/globals.ts index aae1aa48a22a5..7b2225f1c84ea 100644 --- a/src/mono/wasm/runtime/loader/globals.ts +++ b/src/mono/wasm/runtime/loader/globals.ts @@ -67,7 +67,7 @@ export function setLoaderGlobals( config: globalObjects.module.config, diagnosticTracing: false, - maxParallelDownloads: 10, + maxParallelDownloads: 16, enableDownloadRetry: true, assertAfterExit: !ENVIRONMENT_IS_WEB, From fa01d7207b9d81aa83893f95ea4952da87c0bdfb Mon Sep 17 00:00:00 2001 From: Thays Grazia Date: Wed, 2 Aug 2023 13:15:54 -0300 Subject: [PATCH 11/11] Setting the maxParallelDownloads to 10. --- src/mono/wasm/debugger/tests/debugger-test/debugger-main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mono/wasm/debugger/tests/debugger-test/debugger-main.js b/src/mono/wasm/debugger/tests/debugger-test/debugger-main.js index d2317525a2e9f..15728ff10023e 100644 --- a/src/mono/wasm/debugger/tests/debugger-test/debugger-main.js +++ b/src/mono/wasm/debugger/tests/debugger-test/debugger-main.js @@ -8,7 +8,7 @@ import { dotnet, exit } from './_framework/dotnet.js' try { const runtime = await dotnet .withEnvironmentVariable("DOTNET_MODIFIABLE_ASSEMBLIES", "debug") - .withConfig({ maxParallelDownloads: 1 }) + .withConfig({ maxParallelDownloads: 10 }) // For custom logging patch the functions below //.withDiagnosticTracing(true) //.withEnvironmentVariable("MONO_LOG_LEVEL", "debug")