Skip to content
This repository has been archived by the owner on Dec 18, 2018. It is now read-only.

Flaky Test: MemoryPoolBlock ObjectDisposedException #2486

Closed
ryanbrandenburg opened this issue Apr 12, 2018 · 3 comments
Closed

Flaky Test: MemoryPoolBlock ObjectDisposedException #2486

ryanbrandenburg opened this issue Apr 12, 2018 · 3 comments
Assignees

Comments

@ryanbrandenburg
Copy link
Contributor

Kestrel is timing out while running tests.

At first glance it seems like this might be caused by this:

Log Critical[0]: Unexpected exception in HttpConnection.ProcessRequestsAsync. System.ObjectDisposedException: Cannot access a disposed object.
[20:27:03]	Object name: 'MemoryPoolBlock'.
[20:27:03]	at System.Buffers.ThrowHelper.ThrowObjectDisposedException(ExceptionArgument argument) in D:\b\w\1e8cd6334ef22651\packages\microsoft.extensions.buffers.sources\2.1.0-preview3-32110\contentFiles\cs\netstandard1.0\Microsoft.Extensions.Buffers.Sources\PipelinesThrowHelper.cs:line 51
[20:27:03]	at System.Buffers.MemoryPoolBlock.Dispose() in D:\b\w\1e8cd6334ef22651\packages\microsoft.extensions.buffers.sources\2.1.0-preview3-32110\contentFiles\cs\netstandard1.0\Microsoft.Extensions.Buffers.Sources\MemoryPoolBlock.Release.cs:line 54
[20:27:03]	at System.IO.Pipelines.BufferSegment.ResetMemory()
[20:27:03]	at System.IO.Pipelines.Pipe.CompletePipe()
[20:27:03]	at System.IO.Pipelines.Pipe.CompleteWriter(Exception exception)
[20:27:03]	at Microsoft.AspNetCore.Server.Kestrel.Core.Adapter.Internal.AdaptedPipeline.ReadInputAsync(Stream stream)
[20:27:03]	at Microsoft.AspNetCore.Server.Kestrel.Core.Adapter.Internal.AdaptedPipeline.RunAsync(Stream stream) in D:\b\w\1e8cd6334ef22651\src\Kestrel.Core\Adapter\Internal\AdaptedPipeline.cs:line 45
[20:27:03]	at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.HttpConnection.ProcessRequestsAsync[TContext](IHttpApplication`1 httpApplication) in D:\b\w\1e8cd6334ef22651\src\Kestrel.Core\Internal\HttpConnection.cs:line 183

But I don't know the area well so that might be a red haring.

@Tratcher
Copy link
Member

dotnet/extensions#342

@mikeharder
Copy link
Contributor

The test hang is likely a dup of #2503. The ObjectDisposedException for MemoryPoolBlock may also be a valid issue, but it's likely unrelated to the hang which was caused by a GC bug (https://github.com/dotnet/coreclr/issues/17716).

@mikeharder mikeharder changed the title Test timeout: MemoryPoolBlock ObjectDisposedException Flaky Test: MemoryPoolBlock ObjectDisposedException Apr 23, 2018
@pakrym pakrym self-assigned this Apr 24, 2018
@pakrym
Copy link
Contributor

pakrym commented May 14, 2018

We refactored the code that caused this exception and I don't see it failing any recent tests.

@pakrym pakrym closed this as completed May 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants