runtime icon indicating copy to clipboard operation
runtime copied to clipboard

HostFxr Fails to resolve hostpolicy from additionalprobingpath on CentOS

Open brthor opened this issue 10 years ago • 15 comments

See failures here: http://dotnet-ci.cloudapp.net/job/dotnet_core-setup/job/release_1.0.0/job/debug_centos7.1_x64_prtest/74

Going to skip the test exposing this issue for the time being.

brthor avatar Jun 08 '16 20:06 brthor

And it does not repro on other platforms?

Thanks, Gaurav

-------- Original message -------- From: Bryan Thornbury [email protected] Date: 6/8/16 1:48 PM (GMT-08:00) To: dotnet/core-setup [email protected] Subject: [dotnet/core-setup] HostFxr Fails to resolve hostpolicy from cache on CentOS (#121)

See failures here: http://dotnet-ci.cloudapp.net/job/dotnet_core-setup/job/release_1.0.0/job/debug_centos7.1_x64_prtest/74https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fdotnet-ci.cloudapp.net%2fjob%2fdotnet_core-setup%2fjob%2frelease_1.0.0%2fjob%2fdebug_centos7.1_x64_prtest%2f74&data=01%7c01%7cGaurav.Khanna%40microsoft.com%7c2cd53d2610d44cf17bdf08d38fde32f5%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=Uj2JGtecMMHyJ8TLVlI%2bd2PidCpQk3KSrBJtGYnUm8A%3d

Going to skip the test exposing this issue for the time being.

You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/dotnet/core-setup/issues/121, or mute the threadhttps://github.com/notifications/unsubscribe/AJA3wZhtxqwmlbLUq_z7G0khDeR4436Oks5qJyqFgaJpZM4IxYgX.

gkhanna79 avatar Jun 08 '16 20:06 gkhanna79

No, CentOS only. @schellap has a good understanding, it seems to have something to do with CentOS rids not falling back to Rhel rids.

The same failing test was passing on all other platforms here: https://github.com/dotnet/core-setup/pull/97

There is an associated CLI issue which caused this bug to be exposed, but both should be fixed: https://github.com/dotnet/cli/issues/3440

brthor avatar Jun 08 '16 21:06 brthor

Matt?

Thanks, Gaurav

-------- Original message -------- From: Bryan Thornbury [email protected] Date: 6/8/16 2:04 PM (GMT-08:00) To: dotnet/core-setup [email protected] Cc: "Gaurav Khanna (CLR)" [email protected], Comment [email protected] Subject: Re: [dotnet/core-setup] HostFxr Fails to resolve hostpolicy from additionalprobingpath on CentOS (#121)

No, CentOS only. @schellaphttps://github.com/schellap has a good understanding, it seems to have something to do with CentOS rids not falling back to Rhel rids.

You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/dotnet/core-setup/issues/121#issuecomment-224727086, or mute the threadhttps://github.com/notifications/unsubscribe/AJA3wWXitjRxld9khoTEeHguc9xxtA_Fks5qJy5FgaJpZM4IxYgX.

gkhanna79 avatar Jun 08 '16 21:06 gkhanna79

Does this need to be fixed for RTM? Given the "emitEntryPoint" discovery? We do probe the app dir as fallback.

Could not find required library libhostpolicy.so in 2 probing paths:
12:06:19         /mnt/resource/j/workspace/dotnet_core-setup/release_1.0.0/debug_centos7.1_x64_prtest/.nuget/packages
12:06:19         /mnt/resource/j/workspace/dotnet_core-setup/release_1.0.0/debug_centos7.1_x64_prtest/.nuget/packages
12:06:19       A fatal error was encountered. The library 'libhostpolicy.so' required to execute the application was not found in '/mnt/resource/j/workspace/dotnet_core-setup/release_1.0.0/debug_centos7.1_x64_prtest/artifacts/centos.7-x64/tests/artifacts/0/StandaloneTestApp/bin'.

schellap avatar Jun 08 '16 21:06 schellap

it seems to have something to do with CentOS rids not falling back to Rhel rids.

@ellismg What are your thoughts on this?

Given the "emitEntryPoint" discovery?

@schellap What is this?

gkhanna79 avatar Jun 08 '16 22:06 gkhanna79

We have the fallback for CentOS because there is binary compatibility between RHEL and CentOS. CentOS is a rebuild of RHEL removing Red Hat specific branding. Note that we have some additional RIDs in the graph that fall back as well (ol, which is Oracle Linux).

ellismg avatar Jun 08 '16 22:06 ellismg

@ellismg So is there any RID fallback bug for CentOS as alluded to above in the RID fallback graph? Or, is the bug in the host not being able to support it @brthor @schellap ?

gkhanna79 avatar Jun 08 '16 22:06 gkhanna79

The emitEntrypoint being present in a test app is not guaranteed as xunit tests are actually libraries and the host is not required in the output for it to be runnable. If all else fails it could be a workaround for this scenario however (only on CentOS).

brthor avatar Jun 08 '16 22:06 brthor

This scenario is only present for the case of standalone test apps (a scenario which may not be important going forward), where hostpolicy.dll needs to be resolved from the additionalprobingpath. Given that we have an easy workaround emitEntrypoint: true, I don't think this needs to be a blocking bug.

brthor avatar Jun 09 '16 16:06 brthor

Thanks @brthor but I am still not clear why is this an issue only on CentOS. Can you please elaborate on it? Is there a RID fallback bug in the fallback graph or the host? If the latter, why does this not show in other platforms?

gkhanna79 avatar Jun 09 '16 16:06 gkhanna79

Hostfxr uses the current rid in an attempt to find hostpolicy from the graph of the application. In the case of CentOS there is no centos hostpolicy package, only rhel, since they are binary compatible. But since hostfxr doesn't know about rid fallback it fails to find hostpolicy.

This would only exist on platforms where we don't ship an explicit host package, but rely on rid fallback.

This is my understanding after discussing with @schellap

brthor avatar Jun 09 '16 16:06 brthor

But since hostfxr doesn't know about rid fallback it fails to find hostpolicy.

Thanks for the explanation @brthor. How come we didnt run into this earlier and only now?

@schellap This sounds like a bug in hostfxr. Do you have a sense of the fix?

gkhanna79 avatar Jun 09 '16 16:06 gkhanna79

Thanks for the explanation @brthor. How come we didnt run into this earlier and only now?

Standalone test apps aren't a widely used scenario and it appears we have a gap there in cli testing (all of our test apps are portable). This scenario will become non-existent if standalone were a publish-time decision, and not build time.

brthor avatar Jun 09 '16 16:06 brthor

Sounds good.

gkhanna79 avatar Jun 09 '16 16:06 gkhanna79

@eerhardt and I chatted about this and he confirmed that this issue is no longer applicable to the new CLI. Also, we have not seen this issue reported in the wild.

Given the above, we will close the issue and reopen it if it surfaces on 2.0 in future.

gkhanna79 avatar Feb 14 '17 23:02 gkhanna79