forked from MihaZupan/runtime-utils
    
        
        - 
                Notifications
    You must be signed in to change notification settings 
- Fork 0
Open
Description
Triage for dotnet/runtime#117045.
Repo filter: All networking issues.
MihuBot version: 390b2a.
Ping MihaZupan for any issues.
This is a test triage report generated by AI, aimed at helping the triage team quickly identify past issues/PRs that may be related.
Take any conclusions with a large grain of salt.
dotnet/runtime#117045: [Android] `System.Net.Http.Functional.Tests.csproj` fails with SIGABRT in libcoreclr.so by kotlarmilos
[Tool] Searching for SIGABRT libcoreclr.so Android, System.Net.Http.Functional.Tests SIGABRT, SSLPeerUnverifiedException No peer certificates Android, System.Net.Http.Functional.Tests crash Android, libcoreclr.so abort Android (IncludeOpen=True, IncludeClosed=True, IncludeIssues=True, IncludePullRequests=True, Repository=dotnet/runtime)
[Tool] Found 112 issues, 152 comments, 112 returned results (13720 ms)
Here are the most relevant related issues and discussions for issue #117045: [Android] System.Net.Http.Functional.Tests.csproj fails with SIGABRT in libcoreclr.so:
1. This Issue: #117045 (June 2025) - [Android] System.Net.Http.Functional.Tests.csproj fails with SIGABRT in libcoreclr.so
- Summary: The System.Net.Http.Functional.Tests.csprojtests fail with SIGABRT inlibcoreclr.soon Android. The stack trace shows a fatal signal 6 (SIGABRT) and ajavax.net.ssl.SSLPeerUnverifiedException: No peer certificateserror from Conscrypt. There is also a managedNullReferenceExceptioninSystem.Net.SafeDeleteSslContext.WriteToConnection, which is called from native code via[UnmanagedCallersOnly].
- Key Comment: The crash may be due to the native layer invoking a delegate after the GCHandlehas been released, causing the function pointer to reference a null or invalid object. The discussion points to the possibility that the function pointer passed to native code is being called after the managed object has been collected.
2. PR #116540 (June 2025) - [Android] Add CoreCLR smoke tests for Android
- Summary: This PR adds CoreCLR smoke tests for Android, including networking and functional tests. It notes that these tests are currently failing due to a native crash in libcoreclr.so(SIGABRT), and that they will be re-enabled once the issue is resolved.
- Relevant Comments:
- [kotlarmilos, June 26, 2025]: "They are currently failing due to a native crash in libcoreclr.so (SIGABRT). We will re-enable them once the issue is resolved."
- [vitek-karas, June 26, 2025]: "Do we have an issue for that?" (referring to the SIGABRT crash, which is now tracked by #117045).
 
3. Issue #114951 (April 2025) - [Android] Improve test coverage on CoreCLR Android
- Summary: This is a tracking issue for disabled/failing CoreCLR Android tests, including System.Net.Http.Functional.Tests. It specifically lists #117045 as a failing test to be fixed and re-enabled.
- Tasks:
- "Add the following tests as smoke tests: System.Net.Http.Functional.Tests"
- "Failing tests: #117045"
 
4. Issue #11661 (December 2018, closed August 2023) - [Android] Segmentation fault in libcoreclr.so
- Summary: Early attempts to run .NET Core on Android resulted in segmentation faults in libcoreclr.so. The discussion covers issues with relocations, linker errors, and missing dependencies. While not directly about SIGABRT, it provides context for native crashes inlibcoreclr.soon Android.
- Relevant Comments:
- [janvorli]: "It looks like there is a relocation in the libcoreclr.so and that is not allowed on Android... Since we use -fPIC option when building coreclr, my guess is that some newly added / modified assembler helper is responsible for that."
 
5. Issue #99874 (March 2024, closed June 2024) - Android: Installed X509 certificates can't be used with SSL authentication
- Summary: Discusses issues with client certificate authentication on Android, specifically with SocketsHttpHandler and the inability to use certificates from the Android keychain. While not a direct crash, it is related to SSL/TLS and certificate handling on Android, which is a theme in the stack trace of #117045.
- Relevant Comments:
- [simonrozsival, May 2024]: "I wonder if we should add a similar public API to xamarin-android and corresponding internal APIs to the Android PAL to work with certificates via aliases in the runtime..."
- [zli-programer, May 2024]: "It isn't about getting private key. Private key is in the device. It is about getting SslStream to use it through native API so we could use certificate stored in the device as X509Certificate2 from X509Store for HttpClient."
 
6. PR #77386 (October 2022, merged January 2023) - [Android] Improvements to remote certificate verification in SslStream
- Summary: This PR overhauled how server certificate validation is performed on Android, allowing custom validation callbacks to be used. It introduced a custom Java trust manager that calls into C# for validation, addressing previous limitations where Android's built-in trust manager could not be bypassed.
- Relevant Comments:
- [steveisok, November 2022]: "The arm device failure may be significant: ... ((null) error) Why are we accessing an entry that is not allocated ... Exit code: 1."
- [simonrozsival, December 2022]: Links to related issues and further improvements.
 
7. PR #51316 (April 2021, merged April 2021) - [AndroidCrypto] Fix handling of no peer certificates
- Summary: Fixes an issue where Android's SSLSession.getPeerCertificatesthrows if there are no certs, which should be treated as "no certs" instead of an error. This is directly relevant to theSSLPeerUnverifiedException: No peer certificatesseen in #117045.
8. Issue #69870 (May 2022, closed July 2022) - [Android] Some System.Net.Http.Functional.Tests failing
- Summary: Tracks a large number of failing System.Net.Http.Functional.Tests on Android, many of which are related to SocketsHttpHandler and certificate handling.
- Relevant Comments:
- [antonfirsov]: "Many of these tests are specific to SocketsHttpHandler and should be disabled for platforms using native handlers."
 
9. Issue #83241 (March 2023, closed March 2023) - System.Net.Http.Functional.Tests crashing
- Summary: Reports crashes in System.Net.Http.Functional.Tests, with exit code -1073741819. While not Android-specific, it is another example of native crashes in this test suite.
10. Issue #70757 (June 2022, closed June 2022) - system.net.http.functional.tests crashing
- Summary: Reports crashes in System.Net.Http.Functional.Tests on Windows, with links to core dumps and logs. Not Android-specific, but shows a pattern of instability in this test suite across platforms.
Key Technical Insights
- The SIGABRT in libcoreclr.sois likely triggered by a managedNullReferenceExceptionin a method marked[UnmanagedCallersOnly], which is invoked from native code. If the native layer calls the delegate after the managed object has been collected, the function pointer may reference a null or invalid object, leading to a crash.
- The SSLPeerUnverifiedException: No peer certificates is a known Android quirk, previously addressed in PR #51316, but may still surface if the managed/native interop is not robust.
- The System.Net.Http.Functional.Tests suite has a history of platform-specific failures and native crashes, especially on Android, often related to certificate handling and SocketsHttpHandler.
- The CoreCLR smoke tests for Android are currently disabled due to this crash, and fixing #117045 is a prerequisite for re-enabling them.
Conclusion
- #117045 is the canonical tracking issue for the SIGABRT in libcoreclr.sowhen runningSystem.Net.Http.Functional.Testson Android.
- The root cause appears to be a managed object (SafeDeleteSslContext) being collected while a native function pointer is still in use, leading to a NullReferenceExceptionand subsequent SIGABRT.
- This is a blocker for enabling further test coverage and smoke tests for CoreCLR on Android.
- There is a long history of related issues with certificate handling, SocketsHttpHandler, and native/managed interop on Android in this test suite.
If you need to reference related work or discussions, see the above issues and PRs, especially #114951 (test coverage tracking), #116540 (smoke tests), #51316 (peer certificate handling), and #77386 (SslStream improvements on Android).
Metadata
Metadata
Assignees
Labels
No labels