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

Intermittent CI failure WritesDontCompleteImmediatelyWhenTooManyBytesIncludingNonImmediateAreAlreadyPreCompleted #1002

Closed
benaadams opened this issue Jul 21, 2016 · 2 comments
Assignees

Comments

@benaadams
Copy link
Contributor

benaadams commented Jul 21, 2016

https://ci.appveyor.com/project/aspnetci/kestrelhttpserver/build/1.0.3225

Microsoft.AspNetCore.Server.KestrelTests.SocketOutputTests.WritesDontCompleteImmediatelyWhenTooManyBytesIncludingNonImmediateAreAlreadyPreCompleted [FAIL]
      Assert.True() Failure
      Expected: True
      Actual:   False
      Stack Trace:
        SocketOutputTests.cs(201,0): at Microsoft.AspNetCore.Server.KestrelTests.SocketOutputTests.WritesDontCompleteImmediatelyWhenTooManyBytesIncludingNonImmediateAreAlreadyPreCompleted()

More info

System.ObjectDisposedException: Cannot access a disposed object. 
fail: Object name: 'WriteReqPool'.
@benaadams
Copy link
Contributor Author

Bit more info from a Mono run

info:   Starting:    Microsoft.AspNetCore.Server.KestrelTests
fail:     Microsoft.AspNetCore.Server.KestrelTests.SocketOutputTests.WritesDontCompleteImmediatelyWhenTooManyBytesIncludingNonImmediateAreAlreadyPreCompleted [FAIL]
info:       Assert.True() Failure
info:       Expected: True
info:       Actual:   False
info:       Stack Trace:
info:         /home/travis/build/aspnet/KestrelHttpServer/test/Microsoft.AspNetCore.Server.KestrelTests/SocketOutputTests.cs(197,0): at Microsoft.AspNetCore.Server.KestrelTests.SocketOutputTests.WritesDontCompleteImmediatelyWhenTooManyBytesIncludingNonImmediateAreAlreadyPreCompleted()
fail: Unhandled Exception: System.ObjectDisposedException: Cannot access a disposed object.
fail: Object name: 'WriteReqPool'.
fail:    at Microsoft.AspNetCore.Server.Kestrel.Internal.Infrastructure.WriteReqPool.Return(UvWriteReq req)
fail:    at Microsoft.AspNetCore.Server.Kestrel.Internal.Http.SocketOutput.WriteContext.PoolWriteReq(UvWriteReq writeReq)
fail:    at Microsoft.AspNetCore.Server.Kestrel.Internal.Http.SocketOutput.WriteContext.<>c.<DoWriteIfNeeded>b__13_0(UvWriteReq req, Int32 status, Exception error, Object state)
fail:    at Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.UvWriteReq.UvWriteCb(IntPtr ptr, Int32 status)
fail:    at Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.UvWriteReq.<>c.<.cctor>b__12_0(IntPtr ptr, Int32 status)
fail:    at Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.Libuv.NativeMethods.uv_run(UvLoopHandle handle, Int32 mode)
fail:    at Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.Libuv.run(UvLoopHandle handle, Int32 mode)
fail:    at Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.UvLoopHandle.Run(Int32 mode)
fail:    at Microsoft.AspNetCore.Server.Kestrel.Internal.KestrelThread.ThreadStart(Object parameter)
info: 
fail: Exit code 134 from dotnet
fail: Stack trace: 
  at Viewdee94273146044e2b38a47fb408a58d0.Dotnet (System.String command, System.String dotnetDir) [0x00000] in <filename unknown>:0 
  at Viewdee94273146044e2b38a47fb408a58d0.DotnetTest (System.String projectFile, System.String configuration, System.String test_options) [0x00000] in <filename unknown>:0 

@davidfowl
Copy link
Member

Ohhh thats interesting. That's related to my change. We never checked disposal before, just assumed things were good. It must mean that Return was called after the thread was disposed.

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