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

MultiplexingStream transmit errors when shutting down channels #517

Merged
merged 86 commits into from
Sep 20, 2022

Conversation

sarda-devesh
Copy link
Contributor

@sarda-devesh sarda-devesh commented Aug 20, 2022

If a MultiplexingStream.Channel is shut down due to an error condition, that error gets transmitted to the remote side before the channel is shut down. When a channel receives such an error, clients can access that exception through the Completion property of the channel. These changes are introduced in both the C# and Typescript libraries and are only supported for protocol version >= 2.

Fixes #299

Merge latest changes from upstream
Errors sent between streams are thrown when the respective channels are completed
@sarda-devesh
Copy link
Contributor Author

I have mainly been using the test explorer in Visual Studio to run the test individually but I will try to run the test using the method that you suggested to see if that can trigger the error to show up regularly.

@sarda-devesh
Copy link
Contributor Author

Hey Andrew,
I am not sure what to do anymore: I tried to run the command at the root of my repo 5-6 times over the past two days but the error never showed up. I was running this using the command line and thus decided to see if I can run it on WSL to see if the issue shows up there. I first tried installing Ubuntu but I don't know why it wouldn't correctly recognize the file system on my computer and thus I could never access the repo through cd commands. Once I finally got fixed, I tried to install dotnet for ubuntu/wsl but kept on running into the same issue:

E: Unable to locate package dotnet-sdk-6.0
E: Couldn't find any package by glob 'dotnet-sdk-6.0'
E: Couldn't find any package by regex 'dotnet-sdk-6.0'

I thus installed and extract the .NET runtime binary manually and was able to run the dotnet build command locally and ran into this error:

/home/dsarda/.dotnet/sdk/6.0.300/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(554,5): error MSB4018: The "CreateAppHost" task failed unexpectedly. [/mnt/c/Users/Pankaj/Documents/Github Repos/Nerdbank.Streams/test/IsolatedTestHost/IsolatedTestHost.csproj]
/home/dsarda/.dotnet/sdk/6.0.300/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(554,5): error MSB4018: System.ComponentModel.Win32Exception (1): Could not set file permission 493 for /mnt/c/Users/Pankaj/Documents/Github Repos/Nerdbank.Streams/obj/test/IsolatedTestHost/Debug/netcoreapp3.1/apphost. [/mnt/c/Users/Pankaj/Documents/Github Repos/Nerdbank.Streams/test/IsolatedTestHost/IsolatedTestHost.csproj]
/home/dsarda/.dotnet/sdk/6.0.300/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(554,5): error MSB4018:    at Microsoft.NET.HostModel.AppHost.HostWriter.CreateAppHost(String appHostSourceFilePath, String appHostDestinationFilePath, String appBinaryFilePath, Boolean windowsGraphicalUserInterface, String assemblyToCopyResorcesFrom, Boolean enableMacOSCodeSign) [/mnt/c/Users/Pankaj/Documents/Github Repos/Nerdbank.Streams/test/IsolatedTestHost/IsolatedTestHost.csproj]
/home/dsarda/.dotnet/sdk/6.0.300/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(554,5): error MSB4018:    at Microsoft.NET.Build.Tasks.CreateAppHost.ExecuteCore() [/mnt/c/Users/Pankaj/Documents/Github Repos/Nerdbank.Streams/test/IsolatedTestHost/IsolatedTestHost.csproj]
/home/dsarda/.dotnet/sdk/6.0.300/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(554,5): error MSB4018:    at Microsoft.NET.Build.Tasks.TaskBase.Execute() [/mnt/c/Users/Pankaj/Documents/Github Repos/Nerdbank.Streams/test/IsolatedTestHost/IsolatedTestHost.csproj]
/home/dsarda/.dotnet/sdk/6.0.300/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(554,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [/mnt/c/Users/Pankaj/Documents/Github Repos/Nerdbank.Streams/test/IsolatedTestHost/IsolatedTestHost.csproj]
/home/dsarda/.dotnet/sdk/6.0.300/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(554,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [/mnt/c/Users/Pankaj/Documents/Github Repos/Nerdbank.Streams/test/IsolatedTestHost/IsolatedTestHost.csproj]

When I tried to run the command using sudo to resolve any permission issues, I get the error that sudo: dotnet: command not found, even though I am able to run it normally. This indicates to me that somehow the file paths for .NET are not configured correctly and thus tried to search for the above error and follow the shared instructions but still kept running into one permission or another.

Could it be possible for you to run the command on your end because for some reason the channel seems to be offered and accepted twice? This would suggest that their an issue with an improper to early disposal but looking at the log statements from the pipeline, that doesn't seem to be the case

@AArnott AArnott merged commit a2aef17 into dotnet:main Sep 20, 2022
@AArnott
Copy link
Collaborator

AArnott commented Sep 21, 2022

This merge was rolled back, as I merged it accidentally. It lives again in #534

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MultiplexingStream should transmit error condition that shuts down channels
2 participants