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/httptest: panic: net.dialTCP: deadline not implemented on Plan 9 #15328

Closed
mikioh opened this issue Apr 15, 2016 · 3 comments
Closed
Labels
FrozenDueToAge OS-Plan9 Testing An issue that has been verified to require only test changes, not just a test failure.

Comments

@mikioh
Copy link
Contributor

mikioh commented Apr 15, 2016

See http://build.golang.org/log/a8c60a1abdc14d36f097654d58ad072fbfa3a869. The package encoding/json uses net/http/httptest package.

ok      encoding/hex    0.029s
panic: net.dialTCP: deadline not implemented on Plan 9

goroutine 76 [running]:
panic(0x2443c0, 0x10713470)
    /tmp/workdir/go/src/runtime/panic.go:500 +0x32f
net.doDialTCP(0x381480, 0x10681e80, 0x284f28, 0x3, 0x0, 0x107117e0, 0x491b0, 0x0, 0x0)
    /tmp/workdir/go/src/net/tcpsock_plan9.go:26 +0xd0
net.dialTCP(0x381480, 0x10681e80, 0x284f28, 0x3, 0x0, 0x107117e0, 0xfc22d0a7, 0x0, 0x0)
    /tmp/workdir/go/src/net/tcpsock_plan9.go:21 +0xa3
net.dialSingle(0x381480, 0x10681e80, 0x1064a9b0, 0x380410, 0x107117e0, 0x0, 0x0, 0x0, 0x0)
    /tmp/workdir/go/src/net/dial.go:482 +0x4f6
net.dialSerial(0x381480, 0x10681e80, 0x1064a9b0, 0x10713468, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0)
    /tmp/workdir/go/src/net/dial.go:459 +0x7b2
net.(*Dialer).DialContext(0x104f2540, 0x381480, 0x10681e80, 0x284f28, 0x3, 0x10711687, 0xf, 0x0, 0x0, 0x0, ...)
    /tmp/workdir/go/src/net/dial.go:341 +0x776
net.(*Dialer).Dial(0x104f2540, 0x284f28, 0x3, 0x10711687, 0xf, 0x0, 0x0, 0x0, 0x0)
    /tmp/workdir/go/src/net/dial.go:282 +0x7d
net.(*Dialer).Dial-fm(0x284f28, 0x3, 0x10711687, 0xf, 0x0, 0x0, 0x0, 0x0)
    /tmp/workdir/go/src/net/http/transport.go:38 +0x57
net/http.(*Transport).dial(0x10510630, 0x284f28, 0x3, 0x10711687, 0xf, 0x0, 0x0, 0x0, 0x0)
    /tmp/workdir/go/src/net/http/transport.go:694 +0x67
net/http.(*Transport).dialConn(0x10510630, 0x0, 0x10711680, 0x4, 0x10711687, 0xf, 0x0, 0x0, 0x0)
    /tmp/workdir/go/src/net/http/transport.go:800 +0x1be9
net/http.(*Transport).getConn.func4(0x10510630, 0x0, 0x10711680, 0x4, 0x10711687, 0xf, 0x10681c80)
    /tmp/workdir/go/src/net/http/transport.go:741 +0x4c
created by net/http.(*Transport).getConn
    /tmp/workdir/go/src/net/http/transport.go:743 +0x206
FAIL    encoding/json   0.217s
ok

/CC @bradfitz

@mikioh mikioh added Testing An issue that has been verified to require only test changes, not just a test failure. OS-Plan9 labels Apr 15, 2016
@bradfitz
Copy link
Contributor

Yay #15251

@0intro
Copy link
Member

0intro commented Apr 16, 2016

This is related to issue #11932.

@gopherbot
Copy link

CL https://golang.org/cl/22144 mentions this issue.

gopherbot pushed a commit that referenced this issue Apr 18, 2016
My previous https://golang.org/cl/22101 to add context throughout the
net package broke Plan 9, which isn't currently tested (#15251).

It also broke some old unsupported version of Windows (Windows 2000?)
which doesn't have the ConnectEx function, but that was only found
visually, since our minimum supported Windows version has ConnectEx.
This change simplifies the Windows and deletes the non-ConnectEx code
path.  Windows 2000 will work even less now, if it even worked
before. Windows XP remains our minimum supported version.

Specifically, the previous CL stopped using the "dial" function, which
0intro noted:
#15333 (comment)

This CL removes the dial function instead and makes plan9's net
implementation respect contexts, which likely fixes a number of
t.Skipped tests. I'm leaving that to 0intro to investigate.

In the process of propagating and respecting contexts for plan9, I had
to change some signatures to add contexts to more places and ended up
pushing contexts down into the Go-based DNS resolution as well,
replacing the pure-Go DNS implementation's use of "timeout
time.Duration" with a context instead.

Updates #11932
Updates #15328

Fixes #15333

Change-Id: I6ad1e62f38271cdd86b3f40921f2d0f23374936a
Reviewed-on: https://go-review.googlesource.com/22144
Reviewed-by: David du Colombier <0intro@gmail.com>
Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
@golang golang locked and limited conversation to collaborators Apr 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge OS-Plan9 Testing An issue that has been verified to require only test changes, not just a test failure.
Projects
None yet
Development

No branches or pull requests

4 participants