Repository navigation
Closed
Description
Discovering: System.Net.Mail.Functional.Tests (method display = ClassAndMethod, method display options = None)
Discovered: System.Net.Mail.Functional.Tests (found 144 of 146 test cases)
Starting: System.Net.Mail.Functional.Tests (parallel test collections = on, max threads = 2)
Unhandled Exception:
System.ObjectDisposedException: Safe handle has been closed.
Object name: 'SafeHandle'.
at System.Runtime.InteropServices.SafeHandle.DangerousAddRef(Boolean& success)
at System.Net.Sockets.SocketPal.SetLingerOption(SafeSocketHandle handle, LingerOption optionValue)
at System.Net.Sockets.Socket.SetLingerOption(LingerOption lref)
at System.Net.Sockets.Socket.SetSocketOption(SocketOptionLevel optionLevel, SocketOptionName optionName, Object optionValue)
at System.Net.Sockets.Socket.set_LingerState(LingerOption value)
at System.Net.Sockets.TcpClient.set_LingerState(LingerOption value)
at System.Net.Mail.SmtpConnection.Abort()
at System.Net.Mail.SmtpTransport.Abort()
at System.Net.Mail.SmtpClient.Abort()
at System.Net.Mail.SmtpClient.TimeOutCallback(Object state)
at System.Threading.TimerQueueTimer.<>c.<.cctor>b__23_0(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.TimerQueueTimer.CallCallback(Boolean isThreadPool)
at System.Threading.TimerQueueTimer.Fire(Boolean isThreadPool)
at System.Threading.TimerQueue.FireNextTimers()
at System.Threading.TimerQueue.System.Threading.IThreadPoolWorkItem.Execute()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
at System.Threading.Thread.StartCallback()
[ERROR] FATAL UNHANDLED EXCEPTION: System.ObjectDisposedException: Safe handle has been closed.
Object name: 'SafeHandle'.
at System.Runtime.InteropServices.SafeHandle.DangerousAddRef(Boolean& success)
at System.Net.Sockets.SocketPal.SetLingerOption(SafeSocketHandle handle, LingerOption optionValue)
at System.Net.Sockets.Socket.SetLingerOption(LingerOption lref)
at System.Net.Sockets.Socket.SetSocketOption(SocketOptionLevel optionLevel, SocketOptionName optionName, Object optionValue)
at System.Net.Sockets.Socket.set_LingerState(LingerOption value)
at System.Net.Sockets.TcpClient.set_LingerState(LingerOption value)
at System.Net.Mail.SmtpConnection.Abort()
at System.Net.Mail.SmtpTransport.Abort()
at System.Net.Mail.SmtpClient.Abort()
at System.Net.Mail.SmtpClient.TimeOutCallback(Object state)
at System.Threading.TimerQueueTimer.<>c.<.cctor>b__23_0(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.TimerQueueTimer.CallCallback(Boolean isThreadPool)
at System.Threading.TimerQueueTimer.Fire(Boolean isThreadPool)
at System.Threading.TimerQueue.FireNextTimers()
at System.Threading.TimerQueue.System.Threading.IThreadPoolWorkItem.Execute()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
at System.Threading.Thread.StartCallback()
cc: @akoeplinger
Metadata
Metadata
Assignees
Labels
No labels
Activity
stephentoub commentedon Jan 31, 2020
@tmds, looks like this is one of (or the) exception we need to special-case in the code you added?