-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[browser][MT]Download phase stalling. #108253
Comments
Could you please create full demo for me that I could test ? Give me a zip with self-hosted blazor-wasm that I can try to fiddle with. |
Sure thanks! I created a branch for you So you can directly download the zip from https://github.com/Tewr/BlazorWorker/archive/refs/heads/feature/net9-demo-loader-problem.zip The self-hosted blazor-wasm server project for .net9 is here: You need to hit the "run test" button on the first page to initiate |
I've fiddled a bit more this morning, and I can see there is a link to the cache (I guess in this case it's the assets cache): If I do a hard cache reset in the browser and have the debugger open (to slow things down), the success rate (with success, I mean I manage to get past rather than the cache itself could also just be the impact on speed, like, works better if slower |
Hello,
I'm looking into supporting my library BlazorWorker on .net9. I'm having some trouble initializing dotnet using the same code as in .net8. I run into a kind of deadlock-looking situation in the download phase after calling
await dotnet.create();
, basically this call never returns, and it seems that after all the downloads have finished, we are awaiting some promise, somewhere... forever. The call is here: https://github.com/Tewr/BlazorWorker/blob/4aca2b9b3f9322e930c9495c4334293408b4f2ab/src/BlazorWorker/BlazorWorker.js#L165I have tracked down the issue to something that might be related to parallel downloads in the initialization phase (is this new?). If I fiddle around in these methods, setting breakpoints and stuff, occasionally but sporadically the initialization phase will succeed. I have tried changing the maxParallelDownloads value to something lower but with limited success. So it's clearly some kind of sync problem. But in general, the slower the code is executing, the higher the chance of success, I think.
Maybe if I could get a better understanding of this parallel download mechanism I can find a way around this deadlock-looking situation? I have seen that there have been some multithreading work as well, so possible some kind of detection of me being inside a worker that may mess things up.
@pavelsavara has commited the code and has had some small interaction with my library in the past. I'd be happy for any insights. I'm particularly looking at this method
start_asset_download_with_throttle
. I'm note sure if it's the right spot, but I feel like it's around here somewhere where the hangup occurs.runtime/src/mono/browser/runtime/loader/assets.ts
Line 539 in a16e0d5
Original issue, with code to reproduce the problem
Tewr/BlazorWorker#111
The text was updated successfully, but these errors were encountered: