You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SmtpClientTest.SendMail_SendQUITOnDispose timeout on OSX #41687
System.TimeoutException : Task timed out after 00:00:30
Stack trace
at System.Threading.Tasks.TaskTimeoutExtensions.TimeoutAfter(Task task, TimeSpan timeout) in /_/src/libraries/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs:line 41
at System.Net.Mail.Tests.SmtpClientTest.SendMail_SendQUITOnDispose(Boolean asyncSend) in /_/src/libraries/System.Net.Mail/tests/Functional/SmtpClientTest.cs:line 512
[Theory][InlineData(false)][InlineData(true)]publicasyncTaskSendMail_SendQUITOnDispose(boolasyncSend){boolquitMessageReceived=false;usingManualResetEventSlimquitReceived=newManualResetEventSlim();usingvarserver=newLoopbackSmtpServer();server.OnQuitReceived+= _ =>{quitMessageReceived=true;quitReceived.Set();};using(SmtpClientclient=server.CreateClient()){client.Credentials=newNetworkCredential("Foo","Bar");MailMessagemsg=newMailMessage("[email protected]","[email protected]","hello","howdydoo");if(asyncSend){awaitclient.SendMailAsync(msg).TimeoutAfter((int)TimeSpan.FromSeconds(30).TotalMilliseconds);}else{client.Send(msg);}Assert.False(quitMessageReceived,"QUIT received");}// There is a latency between send/receive.quitReceived.Wait(TimeSpan.FromSeconds(30));Assert.True(quitMessageReceived,"QUIT message not received");}
From the exception, it seems it is throwing on TimeoutAfter.
4 failures in last 4 days and nothing before in 90 days. This looks like regression @karelz
#41508 matches the timing. #41508 should only be changing behaviour when the Socket gets cleaned up by the finalizer. I don't think that happens in this test.
This was reported against macOS, has it occurred on Linux? I will try to reproduce it on Linux.
All cases I saw were on OSX 10.14. I don't see direct correlation either but it is suspicious that the test verifies dispose behavior. I'm wondering if all this is timing....? But I don't know why it would be much? slower.
Triage: Check if it was 1 machine? Or if there are more random test failures on the OSX 10.14.
Let's keep it in 5.0 until we are sure it is NOT impacting production of 5.0, given it started failing just recently -- we don't want to punt it until we are sure it is not a regression in 5.0.
TestResults
| join kind=inner WorkItems on WorkItemId
| join kind=inner Jobs on JobId
| where Finished >= datetime(2020-08-04) and Message contains 'timeout' and Result == 'Fail' and Duration > 30
| summarize Count = count() by QueueName
| order by Count desc
| project QueueName, Count
It makes me think that it might be CI overload for Mac machines...
Activity
wfurt commentedon Sep 1, 2020
I hit that as well. I'm wondering if this is related to #41508. We did not see that before AFAIK.
cc: @tmds
wfurt commentedon Sep 1, 2020
4 failures in last 4 days and nothing before in 90 days. This looks like regression @karelz
tmds commentedon Sep 2, 2020
This is the test that fails, for
asyncSend=true.From the exception, it seems it is throwing on
TimeoutAfter.#41508 matches the timing. #41508 should only be changing behaviour when the
Socketgets cleaned up by the finalizer. I don't think that happens in this test.This was reported against macOS, has it occurred on Linux? I will try to reproduce it on Linux.
Maybe we need to increase the timeout used?
wfurt commentedon Sep 2, 2020
All cases I saw were on OSX 10.14. I don't see direct correlation either but it is suspicious that the test verifies dispose behavior. I'm wondering if all this is timing....? But I don't know why it would be much? slower.
antonfirsov commentedon Sep 2, 2020
What I see in Kusto, querying for
Method == "SendMail_SendQUITOnDispose":asyncSend: trueand 3 withasyncSend: false. The test did not fail before.client.Send(msg), the async variant fails inquitReceived.Wait(TimeSpan.FromSeconds(30))karelz commentedon Sep 3, 2020
Triage: Check if it was 1 machine? Or if there are more random test failures on the OSX 10.14.
Let's keep it in 5.0 until we are sure it is NOT impacting production of 5.0, given it started failing just recently -- we don't want to punt it until we are sure it is not a regression in 5.0.
wfurt commentedon Sep 3, 2020
I did 1000+ runs locally and I did not see any failure.
CarnaViire commentedon Sep 4, 2020
I also wasn't able to repro it locally.
And we didn't have any additional failures for this test since 2020-09-01 18:56.
Also, querying for long timeouted tests in last month shows me that this number is pretty high for
osx.1014.amd64.open(it took the first place)link to Kusto
Query that I ran
Details
It makes me think that it might be CI overload for Mac machines...
CarnaViire commentedon Sep 7, 2020
As of today, there are still no additional failures for this test. I'm closing it for now, and will reopen if the failures re-appear.