Skip to content
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

Test failure: System.Net.Tests.HttpListenerResponseHeadersTests.KeepAlive_SetDisposed_ThrowsObjectDisposedException #39309

Closed
BruceForstall opened this issue Jul 14, 2020 · 2 comments · Fixed by #40698
Assignees
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI JitStress CLR JIT issues involving JIT internal stress modes
Milestone

Comments

@BruceForstall
Copy link
Member

BruceForstall commented Jul 14, 2020

With:

COMPlus_TailcallStress=1
COMPlus_TieredCompilation=0

This test hangs. Fails on Windows x86, x64 and arm64 (at least).

https://dev.azure.com/dnceng/public/_build/results?buildId=728248&view=ms.vss-test-web.build-test-results-tab&runId=22547532&resultId=178566&paneView=dotnet-dnceng.dnceng-build-release-tasks.helix-test-information-tab

This is release libraries, checked coreclr.

category:correctness
theme:testing
skill-level:expert
cost:medium

@BruceForstall BruceForstall added JitStress CLR JIT issues involving JIT internal stress modes area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI labels Jul 14, 2020
@BruceForstall BruceForstall added this to the 5.0.0 milestone Jul 14, 2020
@BruceForstall
Copy link
Member Author

This is just the tip of the iceberg. There are many other hangs and failures in this assembly if you get past this one (e.g., by disabling just this one test).

@erozenfeld
Copy link
Member

The bad tail call for System.Net.Tests.HttpListenerResponseHeadersTests.KeepAlive_SetDisposed_ThrowsObjectDisposedException is the same as in #38887 (comment)

private void AttachRequestQueueToUrlGroup()
{
Debug.Assert(Monitor.IsEntered(_internalLock));
// Set the association between request queue and url group. After this, requests for registered urls will
// get delivered to this request queue.
Interop.HttpApi.HTTP_BINDING_INFO info = default;
info.Flags = Interop.HttpApi.HTTP_FLAGS.HTTP_PROPERTY_FLAG_PRESENT;
info.RequestQueueHandle = _currentSession.RequestQueueHandle.DangerousGetHandle();
IntPtr infoptr = new IntPtr(&info);
SetUrlGroupProperty(Interop.HttpApi.HTTP_SERVER_PROPERTY.HttpServerBindingProperty,
infoptr, (uint)Marshal.SizeOf(typeof(Interop.HttpApi.HTTP_BINDING_INFO)));
}

We are passing a pointer to a local infoptr (points to info) to the call to SetUrlGroupProperty. So it's a tailcallstress issue.

erozenfeld added a commit to erozenfeld/runtime that referenced this issue Aug 14, 2020
Improve validation of tail calls that are not tail-prefixed in the IL
but are marked as such because of TailCallStress. We now do the same
correctness validation in morph for such tail calls as we do for
implicit tail calls. That blocks tail calls when we have address-taken
locals, struct promoted params, and pinned vars.

Fixes dotnet#39398.
Fixes dotnet#39309.
Fixes dotnet#38892.
Fixes dotnet#38889.
Fixes dotnet#38887.
Fixes dotnet#37117.
Fixes dotnet#8017.
erozenfeld added a commit that referenced this issue Aug 15, 2020
Improve validation of tail calls that are not tail-prefixed in the IL
but are marked as such because of TailCallStress. We now do the same
correctness validation in morph for such tail calls as we do for
implicit tail calls. That blocks tail calls when we have address-taken
locals, struct promoted params, and pinned vars.

Fixes #39398.
Fixes #39309.
Fixes #38892.
Fixes #38889.
Fixes #38887.
Fixes #37117.
Fixes #8017.
@ghost ghost locked as resolved and limited conversation to collaborators Dec 8, 2020
ViktorHofer pushed a commit to dotnet/winforms that referenced this issue Dec 5, 2022
Improve validation of tail calls that are not tail-prefixed in the IL
but are marked as such because of TailCallStress. We now do the same
correctness validation in morph for such tail calls as we do for
implicit tail calls. That blocks tail calls when we have address-taken
locals, struct promoted params, and pinned vars.

Fixes dotnet/runtime#39398.
Fixes dotnet/runtime#39309.
Fixes dotnet/runtime#38892.
Fixes dotnet/runtime#38889.
Fixes dotnet/runtime#38887.
Fixes dotnet/runtime#37117.
Fixes dotnet/runtime#8017.

Commit migrated from dotnet/runtime@7742b57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI JitStress CLR JIT issues involving JIT internal stress modes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants