-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
NetworkInterface.GetPhysicalAddress().GetAddressBytes() seems problematic with LLVM enabled on Android x86_64 #75155
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Tagging subscribers to 'arch-android': @steveisok, @akoeplinger Issue DetailsDescriptionWe have a test in xamarin-android that compares network interface information obtained from mono vs java that is producing inconsistent results. When this test runs on an x86_64 emulator without AOT+LLVM enabled it passes, but when LLVM is enabled it fails. I have trimmed this down to a smaller repro project that I have attached. The problematic code appears to be as follows: foreach (var inf in NetworkInterface.GetAllNetworkInterfaces ()) {
byte[] bytes = inf.GetPhysicalAddress ().GetAddressBytes ();
if (bytes.All (x => x == 0)) {
// Condition is true for interfaces with physical addresses when LLVM is enabled, and false when LLVM is disabled
}
} Reproduction Steps
Expected behaviorWhen building in debug without AOT/LLVM enabled, I see that a couple of network interfaces with physical addresses will return false when checking if their physical address bytes are all zero. Actual behaviorWhen building with AOT/LLVM enabled, I see that the network interfaces that had physical addresses will return true when checking if their physical address bytes are all zero. Regression?No response Known WorkaroundsNo response ConfigurationThis issue is present when running on an an Android x86_64 emulator, using an Android SDK built against the following: <Dependency Name="Microsoft.Dotnet.Sdk.Internal" Version="7.0.100-rc.2.22426.5">
<Uri>https://github.com/dotnet/installer</Uri>
<Sha>2d1a4de6b2da59647a9538bf9cc4e252847e6231</Sha>
</Dependency>
<Dependency Name="Microsoft.NETCore.App.Ref" Version="7.0.0-rc.1.22422.12" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>ef077d0b58ffddcf54fa73bd85dace6b999b8992</Sha>
</Dependency> Other informationNo response
|
Tagging subscribers to this area: @dotnet/ncl Issue DetailsDescriptionWe have a test in xamarin-android that compares network interface information obtained from mono vs java that is producing inconsistent results. When this test runs on an x86_64 emulator without AOT+LLVM enabled it passes, but when LLVM is enabled it fails. I have trimmed this down to a smaller repro project that I have attached. The problematic code appears to be as follows: foreach (var inf in NetworkInterface.GetAllNetworkInterfaces ()) {
byte[] bytes = inf.GetPhysicalAddress ().GetAddressBytes ();
if (bytes.All (x => x == 0)) {
// Condition is true for interfaces with physical addresses when LLVM is enabled, and false when LLVM is disabled
}
} Reproduction Steps
Expected behaviorWhen building in debug without AOT/LLVM enabled, I see that a couple of network interfaces with physical addresses will return false when checking if their physical address bytes are all zero. Actual behaviorWhen building with AOT/LLVM enabled, I see that the network interfaces that had physical addresses will return true when checking if their physical address bytes are all zero. Regression?No response Known WorkaroundsNo response ConfigurationThis issue is present when running on an an Android x86_64 emulator, using an Android SDK built against the following: <Dependency Name="Microsoft.Dotnet.Sdk.Internal" Version="7.0.100-rc.2.22426.5">
<Uri>https://github.com/dotnet/installer</Uri>
<Sha>2d1a4de6b2da59647a9538bf9cc4e252847e6231</Sha>
</Dependency>
<Dependency Name="Microsoft.NETCore.App.Ref" Version="7.0.0-rc.1.22422.12" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>ef077d0b58ffddcf54fa73bd85dace6b999b8992</Sha>
</Dependency> Other informationNo response
|
/cc @vargaz @lambdageek Not sure if this should be a 7.0 or 8.0 issue. |
I think this is worth backporting either way. @SamMonoRT could you assign this? |
@vargaz can you take a look? |
Probably fixed by: |
It appears that an Android NDK installation is no longer needed when using Aot with LLVM. Projects which enable Aot and LLVM will no longer attempt to use the NDK unless it is explicitly requested by setting `$(AndroidNdkDirectory)` to a valid NDK path in the project file. This also enables tests for LLVM with a few categories turned off for now: * `InetAccess`: dotnet/runtime#73304 * `NetworkInterfaces`: dotnet/runtime#75155
Context: dotnet/runtime#73304 Context: dotnet/runtime#75155 The issues for these should be fixed in .NET 7 RC 2.
It is actually in rc2, can somebody check whenever it works now ? |
Context: dotnet/runtime#73304 Context: dotnet/runtime#75155 The issues for these should be fixed in .NET 7 RC 2.
Context: dotnet/runtime#73304 Context: dotnet/runtime#75155 The issues for these should be fixed in .NET 7 RC 2.
Context: dotnet/runtime#73304 Context: dotnet/runtime#75155 The issues for these should be fixed in .NET 7 RC 2.
Description
We have a test in xamarin-android that compares network interface information obtained from mono vs java that is producing inconsistent results. When this test runs on an x86_64 emulator without AOT+LLVM enabled it passes, but when LLVM is enabled it fails. I have trimmed this down to a smaller repro project that I have attached. The problematic code appears to be as follows:
Reproduction Steps
Build xamarin-android/main, or install the workload packs produced by a recent build from CI.
Download the DroidTestIface.zip repro project and run it on an x86_64 emulator:
Expected behavior
When building in debug without AOT/LLVM enabled, I see that a couple of network interfaces with physical addresses will return false when checking if their physical address bytes are all zero.
Actual behavior
When building with AOT/LLVM enabled, I see that the network interfaces that had physical addresses will return true when checking if their physical address bytes are all zero.
Regression?
No response
Known Workarounds
No response
Configuration
This issue is present when running on an an Android x86_64 emulator, using an Android SDK built against the following:
Other information
No response
The text was updated successfully, but these errors were encountered: