-
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
[mono][loader] CI test failure "appdomain.c:1591, condition !ass->image->references [i]' not met" #2305
Comments
Failed again, now with:
Here is the core dump: https://helix.dot.net/api/2019-06-17/jobs/0d54bf8d-814b-48c7-bd00-7a690a8e3c6e/workitems/System.IO.Compression.ZipFile.Tests/files/core.81383 Failed in: https://dev.azure.com/dnceng/public/_build/results?buildId=502823&view=logs&jobId=c6f8dc49-92a1-5760-c098-ba97b8142bfb |
Configuration: @CoffeeFlux what are planned next steps? Asking as we want to get our rolling builds green :) |
@ViktorHofer I took a look at it last week and I'll sort it out properly this sprint, probably next week. Was dealing with some other stuff, sorry for the delay. |
Thanks a lot :) |
This cleans up three components of assembly loading that could potentially cause races/crashes. First, both `add_assemblies_to_domain` and `add_assembly_to_alc` now ignore resolved references on netcore. We were seeing a crash on CI related to an assertion in here that resulted from two threads using the same MonoImage simultaneously as one is being loaded in with LoadFile, and this should solve that. Fixes dotnet/runtime#2305 Second, we take both the domain and ALC loaded assemblies locks simultaneously around the assembly being added to both lists, ensuring they stay in sync. Finally, MonoImage now takes the image lock when writing to references instead of using the global `assemblies_mutex` in assembly.c for all images. This potentially helps reduce contention. Work here is not complete, but for this PR it's good enough. See dotnet/runtime#32889
) This cleans up three components of assembly loading that could potentially cause races/crashes. First, both `add_assemblies_to_domain` and `add_assembly_to_alc` now ignore resolved references on netcore. We were seeing a crash on CI related to an assertion in here that resulted from two threads using the same MonoImage simultaneously as one is being loaded in with LoadFile, and this should solve that. Fixes #2305 Second, we take both the domain and ALC loaded assemblies locks simultaneously around the assembly being added to both lists, ensuring they stay in sync. Finally, MonoImage now takes the image lock when writing to references instead of using the global `assemblies_mutex` in assembly.c for all images. This potentially helps reduce contention. Work here is not complete, but for this PR it's good enough. See #32889
) This cleans up three components of assembly loading that could potentially cause races/crashes. First, both `add_assemblies_to_domain` and `add_assembly_to_alc` now ignore resolved references on netcore. We were seeing a crash on CI related to an assertion in here that resulted from two threads using the same MonoImage simultaneously as one is being loaded in with LoadFile, and this should solve that. Fixes dotnet/runtime#2305 Second, we take both the domain and ALC loaded assemblies locks simultaneously around the assembly being added to both lists, ensuring they stay in sync. Finally, MonoImage now takes the image lock when writing to references instead of using the global `assemblies_mutex` in assembly.c for all images. This potentially helps reduce contention. Work here is not complete, but for this PR it's good enough. See dotnet/runtime#32889 Co-authored-by: Ryan Lucia <[email protected]>
Full assertion:
* Assertion at /Users/runner/runners/2.164.6/work/1/s/src/mono/mono/metadata/appdomain.c:1591, condition `!ass->image->references [i] not met', function:add_assembly_to_alc, Did not expect reference 0 of /private/tmp/helix/working/AF4D0979/p/shared/Microsoft.NETCore.App/5.0.0/System.Net.Http.dll to be resolved
Happened on an OSX CI lane. Failure log here The full test log https://dev.azure.com/dnceng/public/_build/results?buildId=499602&view=logs&j=c6f8dc49-92a1-5760-c098-ba97b8142bfb&t=22b0078b-0469-5ba6-8725-2121fdbae049&l=50
Stack trace:
The text was updated successfully, but these errors were encountered: