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

The call to Dns.GetHostEntry() may fail on MacOS #1927

Merged
merged 5 commits into from
Sep 29, 2022

Conversation

pgrawehr
Copy link
Contributor

@pgrawehr pgrawehr commented Sep 18, 2022

... only ever seen there.

Saw at least one instance of this crash during a test run:

Der aktive Testlauf wurde abgebrochen. Grund: Der Testhostprozess ist abgestürzt. : Unhandled exception. System.Net.Internals.SocketExceptionFactory+ExtendedSocketException (00000005, 0xFFFDFFFF): nodename nor servname provided, or not known
   at System.Net.Dns.GetHostEntryOrAddressesCore(String hostName, Boolean justAddresses, AddressFamily addressFamily, ValueStopwatch stopwatch)
   at System.Net.Dns.GetHostEntry(String hostNameOrAddress, AddressFamily family)
   at System.Net.Dns.GetHostEntry(String hostNameOrAddress)
   at Iot.Device.Nmea0183.NmeaUdpServer.UdpClientStream.Read(Byte[] buffer, Int32 offset, Int32 count) in /Users/patrick/projects/iot/src/devices/Nmea0183/NmeaUdpServer.cs:line 258
   at System.IO.StreamReader.ReadBuffer()
   at System.IO.StreamReader.ReadLine()
   at Iot.Device.Nmea0183.NmeaParser.Parser() in /Users/patrick/projects/iot/src/devices/Nmea0183/NmeaParser.cs:line 129
   at System.Threading.Thread.StartCallback()

I was not able to reproduce the issue after the fix, however the MacOS build is still very unstable on the build servers.

Microsoft Reviewers: Open in CodeFlow

@pgrawehr pgrawehr self-assigned this Sep 18, 2022
@ghost ghost added the area-device-bindings Device Bindings for audio, sensor, motor, and display hardware that can used with System.Device.Gpio label Sep 18, 2022
@pgrawehr
Copy link
Contributor Author

/azp run dotnet.iot

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Maybe this avoids the concurrency problems?
Therefore split up sample folders containing multiple
projects into subfolders. This fixes the macOS build and
also some weird issues on other operating systems (such
as the debugger getting confused about which one to execute)
@pgrawehr
Copy link
Contributor Author

Make sure all the sample projects sit in their own folder - this fixes the MacOS build and also some potential other problems.

@joperezr joperezr merged commit eae8a70 into dotnet:main Sep 29, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Dec 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-device-bindings Device Bindings for audio, sensor, motor, and display hardware that can used with System.Device.Gpio
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants