sdk icon indicating copy to clipboard operation
sdk copied to clipboard

Corehost doesn't mux properly on Unix

Open analogrelay opened this issue 10 years ago • 10 comments

Steps to reproduce

  1. Be on a Mac (maybe Linux too?)
  2. Download and unpack the latest package from here: https://dotnetcli.blob.core.windows.net/dotnet/beta/Binaries/Latest/dotnet-combined-framework-sdk-host-osx-x64.latest.tar.gz
    1. curl -O https://dotnetcli.blob.core.windows.net/dotnet/beta/Binaries/Latest/dotnet-combined-framework-sdk-host-osx-x64.latest.tar.gz
    2. tar -xf dotnet-combined-framework-sdk-host-osx-x64.latest.tar.gz
  3. Run ./dotnet --help from that directory

Expected behavior

To see the dotnet CLI help

Actual behavior

No output.

With COREHOST_TRACE on:

› COREHOST_TRACE=1 ./dotnet --help
Tracing enabled
--- Invoked host main = {
./dotnet
--help
}
Exists /Users/anurse/Scratch/dotnet.dll
Checking if CoreCLR path exists=[/Users/anurse/Scratch/libcoreclr.dylib]
Host operating in Muxer mode
Considering fxr dir=[/Users/anurse/Scratch/dotnethost/fxr]...
Considering fxr dir=[/Users/anurse/Scratch/dotnethost/fxr]...
Resolved fxr [/Users/anurse/Scratch/libhostfxr.dylib]...
Tracing enabled
Found cli sdk in:

/cc @schellap

analogrelay avatar Mar 16 '16 20:03 analogrelay

Looking...

schellap avatar Mar 16 '16 20:03 schellap

FYI, same result on CentOS (there isn't a Ubuntu build out yet). For that, you'd use curl -O https://dotnetcli.blob.core.windows.net/dotnet/beta/Binaries/Latest/dotnet-combined-framework-sdk-host-centos-x64.latest.tar.gz and tar -xf dotnet-combined-framework-sdk-host-centos-x64.latest.tar.gz

analogrelay avatar Mar 16 '16 20:03 analogrelay

Confirmed that Windows does not exhibit this behavior (and in fact, works just fine :smile: )

analogrelay avatar Mar 16 '16 20:03 analogrelay

As per spec, the shared folder should be Shared case sensitive :)

schellap avatar Mar 16 '16 20:03 schellap

The error code gives 0x97. May be a better print message is needed.

schellap avatar Mar 16 '16 20:03 schellap

That is not the actual problem but one of the potential problems.

schellap avatar Mar 16 '16 20:03 schellap

That looks really strange on a Unix system. Why was Shared chosen rather than shared?

analogrelay avatar Mar 16 '16 20:03 analogrelay

In any case, the bug is in the usage of readdir as it only lists files in unix.

schellap avatar Mar 16 '16 20:03 schellap

Should we just use shared on all platforms? @gkhanna79

schellap avatar Mar 16 '16 20:03 schellap

Ok, sounds good. The CLI packaging uses shared right now. I think it'd be best to do that for consistency. If you fix the underlying issue I can work around the casing for now though.

analogrelay avatar Mar 16 '16 20:03 analogrelay