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

net: non-blocking UDP read on OS X 10.8.2 12C60 #4796

Closed
gopherbot opened this issue Feb 12, 2013 · 11 comments
Closed

net: non-blocking UDP read on OS X 10.8.2 12C60 #4796

gopherbot opened this issue Feb 12, 2013 · 11 comments

Comments

@gopherbot
Copy link

by gaspode:

On OSX, making a UDP socket with ListenUDP, and then using Read/ReadFrom/ReadFromUDP
will not block. It blocks fine on linux.

This example program demonstrates the problem by spinning endlessly on OSX, while it
blocks and waits for a UDP packet on linux.

Attachments:

  1. test.go (525 bytes)
@gopherbot
Copy link
Author

Comment 1 by gaspode:

I should add, this exists on Go tip as well as Go 1.0.3 release under my testing.

@rsc
Copy link
Contributor

rsc commented Feb 13, 2013

Comment 2:

Blocks fine for me at tip. What does 'sw_vers' print on your Mac?
What does your test program print when you run it?

@gopherbot
Copy link
Author

Comment 3 by gaspode:

I'm on:
$ sw_vers 
ProductName:    Mac OS X
ProductVersion: 10.8.2
BuildVersion:   12C60
Another person on the #go-nuts channel also had the same thing occur when they ran the
test.go program.

@davecheney
Copy link
Contributor

Comment 4:

The example code blocks for me
imac:~ dfc$ go version
go version devel +6837136b5df8 Thu Feb 07 00:39:52 2013 +0800 darwin/386
This is a Snow Leopard (10.6) host.

@rsc
Copy link
Contributor

rsc commented Feb 14, 2013

Comment 5:

What does the program print when you run it?

@gopherbot
Copy link
Author

Comment 6 by gaspode:

It runs through printing that it got 0 bytes, no errors, over and over, hundreds of
times per second (no blocking on the call, no error on the return).

@rsc
Copy link
Contributor

rsc commented Feb 14, 2013

Comment 7:

This sounds like it might be a kernel bug. My 10.8.2 machine works fine,
but I have build 12C2034 not 12C60. (See
http://en.wikipedia.org/wiki/OS_X_Mountain_Lion#Release_history). Perhaps
the upcoming 10.8.3 will fix this.
Russ

@rsc
Copy link
Contributor

rsc commented Mar 12, 2013

Comment 8:

From the online rumors it sounds like 10.8.3 will be out soon. I hope that it will fix
this bug.

Labels changed: added priority-later, removed priority-triage.

Status changed to Accepted.

@rsc
Copy link
Contributor

rsc commented Mar 12, 2013

Comment 9:

[The time for maybe has passed.]

Labels changed: removed go1.1maybe.

@gopherbot
Copy link
Author

Comment 10 by gaspode:

I just tested this again today, it no longer occurs. We did update Go though to a newer
tip, so maybe that fixed it.

@mikioh
Copy link
Contributor

mikioh commented May 8, 2013

Comment 11:

OS X 10.8.3 build 12D78 (Darwin 12.3) fixes this issue, seems like.

Status changed to Retracted.

@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants