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

Issues with running dotnet #43631

Closed
krisfremen opened this issue Oct 20, 2020 · 9 comments
Closed

Issues with running dotnet #43631

krisfremen opened this issue Oct 20, 2020 · 9 comments
Labels
area-System.Globalization untriaged New issue has not been triaged by the area owner

Comments

@krisfremen
Copy link

krisfremen commented Oct 20, 2020

Description

I get this upon running almost any command

➜  ~ dotnet --info
Unhandled exception. System.TypeInitializationException: The type initializer for 'Microsoft.DotNet.PlatformAbstractions.RuntimeEnvironment' threw an exception.
 ---> System.Runtime.InteropServices.ExternalException (0x80004005): External component has thrown an exception.
   at System.Globalization.CompareInfo.SortHandleCache.GetCachedSortHandle(String sortName)
   at System.Globalization.CompareInfo.InitSort(CultureInfo culture)
   at System.Globalization.CultureInfo.get_CompareInfo()
   at System.Globalization.TextInfo.PopulateIsAsciiCasingSameAsInvariant()
   at System.Globalization.TextInfo.ChangeCaseCommon[TConversion](String source)
   at System.Globalization.TextInfo.ToLower(String str)
   at System.String.ToLowerInvariant()
   at Microsoft.DotNet.PlatformAbstractions.RuntimeEnvironment.GetArch()
   at Microsoft.DotNet.PlatformAbstractions.RuntimeEnvironment..cctor()
   --- End of inner exception stack trace ---
   at Microsoft.DotNet.PlatformAbstractions.RuntimeEnvironment.GetRuntimeIdentifier()
   at Microsoft.DotNet.Cli.MulticoreJitProfilePathCalculator.CalculateProfileRootPath()
   at Microsoft.DotNet.Cli.MulticoreJitActivator.StartCliProfileOptimization()
   at Microsoft.DotNet.Cli.MulticoreJitActivator.TryActivateMulticoreJit()
   at Microsoft.DotNet.Cli.Program.Main(String[] args)
[1]    7090 abort      dotnet --info

Configuration

➜  ~ dotnet --list-sdks
3.1.403 [/usr/share/dotnet/sdk]
➜  ~ dotnet --list-runtimes
Microsoft.AspNetCore.App 3.1.9 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.9 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
➜  ~ cat /etc/os-release 
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

Debian 10, x64

Regression?

This did work before, with 2.1.22.

Other information

Not sure how to proceed to debug this. I'd like to resolve this on my current system without reinstalling. Running this on vagrant/docker/new vm seems to work just fine.

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added area-System.Globalization untriaged New issue has not been triaged by the area owner labels Oct 20, 2020
@ghost
Copy link

ghost commented Oct 20, 2020

Tagging subscribers to this area: @tarekgh, @safern, @krwq
See info in area-owners.md if you want to be subscribed.

@safern
Copy link
Member

safern commented Oct 20, 2020

Thanks @krisfremen -- could you please run geticu on the console and paste the output here?

@krisfremen
Copy link
Author

Hi @safern, it seems to be not valid. Does this belong to particular package?

➜  ~ geticu     
zsh: command not found: geticu

@krwq
Copy link
Member

krwq commented Oct 20, 2020

@krisfremen yes, ICU package, I think if you install it it will start working. How did you get dotnet? Did you install it with package manager or used the tarball? @tarekgh do we always require ICU or do we have a mode where we fallback to some behavior if it's not available? If we require it and you used a package manager then I think we should file an issue to make sure package has a dependency on ICU

@safern
Copy link
Member

safern commented Oct 20, 2020

@krwq for Unix we always require ICU to be installed... yeah it seems like your missing installing ICU, if you had it the command I shared would've worked.

@krisfremen
Copy link
Author

@safern @krwq

libicu63 is installed, looking over the strace, dotnet seems to be loading it when running.
Tried also installing unicode-cldr-core but it didn't make a difference.

I installed using https://docs.microsoft.com/en-us/dotnet/core/install/linux-debian and this was the case for the earlier versions which worked fine before, but now even installing the older versions seems to be ending up with the same issue.

@krisfremen
Copy link
Author

I was able to get it to run by export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1 but I have a feeling this isn't a great approach.

@krisfremen
Copy link
Author

@safern @krwq thanks! your ICU direction gave me something to look into!

# icuinfo                                                                                                                                                                                                        
 <icuSystemParams type="icu4c">
    <param name="copyright"> Copyright (C) 2016 and later: Unicode, Inc. and others. License & terms of use: http://www.unicode.org/copyright.html </param>
    <param name="product">icu4c</param>
    <param name="product.full">International Components for Unicode for C/C++</param>
    <param name="version">63.1</param>
    <param name="version.unicode">11.0</param>
    <param name="platform.number">4000</param>
    <param name="platform.type">Linux</param>
    <param name="locale.default">en_US</param>
    <param name="locale.default.bcp47">en-US</param>
    <param name="converter.default">UTF-8</param>
    <param name="icudata.name">icudt63l</param>
    <param name="icudata.path"></param>
  <!-- n="cldr.version" ERROR: U_MISSING_RESOURCE_ERROR -->
  <!-- n="tz.version" ERROR: U_MISSING_RESOURCE_ERROR -->
    <param name="tz.default">Etc/UTC</param>
    <param name="cpu.bits">64</param>
    <param name="cpu.big_endian">0</param>
    <param name="os.wchar_width">4</param>
    <param name="os.charset_family">0</param>
    <param name="os.host">x86_64-pc-linux-gnu</param>
    <param name="build.build">x86_64-pc-linux-gnu</param>
    <param name="build.cc">gcc</param>
    <param name="build.cxx">g++</param>
    <param name="uconfig.internal_digitlist">1</param>
    <param name="uconfig.have_parseallinput">1</param>
 </icuSystemParams>

ICU Initialization returned: U_INVALID_FORMAT_ERROR
Plugins are disabled.

Upon further digging around, I was able to figure out that a file was corrupted and reinstalled libicu63 and libicu-dev.

➜  ~ icuinfo
 <icuSystemParams type="icu4c">
    <param name="copyright"> Copyright (C) 2016 and later: Unicode, Inc. and others. License & terms of use: http://www.unicode.org/copyright.html </param>
    <param name="product">icu4c</param>
    <param name="product.full">International Components for Unicode for C/C++</param>
    <param name="version">63.1</param>
    <param name="version.unicode">11.0</param>
    <param name="platform.number">4000</param>
    <param name="platform.type">Linux</param>
    <param name="locale.default">en_US</param>
    <param name="locale.default.bcp47">en-US</param>
    <param name="converter.default">UTF-8</param>
    <param name="icudata.name">icudt63l</param>
    <param name="icudata.path"></param>
    <param name="cldr.version">34.0</param>
    <param name="tz.version">2018e</param>
    <param name="tz.default">Etc/UTC</param>
    <param name="cpu.bits">64</param>
    <param name="cpu.big_endian">0</param>
    <param name="os.wchar_width">4</param>
    <param name="os.charset_family">0</param>
    <param name="os.host">x86_64-pc-linux-gnu</param>
    <param name="build.build">x86_64-pc-linux-gnu</param>
    <param name="build.cc">gcc</param>
    <param name="build.cxx">g++</param>
    <param name="uconfig.internal_digitlist">1</param>
    <param name="uconfig.have_parseallinput">1</param>
 </icuSystemParams>


ICU Initialization returned: U_ZERO_ERROR
Plugins are disabled.
➜  ~ dotnet --info
.NET Core SDK (reflecting any global.json):
 Version:   3.1.403
 Commit:    9e895200cd

Runtime Environment:
 OS Name:     debian
 OS Version:  10
 OS Platform: Linux
 RID:         debian.10-x64
 Base Path:   /usr/share/dotnet/sdk/3.1.403/

Host (useful for support):
  Version: 3.1.9
  Commit:  774fc3d6a9

.NET Core SDKs installed:
  3.1.403 [/usr/share/dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.App 3.1.9 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.1.9 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download

Success!

@safern
Copy link
Member

safern commented Oct 20, 2020

I'm glad you sorted it out! Please do reach out if you hit any other errors!

@ghost ghost locked as resolved and limited conversation to collaborators Dec 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Globalization untriaged New issue has not been triaged by the area owner
Projects
None yet
Development

No branches or pull requests

4 participants