-
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
[wasm] Out of memory exception in System.Xml.XmlWriterApiTests.TCFullEndElement tests #110090
Comments
Tagging subscribers to 'arch-wasm': @lewing |
Tagging subscribers to this area: @dotnet/area-system-xml |
FWIW I've also seen this test OOM on Android:
The code looks suspect: runtime/src/libraries/System.Private.Xml/tests/Writers/XmlWriterApi/TCFullEndElement.cs Lines 6309 to 6313 in c37cfcc
The loop iterates 8190 times and will create a new (longer) string each time... |
@akoeplinger Thanks for the heads up. This test is clearly written inefficiently. However, it should still allocate less than 100 megabytes which I would not expect to cause OOM exception by itself, no? |
the test is an xunit Theory using XmlWriterInlineData for the data so it's probably executed multiple times. I also saw that e.g. the Base64_1 test has a similar issue so it might add up. |
Yes, I am familiar with xunit 🙂 If I am following the code correctly, there should be 14 test cases (7 writers, each used in sync and async mode) coming from the I created a draft PR to try some low hanging optimization with StringBuilder too see if it helps. |
WebAssembly only has a single thread so it can't run in parallel, but that also affects GC behavior and with WASM's linear memory it can also easily get fragmented. |
Interesting question here would be why GC didn't kick in somewhere in that loop. |
Build Information
Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=876444
Build error leg or test failing: System.Xml.XmlWriterApiTests.TCFullEndElement
Error Message
browser-wasm linux Release LibraryTests
Known issue validation
Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=876444
Error message validated:
[[FAIL] System.Xml.XmlWriterApiTests.TCFullEndElement System.OutOfMemoryException : Out of memory
]Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 11/22/2024 7:17:35 PM UTC
Report
Summary
The text was updated successfully, but these errors were encountered: