Test failure: PingTest.SendPingWithLowTtl_RoundtripTimeIsNonZero flaky on macOS 26 ARM64 (sub-ms RTT truncated to 0)
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- csharp, macos
- Domain
- ci-cd, networking, testing-qa
Research direction
Start in src/libraries/System.Net.Ping/tests/FunctionalTests/PingTest.cs at PingTest.SendPingWithLowTtl_RoundtripTimeIsNonZero and read the existing macOS RTT comment. Run the test on the OSX.26.Arm64.Open queue and verify the change handles sub-millisecond RoundtripTime values without weakening the expected TTL-expired response checks or allowing the outerloop failure to recur.
Written by the indexing model from the issue text.
Description
Test failure
System.Net.NetworkInformation.Tests.PingTest.SendPingWithLowTtl_RoundtripTimeIsNonZero is failing in outerloop on macOS 26 ARM64 (OSX.26.Arm64.Open), starting 2026-08-09.
Error message
Expected at least one TtlExpired reply with non-zero RoundtripTime across 3 attempts
Frequency
2 builds on main over the past 7 days, exclusively on the osx.26.arm64.open queue (runtime-libraries-coreclr outerloop-osx). Not seen on any other platform.
Root cause
Environment/platform-specific test fragility, not a product bug.
The test (src/libraries/System.Net.Ping/tests/FunctionalTests/PingTest.cs) pings with Ttl = 5, expects a TtlExpired/TimeExceeded reply, and asserts at least one of 3 attempts reports a non-zero RoundtripTime:
// On macOS, the raw socket implementation truncates sub-millisecond RTT to 0,
// and the first-hop router often responds in <1ms.
options.Ttl = 5;
bool gotNonZeroRtt = false;
for (int attempt = 0; attempt < 3; attempt++)
{
PingReply pingReply = await ping.SendPingAsync(host, TestSettings.PingTimeout, payload, options);
Assert.True(pingReply.Status == IPStatus.TimeExceeded || pingReply.Status == IPStatus.TtlExpired, ...);
if (pingReply.RoundtripTime > 0) { gotNonZeroRtt = true; break; }
}
Assert.True(gotNonZeroRtt, "Expected at least one TtlExpired reply with non-zero RoundtripTime across 3 attempts");
The test comment already acknowledges the failure mode: macOS raw sockets truncate sub-millisecond RTT to 0. On the fast Azure OSX.26.Arm64 CI runners the first-hop router consistently replies in under 1ms, so all 3 attempts measure RoundtripTime == 0 and the assertion fails. This is inherently timing/environment dependent and will flake on fast, low-latency network paths.
Suggested fix
Make the test robust to sub-millisecond RTT on macOS, e.g.:
- Skip the non-zero-RTT assertion on macOS (the RTT-truncation platform), or
- Increase the number of attempts and/or accept
RoundtripTime >= 0on platforms known to truncate sub-ms RTT, keeping the strict> 0assertion only where the raw-socket path preserves sub-ms timing.
Sample console log
Known issue error message
Fill the error message using known issues.
{
"ErrorMessage": "Expected at least one TtlExpired reply with non-zero RoundtripTime across 3 attempts",
"BuildRetry": false,
"ExcludeConsoleLog": false
}
Known issue validation
Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=1546596
Error message validated: [Expected at least one TtlExpired reply with non-zero RoundtripTime across 3 attempts]
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 8/11/2026 9:19:16 AM UTC
Report
Summary
| 24-Hour Hit Count | 7-Day Hit Count | 1-Month Count |
|---|---|---|
| 0 | 0 | 0 |
- Dominant language
- C#
- Stars
- 18.3k
- Forks
- 5.6k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 589
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from dotnet/runtime
-
agentic-workflows untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
area-System.Reflection blocking-clean-ci-optional Known Build Error os-mac-os-x untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
area-CodeGen-coreclr untriaged
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
agentic-workflows untriaged
Difficulty 1/5 Under an hour Newbie friendliness 78/100
-
area-VM-meta-mono untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Similar issues
-
type/automation type/tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
t/bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
ci-failure-cause test-failure
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
area:auth FE mvp P3
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
klasolsson81/jobbliggaren#1788 ·