-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
SendPacketsElement_FileStreamMultiPartMixed_MultipleFileStreams_Success failed on windows.11.amd64.clientpre.open #58898
Comments
Tagging subscribers to this area: @dotnet/ncl Issue DetailsConsole log: 'System.Net.Sockets.Tests' from job e457674b-7219-466a-98c7-d70d9c28d450 workitem 92e9af85-9f63-4cdc-ac3e-0569378e4d26 (windows.11.amd64.clientpre.open) executed on machine a0000GB
[snip]
C:\h\w\9FFD08CE\w\B423098F\e>"C:\h\w\9FFD08CE\p\dotnet.exe" exec --runtimeconfig System.Net.Sockets.Tests.runtimeconfig.json --depsfile System.Net.Sockets.Tests.deps.json xunit.console.dll System.Net.Sockets.Tests.dll -xml testResults.xml -nologo -nocolor -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing
Discovering: System.Net.Sockets.Tests (method display = ClassAndMethod, method display options = None)
Discovered: System.Net.Sockets.Tests (found 1305 of 1676 test cases)
Starting: System.Net.Sockets.Tests (parallel test collections = on, max threads = 2)
System.Net.Sockets.Tests.KeepAliveTest.Socket_KeepAlive_RetryCount_Failure [SKIP]
Condition(s) not met: "IsWindowsBelow1703"
System.Net.Sockets.Tests.UnixDomainSocketTest.Socket_CreateUnixDomainSocket_Throws_OnWindows [SKIP]
Condition(s) not met: "IsSubWindows10"
System.Net.Sockets.Tests.SendPacketsAsync.SendPacketsElement_FileStreamMultiPartMixed_MultipleFileStreams_Success [FAIL]
Timed out
Expected: True
Actual: False
Stack Trace:
/_/src/libraries/System.Net.Sockets/tests/FunctionalTests/SendPacketsAsync.cs(693,0): at System.Net.Sockets.Tests.SendPacketsAsync.SendPackets(SendPacketsElement[] elements, SocketError expectedResult, Int32 bytesExpected, Byte[] contentExpected)
/_/src/libraries/System.Net.Sockets/tests/FunctionalTests/SendPacketsAsync.cs(598,0): at System.Net.Sockets.Tests.SendPacketsAsync.SendPacketsElement_FileStreamMultiPartMixed_MultipleFileStreams_Success()
|
@antonfirsov can you help with this one? It seems to fail in CI on Win11. |
Test disabled in #59203 to suppress CI noise. We should fix/investigate the timeout soon ideally prior backport to 6.0 |
Failures are not specific to the test case mentioned, disabling 2 more cases in #59359. |
looks similar to #51651. Probably just timing....? |
The following code timeouts (hangs) regardless of the timeout value being used: string tempFile = Path.GetTempFileName();
byte[] content = new byte[1024];
File.WriteAllBytes(tempFile, content);
using FileStream fileStream1 = new FileStream(tempFile, FileMode.Open, FileAccess.Read, FileShare.Read, 4096, FileOptions.Asynchronous);
using Socket listener = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
listener.Bind(new IPEndPoint(IPAddress.Loopback, 0));
int port = ((IPEndPoint)listener.LocalEndPoint).Port;
listener.Listen();
EventWaitHandle completed = new ManualResetEvent(false);
using Socket client = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
client.Connect(new IPEndPoint(IPAddress.Loopback, port));
using Socket server = listener.Accept();
for (int i = 0; i < 10_000; i++)
{
completed.Reset();
using SocketAsyncEventArgs args = new SocketAsyncEventArgs();
args.Completed += static (_, e) => ((EventWaitHandle)e.UserToken).Set();
args.UserToken = completed;
args.SendPacketsElements = GetElements();
if (client.SendPacketsAsync(args))
{
if (!completed.WaitOne(30_000))
{
throw new Exception($"Timed out @ {i}");
}
}
}
SendPacketsElement[] GetElements()
{
const int N = 64;
int part = (int)fileStream1.Length / N;
SendPacketsElement[] result = new SendPacketsElement[N];
for (int i = 0; i < result.Length; i++)
{
result[i] = new SendPacketsElement(fileStream1, i * part, 10);
}
return result;
} It needs different amount of itereations on different platforms:
I don't understand why don't we see any Linux failures in CI, but it's possible that some internal winsock tuning made a bug visible on Windows 11. @wfurt I wonder if you can spot something incorrect / unusual in my repro code, or are we safe to declare this as a bug? |
This now failed on @antonfirsov per links above there's several failures in 2 days on release/6.0. |
console logs
The text was updated successfully, but these errors were encountered: