Triage for dotnet/runtime#130278.
Repo filter: All networking issues.
MihuBot version: 9507a5.
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.
Tool logs
dotnet/runtime#130278: [ci-scan] Test failure: System.Net.Tests.HttpResponseStreamTests.Write_ContentToClosedConnectionSynchronously_ThrowsHttpListener
[Content truncated due to length] by github-actions[bot]
Extracted 5 search queries: HttpResponseStreamTests.Write_ContentToClosedConnectionSynchronously_ThrowsHttpListenerException failing on MacCatalyst NativeAOT, writing to closed socket on Darwin does not throw HttpListenerException, System.Net.HttpListener tests: write to closed connection not raising on maccatalyst/iossimulator NativeAOT, test expecting System.Net.HttpListenerException but no exception thrown on Apple/Darwin socket write, ActiveIssue skip missing MacCatalyst for HttpResponseStreamTests causing failure
Found 25 candidate issues
Issue #21590 (May 2017) - Write_HeadersToClosedConnectionSynchronously_ThrowsHttpListenerException test fails on macOS
Summary: The same class of failure (synchronous write to a closed connection not throwing on Darwin) was observed on macOS. The test was disabled / marked ActiveIssue historically because the behavior was unreliable across platforms; maintainers discussed deleting the test or keeping it disabled. Relevance: this documents the same platform behavioral difference on macOS that the new failure exhibits on MacCatalyst — the test is already known flaky on Darwin but the ActiveIssue/skip covers OSX/FreeBSD, not MacCatalyst.
Issue #21022 (Apr 2017) - Test failure: Write_HeadersToClosedConnectionSynchronously_ThrowsHttpListenerException
Summary: An earlier report of the same failure on various CI lanes; authors disabled the tests and then considered how/when to re-enable. Relevance: duplicate/historical context showing the test has long been platform-sensitive and was muted historically.
Issue #21816 (May 2017) - [HttpListener] [Managed] Reading from a closed connection should throw HttpListenerException
Summary: Discussion about whether reads from closed connections should throw on Unix. stephentoub noted that Unix may return 0 bytes instead of throwing and that this is a corner case callers already need to handle; tests around this were disabled or adjusted. Relevance: reinforces that Unix/Darwin semantics for closed-socket I/O can differ from Windows and that the project has tolerated/worked around those differences via skips or test changes.
Issue #21918 (May 2017) - HttpListener on Unix doesn’t track amount of data written to output stream
Summary: Windows and Unix implementations differ in how they enforce ContentLength and related invariants; this leads to behavioral differences (no exception on Unix in some cases). Relevance: another example where HttpListener semantics differ across platforms, supporting the new issue's observation that Darwin behavior is different for write-after-close.
Issue #63236 (Dec 2021) - Managed HttpListener does not shut down socket properly before closing
Summary: Reporter observed that HttpListener's managed implementation doesn't call Shutdown before Close, which can lead to different TCP teardown semantics (e.g., absence of RST) and surprising client/server behavior. Triage comment: if fix is as simple as calling Shutdown before Close, the change would be acceptable. Relevance: directly relevant to root cause hypotheses — if the managed HttpListener on Apple-native paths is not performing an abortive close, writes on the peer may not fail synchronously.
Pull Request #102882 (May 2024) - Enable NativeAOT runtime tests on MacCatalyst
Summary: This PR added MacCatalyst support for NativeAOT test execution and is the change that enabled the MacCatalyst NativeAOT legs. It was merged and is the likely upstream trigger for the new failures appearing on the MacCatalyst NativeAOT runs. Relevance: explains why these tests began running on MacCatalyst (and thus why the Apple-Mobile NativeAOT failures started surfacing).
Issue #53625 (Jun 2021) - [MacCatalyst][libraries] Skip Crashing test suites
Summary: Shows precedent for adding MacCatalyst-specific skips when test suites crash or misbehave on that platform; maintainers have extended skips to MacCatalyst in multiple places. Relevance: provides precedent for the possible remediation (extend ActiveIssue/Skip to MacCatalyst) and indicates this is an accepted mitigation for platform-specific test behavior.
Issue #114403 (Apr 2025) - [infra][maccatalyst] Fix IO test compatibility issues occurring on MacCatalyst CI with macOS 14
Summary: Documents a set of MacCatalyst CI-specific problems (permissions prompts, signing issues, platform incompatibilities) and shows that MacCatalyst often needs special handling in CI. Relevance: supports that MacCatalyst is its own platform target with quirks; maintainers may choose to treat it separately from plain macOS when deciding to skip/mute tests.
Issue #58614 (Sep 2021, closed Mar 2026) - [HttpListener] Calling Abort() or Dispose() on a server WebSocket originating from a HttpListener does nothing on Linux
Summary: Shows another example of platform differences in connection abort/close semantics (Linux vs Windows) and investigation notes that calling context.Response.Close() was a workaround. Relevance: further evidence that close/abort semantics vary by OS and that tests relying on abortive close semantics can be flaky across platforms.
Notes / synthesis for the new failure:
- The problem reported in #130278 is a known class of Darwin/Unix vs Windows behavior differences: synchronous writes to a connection that was closed/aborted on the peer do not always raise a socket error on Darwin, so tests that assert an exception will fail. Several historical issues document the same behavior and that the project has handled it by marking tests ActiveIssue / skipping on specific platforms or by removing/rewriting fragile tests.
- PR #102882 enabled MacCatalyst NativeAOT runs, so tests previously skipped (or not executed) on MacCatalyst now run and expose the difference. The immediate in-range remediation options are (a) extend the existing ActiveIssue/skip to include MacCatalyst (mute the test on that platform), or (b) change product behavior (e.g., alter socket shutdown/close semantics) — the latter is out-of-scope and likely undesirable. There is historical precedent and acceptance for option (a) in other MacCatalyst cases.
- A potential product-side mitigation noted in related issues is ensuring HttpListener performs an abortive Shutdown before Close; Issue #63236 suggests this might be a simple fix if appropriate, but altering connection teardown semantics is a behavioral change and would need careful review.
Triage for dotnet/runtime#130278.
Repo filter: All networking issues.
MihuBot version:
9507a5.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.
Tool logs
Issue #21590 (May 2017) - Write_HeadersToClosedConnectionSynchronously_ThrowsHttpListenerException test fails on macOS
Summary: The same class of failure (synchronous write to a closed connection not throwing on Darwin) was observed on macOS. The test was disabled / marked ActiveIssue historically because the behavior was unreliable across platforms; maintainers discussed deleting the test or keeping it disabled. Relevance: this documents the same platform behavioral difference on macOS that the new failure exhibits on MacCatalyst — the test is already known flaky on Darwin but the ActiveIssue/skip covers OSX/FreeBSD, not MacCatalyst.
Issue #21022 (Apr 2017) - Test failure: Write_HeadersToClosedConnectionSynchronously_ThrowsHttpListenerException
Summary: An earlier report of the same failure on various CI lanes; authors disabled the tests and then considered how/when to re-enable. Relevance: duplicate/historical context showing the test has long been platform-sensitive and was muted historically.
Issue #21816 (May 2017) - [HttpListener] [Managed] Reading from a closed connection should throw HttpListenerException
Summary: Discussion about whether reads from closed connections should throw on Unix. stephentoub noted that Unix may return 0 bytes instead of throwing and that this is a corner case callers already need to handle; tests around this were disabled or adjusted. Relevance: reinforces that Unix/Darwin semantics for closed-socket I/O can differ from Windows and that the project has tolerated/worked around those differences via skips or test changes.
Issue #21918 (May 2017) - HttpListener on Unix doesn’t track amount of data written to output stream
Summary: Windows and Unix implementations differ in how they enforce ContentLength and related invariants; this leads to behavioral differences (no exception on Unix in some cases). Relevance: another example where HttpListener semantics differ across platforms, supporting the new issue's observation that Darwin behavior is different for write-after-close.
Issue #63236 (Dec 2021) - Managed HttpListener does not shut down socket properly before closing
Summary: Reporter observed that HttpListener's managed implementation doesn't call Shutdown before Close, which can lead to different TCP teardown semantics (e.g., absence of RST) and surprising client/server behavior. Triage comment: if fix is as simple as calling Shutdown before Close, the change would be acceptable. Relevance: directly relevant to root cause hypotheses — if the managed HttpListener on Apple-native paths is not performing an abortive close, writes on the peer may not fail synchronously.
Pull Request #102882 (May 2024) - Enable NativeAOT runtime tests on MacCatalyst
Summary: This PR added MacCatalyst support for NativeAOT test execution and is the change that enabled the MacCatalyst NativeAOT legs. It was merged and is the likely upstream trigger for the new failures appearing on the MacCatalyst NativeAOT runs. Relevance: explains why these tests began running on MacCatalyst (and thus why the Apple-Mobile NativeAOT failures started surfacing).
Issue #53625 (Jun 2021) - [MacCatalyst][libraries] Skip Crashing test suites
Summary: Shows precedent for adding MacCatalyst-specific skips when test suites crash or misbehave on that platform; maintainers have extended skips to MacCatalyst in multiple places. Relevance: provides precedent for the possible remediation (extend ActiveIssue/Skip to MacCatalyst) and indicates this is an accepted mitigation for platform-specific test behavior.
Issue #114403 (Apr 2025) - [infra][maccatalyst] Fix IO test compatibility issues occurring on MacCatalyst CI with macOS 14
Summary: Documents a set of MacCatalyst CI-specific problems (permissions prompts, signing issues, platform incompatibilities) and shows that MacCatalyst often needs special handling in CI. Relevance: supports that MacCatalyst is its own platform target with quirks; maintainers may choose to treat it separately from plain macOS when deciding to skip/mute tests.
Issue #58614 (Sep 2021, closed Mar 2026) - [HttpListener] Calling Abort() or Dispose() on a server WebSocket originating from a HttpListener does nothing on Linux
Summary: Shows another example of platform differences in connection abort/close semantics (Linux vs Windows) and investigation notes that calling context.Response.Close() was a workaround. Relevance: further evidence that close/abort semantics vary by OS and that tests relying on abortive close semantics can be flaky across platforms.
Notes / synthesis for the new failure: