-
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
Mac Catalyst: GC doesn't collect object with finalizers #47407
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Tagging subscribers to this area: @CoffeeFlux Issue DetailsRepro: git clone https://github.com/rolfbjarne/xamarin-macios
cd xamarin-macios
git checkout mac-catalyst-debug-gc
./configure --enable-dotnet
make reset
make all -j8
make install -j8
make install-system
make test-mac-catalyst-gc This will build xamarin-macios, install it locally, build a test application and run it. The test code is very simple, it just creates objects in a loop, and runs the GC once in a while: GC log info has been enabled, and shows that the memory used grows:
Changing the test case to use the
|
Tagging subscribers to this area: @BrzVlad Issue DetailsRepro: git clone https://github.com/rolfbjarne/xamarin-macios
cd xamarin-macios
git checkout mac-catalyst-debug-gc
./configure --enable-dotnet
make reset
make all -j8
make install -j8
make install-system
make test-mac-catalyst-gc This will build xamarin-macios, install it locally, build a test application and run it. The test code is very simple, it just creates objects in a loop, and runs the GC once in a while: GC log info has been enabled, and shows that the memory used grows:
Changing the test case to use the
|
This seems to be working again now. |
I'm not convinced this was ever a bug. Maybe there was contention with the finalizer thread, which wasn't able to process its queue at the same rate new finalizers were added. |
Repro:
git clone https://github.com/rolfbjarne/xamarin-macios cd xamarin-macios git checkout mac-catalyst-debug-gc ./configure --enable-dotnet make reset make all -j8 make install -j8 make install-system make test-mac-catalyst-gc
This will build xamarin-macios, install it locally, build a test application and run it.
The test code is very simple, it just creates objects in a loop, and runs the GC once in a while:
https://github.com/rolfbjarne/xamarin-macios/blob/99d7b97fc2b6bbaa72f05cc407fcad603e8955d8/tests/common/TestProjects/MyCatalystApp/Main.cs#L17-L33
GC log info has been enabled, and shows that the memory used grows:
Changing the test case to use the
WithoutDestructor
class instead makes the memory usage stay constant.The text was updated successfully, but these errors were encountered: