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

build: windows 8 build failure #4723

Closed
alexbrainman opened this issue Jan 29, 2013 · 44 comments
Closed

build: windows 8 build failure #4723

alexbrainman opened this issue Jan 29, 2013 · 44 comments
Milestone

Comments

@alexbrainman
Copy link
Member

reported by user https://groups.google.com/d/msg/golang-nuts/AcFOgsqpq48/rx7aS9FQN64J

There are too many errors. I think we should investigate why. Perhaps some tests needs
to be changed.

Alex
@rsc
Copy link
Contributor

rsc commented Jan 30, 2013

Comment 2:

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

@alexbrainman
Copy link
Member Author

Comment 3:

Arie,
Are you administrator on this pc?
Do you have C:\Windows\system32\drivers\etc\hosts file on your system? If you do, can
you open it with an editor (notepad)?
Do you have a "HKEY_CLASSES_ROOT\.bmp\Content Type" key in your registry (use regedit to
look)? What about ""HKEY_CLASSES_ROOT\.bmp"?
Thank you.
Alex

@gopherbot
Copy link
Contributor

Comment 4 by xapwing:

Hi Alex,
1) i am administrator on W8
2) there is no hosts file present on my system
3) there is no "HKEY_CLASSES_ROOT\.bmp\Content Type" key
4) "HKEY_CLASSES_ROOT\.bmp" contains the following keys ...
      OpenWithList
      OpenWithProgids
      PersistentHandler
      Shellnew
      ... and the following values:
      (default) : no value
      ItemName : @%systemroot%\system32\mspaint.exe,-59414
      NullFile : no value
Regards,
   Arie

@alexbrainman
Copy link
Member Author

Comment 5:

Arie,
> 2) there is no hosts file present on my system
That is cool, we could ignore checking for "hosts" file. What about others? Do you have
files "networks", "protocol" and "services" in C:\Windows\system32\drivers\etc ?
> 3) there is no "HKEY_CLASSES_ROOT\.bmp\Content Type" key
Go mime package tests assume that every user have mime-strings for at least ".bmp" and
".png" extensions. It doesn't look to hold true in your case for some reason or another.
So will try to find other extensions that will work for you. Here
http://play.golang.org/p/i-YINWyd1q is a program that prints all mime pairs on windows
system. Please, run it on your computer and post your results here. We will check if
".bmp" and ".png" are present, and will decide on their replacements, if they are not.
You might decide not to show this list here on public forum, and that is OK. But please
check for ".bmp" and ".png" yourself then, and pick *common* alternative extensions
(like .txt or .xml) that we could use instead.
Thank you.
Alex

@gopherbot
Copy link
Contributor

Comment 6 by xapwing:

Alex,
2) however, networks, protocol, services and lmhosts.sam are present
3) the program won't compile:
.\mimes.go:13: undefined: syscall.UTF16PtrFromString

.\mimes.go:35: undefined: syscall.UTF16PtrFromString

.\mimes.go:43: undefined: syscall.UTF16PtrFromString
Which appears to be consistent with docs here http://golang.org/pkg/syscall/
HTH,
   Arie

@alexbrainman
Copy link
Member Author

Comment 7:

Arie,
> 2) however, networks, protocol, services and lmhosts.sam are present
Good. We don't assume host file is present during tests anymore: http://goo.gl/e6j6e.
So, if you update to the tip, os tests should PASS now.
> 3) the program won't compile:
> .\mimes.go:13: undefined: syscall.UTF16PtrFromString
> .\mimes.go:35: undefined: syscall.UTF16PtrFromString
> .\mimes.go:43: undefined: syscall.UTF16PtrFromString
Well. I am on tip,
C:\>go version
go version devel +86c70475d48f Tue Feb 12 16:13:14 2013 -0500 windows/386
... and I have this function:
C:\>godoc syscall UTF16PtrFromString
PACKAGE
package syscall
    import "syscall"
FUNCTIONS
func UTF16PtrFromString(s string) (*uint16, error)
    UTF16PtrFromString returns pointer to the UTF-16 encoding of the UTF-8
    string s, with a terminating NUL added. If s contains a NUL byte at any
    location, it returns (nil, EINVAL).
...
The function has been introduced http://goo.gl/U3YYV more then 6 month ago.
I think you are not on tip. Can you run "go version" and "go env" commands and show us
output here, please.
> Which appears to be consistent with docs here http://golang.org/pkg/syscall/
The http://golang.org/pkg/syscall/ displays latest release version (I think go-1.0.3),
not the tip. http://tip.golang.org/pkg/syscall/ shows current tip. But you shouldn't use
even that, because it shows host version of syscall package (linux or darwin, I doubt
that runs windows :0). For windows version, you would have to run "godoc -http=..."
command and use your browser locally.
Thank you.
Alex

@gopherbot
Copy link
Contributor

Comment 8 by xapwing:

Hi Alex,
yes, I am using the binary install 1.0.3. The building of Go Tip I did was just an extra
to help you out.
However, I will start using Go Tip built system and give you the results ;-)
Arie

@gopherbot
Copy link
Contributor

Comment 9 by xapwing:

Hi Alex,
am now using Go Tip for "production" as well ;-)
Ran your prog. I think the following mimes would be appropriate:
   .html: text/html
   .txt: text/plain
as these are *very* common and standard
HTH, Arie

@alexbrainman
Copy link
Member Author

Comment 10:

> ... I think the following mimes would be appropriate:
>    .html: text/html
>    .txt: text/plain
Unfortunately, these types are special (they are hard coded in mime package). You can
try and change initMimeForTests in type_windows.go to see that they don't work and why.
I propose we change bmp for wav instead:
diff -r 31065f4dbca5 src/pkg/mime/type_windows.go
--- a/src/pkg/mime/type_windows.go  Wed Feb 13 22:34:37 2013 -0500
+++ b/src/pkg/mime/type_windows.go  Thu Feb 14 15:18:01 2013 +1100
@@ -58,7 +58,7 @@
 
 func initMimeForTests() map[string]string {
    return map[string]string{
-       ".bmp": "image/bmp",
+       ".wav": "audio/wav",
        ".png": "image/png",
    }
 }
Can you see, if that change fixes your mime test, please?
Also, please, update your source to the tip, run all tests and post your log here. I
would like to see changes in os and net packages I have made to fix some of your
problems.
Thank you.
Alex

@gopherbot
Copy link
Contributor

Comment 11 by xapwing:

Hi Alex,
So I ...
1) downloaded latest Go Tip sources
2) patched src/pkg/mime/type_windows.go as you asked
3) built Go Tip
4) checked go version: go version devel +8c44c45a208e Thu Feb 14 19:41:58 2013 +1100
windows/386
5) included the tests logfile
HTH, Arie

Attachments:

  1. log.txt (9964 bytes)

@gopherbot
Copy link
Contributor

Comment 12 by shakeel.mahate:

I am trying to build exp package on Windows 7 and go version 1.0.3. I followed the steps
in http://code.google.com/p/go-wiki/wiki/InstallingExp to download the exp package in my
GOPATH.
Running go install exp/... yields the following build failures
# exp/winfsnotify
c:\data\gocode\src\exp\winfsnotify\winfsnotify.go:159: undefined:
syscall.UTF16PtrFromString
c:\data\gocode\src\exp\winfsnotify\winfsnotify.go:177: undefined:
syscall.UTF16PtrFromString
FAIL exp/winfsnotify [build failed]
Let me know if you need any more information. I am Administrator for my local machine, I
have the Windows\System32\drivers\etc\hosts file. I installed MinGW and have MinGW\bin
on my path.
Additionally my work machine is located behind a proxy server.
Shakeel

@alexbrainman
Copy link
Member Author

Comment 13:

Shakeel,
I have created a separate issue https://golang.org/issue/4809.
Please, try my suggestions there.
Thank you.
Alex

@alexbrainman
Copy link
Member Author

Comment 14:

Arie,
I am trying to understand what is happening in net.TestShutdown now. I have added better
error checking:
diff -r c11d4d0da2ba src/pkg/net/net_test.go
--- a/src/pkg/net/net_test.go   Mon Feb 18 14:40:47 2013 -0800
+++ b/src/pkg/net/net_test.go   Tue Feb 19 14:31:04 2013 +1100
@@ -5,6 +5,7 @@
 package net
 
 import (
+   "fmt"
    "io"
    "io/ioutil"
    "os"
@@ -24,18 +25,33 @@
        }
    }
 
-   go func() {
+   srvch := make(chan error, 1)
+
+   go func() (serr error) {
+       defer func() {
+           srvch <- serr
+       }()
        c, err := ln.Accept()
        if err != nil {
-           t.Fatalf("Accept: %v", err)
+           return fmt.Errorf("Accept: %v", err)
        }
        var buf [10]byte
        n, err := c.Read(buf[:])
        if n != 0 || err != io.EOF {
-           t.Fatalf("server Read = %d, %v; want 0, io.EOF", n, err)
+           return fmt.Errorf("Read = %d, %v; want 0, io.EOF", n, err)
        }
-       c.Write([]byte("response"))
-       c.Close()
+       n, err = c.Write([]byte("response"))
+       if err != nil {
+           return fmt.Errorf("Write: n=%d %v", n, err)
+       }
+       if n != len("response") {
+           return fmt.Errorf("n=%d bytes written", n)
+       }
+       err = c.Close()
+       if err != nil {
+           return fmt.Errorf("Close: %v", err)
+       }
+       return nil
    }()
 
    c, err := Dial("tcp", ln.Addr().String())
@@ -51,12 +67,16 @@
    var buf [10]byte
    n, err := c.Read(buf[:])
    if err != nil {
-       t.Fatalf("client Read: %d, %v", n, err)
+       t.Errorf("client Read: %d, %v", n, err)
    }
    got := string(buf[:n])
    if got != "response" {
        t.Errorf("read = %q, want \"response\"", got)
    }
+   err = <-srvch
+   if err != nil {
+       t.Errorf("server failed: %v", err)
+   }
 }
 
 func TestShutdownUnix(t *testing.T) {
Can you, please, run it like "go test -run Shut -v -timeout=3s" and report your result.
Thank you.
Also, please check that you do not have any antivirus / firewall programs running that
could interfere with our network tests.
Alex

@gopherbot
Copy link
Contributor

Comment 15 by xapwing:

Hi Alex,
the previous time I applied the change manually (only a few changes). This time is a big
change.
How can I apply such change automatically? I already installed diff for Windows, but
don't know how to apply your changes.
Thx,  /Arie

@gopherbot
Copy link
Contributor

Comment 16 by xapwing:

Hi Alex,
found it myself :-)
Here is the result:
=== RUN TestShutdown
--- PASS: TestShutdown (0.01 seconds)
=== RUN TestShutdownUnix
--- SKIP: TestShutdownUnix (0.00 seconds)
net_test.go:85:     skipping test on "windows"
PASS
ok      _/D_/src/Go/gotip/go/src/pkg/net    3.095s
Regards,
   Arie

@alexbrainman
Copy link
Member Author

Comment 17:

That is strange - no error!
Can you, please, run all net tests together "go test -short" and report your result.
Leave my changes in, but, please, update to the tip.
If all net tests PASS, please throw away my changes (hg revert -a) and run net tests
again. If that works, just run all tests again.
Thank you.
Alex

@gopherbot
Copy link
Contributor

Comment 18 by xapwing:

Hi Alex,
see log. I ran witout AV and firewall.
Thx,
   Arie

Attachments:

  1. log.txt (2698 bytes)

@gopherbot
Copy link
Contributor

Comment 19 by xapwing:

Hi,
attached the test results after latest GoTip but without your changes.
/Arie

Attachments:

  1. log.txt (5910 bytes)

@alexbrainman
Copy link
Member Author

Comment 20:

Hi Arie,
Your last log shows broken net.TestShutdown and couple of others all related to http.
Can you, please, apply my diffs from
https://golang.org/issue/4723?c=14 again and see if you can get
net.TestShutdown to break with these changes applied.
C:\go\root\src\pkg\net>go test -c
C:\go\root\src\pkg\net>.\net.test.exe -test.v -test.run=Shut
=== RUN TestShutdown
--- PASS: TestShutdown (0.00 seconds)
=== RUN TestShutdownUnix
--- SKIP: TestShutdownUnix (0.00 seconds)
        net_test.go:65: skipping test on "windows"
PASS
or to run many times
C:\go\root\src\pkg\net>for /l %a in (1, 1, 10) do .\net.test.exe -test.v -test.run=Shut
C:\go\root\src\pkg\net>.\net.test.exe -test.v -test.run=Shut
=== RUN TestShutdown
--- PASS: TestShutdown (0.00 seconds)
=== RUN TestShutdownUnix
--- SKIP: TestShutdownUnix (0.00 seconds)
        net_test.go:65: skipping test on "windows"
PASS
....
Thank you.
Alex

@gopherbot
Copy link
Contributor

Comment 21 by xapwing:

Hi,
ran it a few times. Shiver and see...
D:\src\Go\gotip\go\src\pkg\net>.\net.test.exe -test.v -test.run=Shut
=== RUN TestShutdown
--- PASS: TestShutdown (0.00 seconds)
=== RUN TestShutdownUnix
--- SKIP: TestShutdownUnix (0.00 seconds)
net_test.go:85:         skipping test on "windows"
PASS
D:\src\Go\gotip\go\src\pkg\net>.\net.test.exe -test.v -test.run=Shut
=== RUN TestShutdown
--- FAIL: TestShutdown (0.01 seconds)
net_test.go:70:         client Read: 0, EOF
net_test.go:74:         read = "", want "response"
=== RUN TestShutdownUnix
--- SKIP: TestShutdownUnix (0.00 seconds)
net_test.go:85:         skipping test on "windows"
FAIL
D:\src\Go\gotip\go\src\pkg\net>.\net.test.exe -test.v -test.run=Shut
=== RUN TestShutdown
--- PASS: TestShutdown (0.00 seconds)
=== RUN TestShutdownUnix
--- SKIP: TestShutdownUnix (0.00 seconds)
net_test.go:85:         skipping test on "windows"
PASS
D:\src\Go\gotip\go\src\pkg\net>
Thx,
   Arie

@alexbrainman
Copy link
Member Author

Comment 22:

Arie,
Unfortunately, your findings in net.TestShutdown don't help me any. They just confirm
what I saw before - the test behave unexpectedly - everything works well, except client
should be getting one last message before EOF, and it is not getting it. I am out of
ideas here. 
Lets try other broken tests, perhaps, they will shed some light. Lets see if we could
fix net/http.TestDirectoryIfNotModified.
I changed just one line here:
diff --git a/src/pkg/net/http/response.go b/src/pkg/net/http/response.go
--- a/src/pkg/net/http/response.go
+++ b/src/pkg/net/http/response.go
@@ -116,6 +116,7 @@
        }
        return nil, err
    }
+   println("line=", line)
    f := strings.SplitN(line, " ", 3)
    if len(f) < 2 {
        return nil, &badStringError{"malformed HTTP response", line}
my Go mercurial version is:
# hg id
33d3e7bbd3ef+ tip
Now my test output looks like:
# go test -v -run=TestDirectoryIfNotModified
=== RUN TestDirectoryIfNotModified
line= HTTP/1.1 200 OK
line= HTTP/1.1 304 Not Modified
line= HTTP/1.1 200 OK
--- PASS: TestDirectoryIfNotModified (0.01 seconds)
PASS
ok      net/http        0.022s
Can I, please, see yours. Thank you.
Alex

@gopherbot
Copy link
Contributor

Comment 23 by xapwing:

Hi Alex,
I :
- cloned 33d3e7bbd3ef+ and ran:
- patched response.go
- ran: go test -v -run=TestDirectoryIfNotModified
=> reults are in err.txt
Then I:
- built all sources (including your patch)
- ran all tests
=> results are in log.txt
Kind regards,
   Arie

Attachments:

  1. err.txt (1296 bytes)
  2. log.txt (7055 bytes)

@alexbrainman
Copy link
Member Author

Comment 24:

Arie,
> - cloned 33d3e7bbd3ef+ and ran:
> - patched response.go
> - ran: go test -v -run=TestDirectoryIfNotModified
> => reults are in err.txt
The reason you had errors from "go test ..." is that when you change Go repo revision,
you must rebuild everything first (I run make.bat on windows). Otherwise, all your tools
and libraries do not match their source code, and they get confused.
So I do
# hg id
33d3e7bbd3ef+ tip
# hg diff
diff -r 33d3e7bbd3ef src/pkg/net/http/response.go
--- a/src/pkg/net/http/response.go      Mon Feb 25 10:37:17 2013 +1100
+++ b/src/pkg/net/http/response.go      Tue Feb 26 10:41:31 2013 +1100
@@ -116,6 +116,7 @@
                }
                return nil, err
        }
+       println("line=", line)
        f := strings.SplitN(line, " ", 3)
        if len(f) < 2 {
                return nil, &badStringError{"malformed HTTP response", line}
#
Looks like correct version and correct changes. Then I run make.bat. And then I run my
test:
# cd $GOROOT/src/pkg/net/http
# go test -v -run=TestDirectoryIfNotModified
=== RUN TestDirectoryIfNotModified
line= HTTP/1.1 200 OK
line= HTTP/1.1 304 Not Modified
line= HTTP/1.1 200 OK
--- PASS: TestDirectoryIfNotModified (0.01 seconds)
PASS
ok      net/http        0.023s
#
> Then I:
> - built all sources (including your patch)
> - ran all tests
> => results are in log.txt
Looking at your log, I cannot see TestDirectoryIfNotModified failing. Your other log
https://golang.org/issue/4723?c=19 does show this test failure. So,
what is changed? Perhaps, you should run the test couple of times to see if it breaks at
least once. Please, report your results.
Also, after you finished with TestDirectoryIfNotModified, you could start investigating
errors in net/rpc. For example I made these changes:
# cd $GOROOT/src/pkg/net/rpc
# hg diff .
diff -r 33d3e7bbd3ef src/pkg/net/rpc/client.go
--- a/src/pkg/net/rpc/client.go Mon Feb 25 10:37:17 2013 +1100
+++ b/src/pkg/net/rpc/client.go Tue Feb 26 11:58:32 2013 +1100
@@ -8,6 +8,7 @@
        "bufio"
        "encoding/gob"
        "errors"
+       "fmt"
        "io"
        "log"
        "net"
@@ -228,6 +229,16 @@
        return DialHTTPPath(network, address, DefaultRPCPath)
 }
+type logger struct {
+       r io.Reader
+}
+
+func (l *logger) Read(p []byte) (n int, err error) {
+       n, err = l.r.Read(p)
+       fmt.Printf("Read(%d) = %d bytes read %q, %v\n", len(p), n, string(p[:n]), err)
+       return
+}
+
 // DialHTTPPath connects to an HTTP RPC server
 // at the specified network address and path.
 func DialHTTPPath(network, address, path string) (*Client, error) {
@@ -240,7 +251,8 @@
        // Require successful HTTP response
        // before switching to RPC protocol.
-       resp, err := http.ReadResponse(bufio.NewReader(conn), &http.Request{Method:
"CONNECT"})
+       resp, err := http.ReadResponse(bufio.NewReader(&logger{conn}),
&http.Request{Method: "CONNECT"})
+       fmt.Printf("resp=%#v err=%v\n", resp, err)
        if err == nil && resp.Status == connected {
                return NewClient(conn), nil
        }
And here is my test output:
# go test -run=TestHTTP
2013/02/26 11:58:46 Test RPC server listening on 127.0.0.1:49574
2013/02/26 11:58:46 Test HTTP RPC server listening on 127.0.0.1:55107
Read(4096) = 34 bytes read "HTTP/1.0 200 Connected to Go RPC\n\n", <nil>
line= HTTP/1.0 200 Connected to Go RPC
resp=&http.Response{Status:"200 Connected to Go RPC", StatusCode:200, Proto:"HTTP/1.0",
ProtoMajor:1, ProtoMinor:0, Header:http.Header{}, Body:(*http.body)(0x185d0080),
ContentLength:-1, TransferEncoding:[]string(nil), Close:true, Trailer:http.Header(nil),
Request:(*http.Request)(0x185c1000)} err=<nil>
2013/02/26 11:58:46 NewServer test RPC server listening on 127.0.0.1:49048
Read(4096) = 34 bytes read "HTTP/1.0 200 Connected to Go RPC\n\n", <nil>
line= HTTP/1.0 200 Connected to Go RPC
resp=&http.Response{Status:"200 Connected to Go RPC", StatusCode:200, Proto:"HTTP/1.0",
ProtoMajor:1, ProtoMinor:0, Header:http.Header{}, Body:(*http.body)(0x185df5c0),
ContentLength:-1, TransferEncoding:[]string(nil), Close:true, Trailer:http.Header(nil),
Request:(*http.Request)(0x18583690)} err=<nil>
PASS
ok      net/rpc 0.017s
#
Can you, please, show yours.
Thank you.
Alex

@gopherbot
Copy link
Contributor

Comment 25 by xapwing:

Hi, in:
# hg id
33d3e7bbd3ef+ tip
is "tip" part of the revision?
I used (hg): -r 33d3e7bbd3ef+
Should that be: -r 33d3e7bbd3ef+ tip
Thx, Arie

@gopherbot
Copy link
Contributor

Comment 26 by xapwing:

To be precise: I used this hg command; is that correct?
hg clone -r 33d3e7bbd3ef+ https://code.google.com/p/go

@alexbrainman
Copy link
Member Author

Comment 27:

Arie,
You don't need to use "hg clone" command. It is very wasteful, because it copies
(clones) all repository changes (from day one) into your new directory. There could be a
lot.
Once you have a hg repository (root directory will have .hg directory with all history
saved there), you can download only "new" changes by using "hg pull" command. "hg pull"
command updates .hg directory only, it does not update any files you work with. To
update these to whatever version you want, you should use "hg up -r <revision>"
command - the command copies appropriate files from .hg directory into your workspace.
You can also see what version you are at by "hg parent". If you made changes to files in
your workspace, you can see every file you have changed by "hg st", or you could see all
changes by "hg diff". You can discard all these changes by "hg revert -a".
So, really, you should
hg up -r 33d3e7bbd3ef # change workspace files to 33d3e7bbd3ef
hg parent  # make sure you are on 33d3e7bbd3ef
hg revert -a # discard all changes
hg st # make sure nothing is changed - the output should be empty
# apply whatever changes you need
hg diff # see changes are good
make.bat # build go
# do the tests
Thank you.
Alex

@gopherbot
Copy link
Contributor

Comment 28 by xapwing:

Thx Alex!
I exactly did what you wrote. When applying the patch (hg import patch.txt) I get this:
D:\src\Go\gotip\go\src>hg import patch.txt
applying patch.txt
patching file src/pkg/net/http/response.go
Hunk #1 FAILED at 115
1 out of 1 hunks FAILED -- saving rejects to file src/pkg/net/http/response.go.r
ej
abort: patch failed to apply
However, when I look at the patch and the original source it should be good.
I attach the patch and the reject file FYI.
Thx,
 Arie

Attachments:

  1. patch.txt (455 bytes)
  2. response.go.rej (293 bytes)

@alexbrainman
Copy link
Member Author

Comment 29:

My fault, I cannot apply my patch either. Please try again attached.
Also do not use "hg import patch.txt" command as it "commits" this change to your local
repository. You don't want to do that, just update files in your local workspace. Use
this instead:
hg import --no-commit patch.txt
As before, make sure you are on version 33d3e7bbd3ef:
hg parent
and make sure none of your files are changed:
hg diff
Thank you.
Alex

Attachments:

  1. patch.txt (1423 bytes)

@gopherbot
Copy link
Contributor

Comment 30 by xapwing:

Hi Alex,
i'm sorry, but i did exactly those steps (including make) and when testing i get the
same errors as before ...
See attached logfile.
Thx, Arie

Attachments:

  1. err.txt (1445 bytes)

@gopherbot
Copy link
Contributor

Comment 31 by xapwing:

Hi Alex,
just discovered i deserve some spanking ;-) I messed with GOROOT.
Now my environment should be OK.
net/http test passes now without problems! (see test1.txt)
I ran all tests against your revision (see log.txt)
Thx,  Arie

@alexbrainman
Copy link
Member Author

Comment 32:

I would look at both test1.txt and log.txt, but they are not attached.
Alex

@gopherbot
Copy link
Contributor

Comment 33 by xapwing:

Hi Alex,
sorry, i did it in the middle of the night...
Also, because the test now passes and because my wrong goroot possibly created earlier
problems i did:
   1) hg revert -a
   2) tried to apply patch.txt (see attached patch.txt)
   3) got errors during patch: attached patcherr.txt
Thx, Arie

Attachments:

  1. test1.txt (316 bytes)
  2. log.txt (18120 bytes)
  3. patcherr.txt (324 bytes)
  4. patch.txt (1574 bytes)

@gopherbot
Copy link
Contributor

Comment 34 by xapwing:

And the reject file ... attached

Attachments:

  1. net_test.go.rej (1436 bytes)

@alexbrainman
Copy link
Member Author

Comment 35:

Arie,
Do not worry about patch failure. The patch you listed in
https://golang.org/issue/4723?c=33 (patch.txt) is an old patch. I
have sent it to you long time ago (see "Tue Feb 19 14:31:04 2013" in the patch), and it
is applicable to net package.
Still, from your log.txt in https://golang.org/issue/4723?c=33, I can
see that you have applied correct patch anyway. I can even see the problem you are
having:
Read(4096) = 2508 bytes read "HTTP/1.1 200 OK\r\n...   <title>K9 Web Protection Administration : K9 Web
Protection Error</title> http://www.k9webprotection.com/tdierror/4.0/\"> ...
It looks to me, that you have some sort of "web proxy system" that interfere with our
net tests. Go tests assume that no proxy present, so you cannot expect them to PASS in
that environment.
I did ask you about firewalls / virus / security software. I guess, you should look
again, if you can turn all these off.
Thank you.
Alex

@gopherbot
Copy link
Contributor

Comment 36 by xapwing:

Hi Alex,
aaah, i didn't realize that program...
I uninstalled it completely now and ran all tests without AV / Firewall.
Results attached.
The program test_test crashed in Windows!
Thx, Arie

Attachments:

  1. log.txt (4195 bytes)

@alexbrainman
Copy link
Member Author

Comment 37:

That looks much better now. Only misc\cgo\test fails. But, if you are using current tip,
it is not stable in there. What is your "hg id" output?
Alex

@gopherbot
Copy link
Contributor

Comment 38 by xapwing:

Hi Alex,
E:\Programs\go\src>hg id
33d3e7bbd3ef
Thx, Arie

@gopherbot
Copy link
Contributor

Comment 39 by xapwing:

Hi Alex,
Question about HG. What is the difference between:
1) hg clone -u release https://code.google.com/p/go
2) hg clone https://code.google.com/p/go
i saw them used both...
Thx,
 Arie

@rsc
Copy link
Contributor

rsc commented Mar 5, 2013

Comment 40:

hg clone -u release is like hg clone + hg update release.
It uses the copy of the code as of the last Go release (Go 1.0.3).
Without the -u release hg defaults to the newest Go code, which can be
unstable.

@alexbrainman
Copy link
Member Author

Comment 41:

Arie,
The tip is quite quickly changing now. Things break. But, as far as I can see, version
011944857f1f should be good to test.
Here is how I do it:
:: change current directory to go root src
C:\>cd %GOROOT%\src
:: pull all latest Go changes to my local hg database (stored under .hg directory)
C:\go\root\src>hg pull
pulling from https://go.googlecode.com/hg/
searching for changes
...
:: change my Go files to how they were at revision 011944857f1f
C:\go\root\src>hg up -r 011944857f1f
...
:: verify that previous command worked as expected
C:\go\root\src>hg par
changeset:   16097:011944857f1f
user:        Russ Cox 
date:        Wed Mar 06 16:57:14 2013 -0500
summary:     cmd/cgo: split cgo_export into cgo_export_static and cgo_export_dynamic
:: discard any changes we made, so all files as at 011944857f1f and no other changes
C:\go\root\src>hg revert -a
:: verify that previous command worked as expected (this command should list no files)
C:\go\root\src>hg st
:: build Goand run all tests
C:\go\root\src>all.bat
...
ALL TESTS PASSED
---
Installed Go for windows/386 in C:\go\root
Installed commands in C:\go\root\bin
*** You need to add C:\go\root\bin to your PATH.
C:\go\root\src>
Please, see, if it works for you too. Thank you.
Alex

@gopherbot
Copy link
Contributor

Comment 42 by xapwing:

Hi Alex,
did as you said. However the following *does* list some files:
   e:\Programs\go\src>hg st
   ? src\patch_net.txt
   ? src\patch_response.txt
   ? src\pkg\net\http\err.txt
   ? src\pkg\net\http\response.go.old
but the log says: ALL TESTS PASSED :-)
See attached log.txt
So I guess "Bluecoat K9 Web Protection" caused almost all of the trouble...
Thx, Arie

Attachments:

  1. log.txt (4517 bytes)

@alexbrainman
Copy link
Member Author

Comment 43:

Looking at log.txt, everything looks good now. Thank you for your help.
As to files you see printed by "hg st" command, I suspect, these were created by you
while making changes and running test as per my requests. Just delete them all and run
"hg st" command again - it will display nothing.
Alex

Status changed to Retracted.

@gopherbot
Copy link
Contributor

Comment 44 by xapwing:

Hi Alex,
there are 2 issues left:
1) mime type .bmp is not present in my W8 installation
2) the "hosts" file is not present in my W8 installation
I thought you'd fixed them both? 
Being on gotip (release) now I still see the fails for those issues.
Maybe they *are* fixed in the bleeding edge tip :-)
Hope that helps.
Thx,
   Arie

@alexbrainman
Copy link
Member Author

Comment 45:

Arie,
> 1) mime type .bmp is not present in my W8 installation
We are not testing for .bmp anymore:
https://code.google.com/p/go/source/detail?r=0bf8fba16ea2
and
https://code.google.com/p/go/source/detail?r=41ab0ca75ea3
> 2) the "hosts" file is not present in my W8 installation
Same, we stooped checking this file too:
https://code.google.com/p/go/source/detail?r=140452485d03
> I thought you'd fixed them both?
We certainly did.
> Being on gotip (release) now I still see the fails for those issues.
> Maybe they *are* fixed in the bleeding edge tip :-)
"tip" and "release" are hg tags (named labels pointed to a particular hg commits). This
is my output now:
# hg tags | head
tip                            16258:0c029965805f
release                        14368:2d8bc3c94ecb
go1.0.3                        14368:2d8bc3c94ecb
go1.0.2                        13560:5e806355a9e1
...
As you can see "tip" != "release".
"tip" is set automatically by "hg" itself, when someone commits new change into repo -
the "tip" will get set onto that latest commit.
"release", on the other hand, was set by one of Go Team onto rev=2d8bc3c94ecb. Someone
who decided that rev=2d8bc3c94ecb should be "referred to" as "release" by everyone - it
is easier to speak of "release" then "rev=2d8bc3c94ecb" when 2 people discuss it. Note,
how go1.0.3 is set to 2d8bc3c94ecb too. So, really, "release" == "go1.0.3" - they both
refer to same version. I suspect, once go1.1 will get released, someone will create a
go1.1 label and will set it to a commit, and also move "release" to the same commit.
Alex

@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

3 participants