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/http/cgi: TestCopyError is flaky on some darwin/386 #4958

Closed
rsc opened this issue Mar 1, 2013 · 8 comments
Closed

net/http/cgi: TestCopyError is flaky on some darwin/386 #4958

rsc opened this issue Mar 1, 2013 · 8 comments
Milestone

Comments

@rsc
Copy link
Contributor

rsc commented Mar 1, 2013

The darwin/386 builder is seeing failures in TestCopyError under the new scheduler. I
cannot reproduce on my MacBook Pro.
http://build.golang.org/log/8df837667431c9a8a9bbac8d5c039c6a46bff530
@gopherbot
Copy link

Comment 1 by divoxx:

I can't reproduce on my MBP as well... do we known the model or version of OSX of the
env that this happens?

@minux
Copy link
Member

minux commented Mar 1, 2013

Comment 2:

all we know is that the builder runs OS X 10.7 on 2011 Mac Mini, 2.4Ghz Core i5.
(see https://code.google.com/p/go-wiki/wiki/DashboardBuilders)
because they are run by dave, perhaps we can ask him to provide more details.

@davecheney
Copy link
Contributor

Comment 3:

Yup, mac mini running Lion 10.7.5.
odessa(~) % uname -a
Darwin odessa.local 11.4.2 Darwin Kernel Version 11.4.2: Thu Aug 23 16:25:48 PDT 2012;
root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64

@dvyukov
Copy link
Member

dvyukov commented Mar 2, 2013

Comment 4:

Can't reproduce it on MacBook Air 10.8.2 as well. Run 1000+ times.

@bradfitz
Copy link
Contributor

bradfitz commented Mar 4, 2013

Comment 5:

I looked at the test, trying to eyeball the flakiness, but it seems fine.
The parent host process has just started reading 1 MB from the child process.  The child
must have been there if the headers were all read correctly, and the child shouldn't
already be gone, since it has 1 MB of data to write.  It's not possible that on older OS
X, the pipe has a buffer size >= 1 MB, is it?
The other possibility is that isProcessRunning (signals?) is unreliable on old OS X:
from posix_test.go:
func isProcessRunning(t *testing.T, pid int) bool {
    p, err := os.FindProcess(pid)
    if err != nil {
        return false
    }
        return p.Signal(syscall.Signal(0)) == nil
}

@rsc
Copy link
Contributor Author

rsc commented Mar 4, 2013

Comment 6:

OS X uses some tricks to expand the pipe buffers if it decides that doing
so would make programs would run faster, up to a true maximum of 16 MB. The
exact code seems to change from version to version, but the 10.7.5 kernel
that Dave reported does include this code. Perhaps running the builder in a
loop was enough to make the kernel think this was a worthwhile
optimization. :-)

@bradfitz
Copy link
Contributor

bradfitz commented Mar 4, 2013

Comment 7:

Crazy. Sent out https://golang.org/cl/7453049

@bradfitz
Copy link
Contributor

bradfitz commented Mar 4, 2013

Comment 8:

This issue was closed by revision 7903e36.

Status changed to Fixed.

@rsc rsc added fixed labels Mar 4, 2013
@rsc rsc added this to the Go1.1 milestone Apr 14, 2015
@rsc rsc removed the go1.1 label Apr 14, 2015
@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

6 participants