Repository: go
Issue: x/crypto/ssh: TestHandshakeBasic times out on Plan 9
Labels: OS-Plan9

<pre>What steps will reproduce the problem?

% cd ssh
% go test -run TestHandshakeBasic

What is the expected output? What do you see instead?

The test is timing out because io.ReadFull in cipher.go:137 (called from
handshake_test.go:110) never returns.

cpu% go test -v -timeout 30s -run TestHandshakeBasic
=== RUN TestHandshakeBasic
panic: test timed out after 30s

goroutine 25 [running]:
runtime.panic(0x212240, 0x10570388)
    /usr/go/src/pkg/runtime/panic.c:279 +0xe3
testing.func·008()
    /usr/go/src/pkg/testing/testing.go:628 +0xd7
created by time.goFunc
    /usr/go/src/pkg/time/sleep.go:121 +0x49

goroutine 16 [chan receive]:
testing.RunTests(0x320934, 0x413240, 0x57, 0x57, 0x21d01)
    /usr/go/src/pkg/testing/testing.go:504 +0x74a
testing.Main(0x320934, 0x413240, 0x57, 0x57, 0x410a80, 0x5, 0x5, 0x41abc0, 0x0, 0x0)
    /usr/go/src/pkg/testing/testing.go:435 +0x6d
main.main()
    code.google.com/p/go.crypto/ssh/_test/_testmain.go:229 +0x85

goroutine 19 [finalizer wait]:
runtime.park(0x120d0, 0x415618, 0x4141a9)
    /usr/go/src/pkg/runtime/proc.c:1354 +0x8f
runtime.parkunlock(0x415618, 0x4141a9)
    /usr/go/src/pkg/runtime/proc.c:1370 +0x3e
runfinq()
    /usr/go/src/pkg/runtime/mgc0.c:2624 +0xc3
runtime.goexit()
    /usr/go/src/pkg/runtime/proc.c:1430

goroutine 21 [chan receive]:
code.google.com/p/go.crypto/ssh.TestHandshakeBasic(0x10589260)
    /mnt/term/home/djc/go/src/code.google.com/p/go.crypto/ssh/handshake_test.go:110 +0x27c
testing.tRunner(0x10589260, 0x41333c)
    /usr/go/src/pkg/testing/testing.go:422 +0x86
created by testing.RunTests
    /usr/go/src/pkg/testing/testing.go:503 +0x70e

goroutine 22 [syscall]:
syscall.Syscall6(0x7, 0x10549000, 0x1000, 0xffffffff, 0xffffffff, 0x0, 0x0, 0x0,
0x13658639, 0x3b9aca00, ...)
    /usr/go/src/pkg/syscall/asm_plan9_386.s:54 +0x5
syscall.Pread(0x7, 0x10549000, 0x1000, 0x1000, 0xffffffff, 0xffffffff, 0x0, 0x0, 0x0)
    /usr/go/src/pkg/syscall/zsyscall_plan9_386.go:118 +0x8f
syscall.Read(0x7, 0x10549000, 0x1000, 0x1000, 0x3074fbcc, 0x0, 0x0)
    /usr/go/src/pkg/syscall/syscall_plan9.go:123 +0x75
os.(*File).read(0x10570528, 0x10549000, 0x1000, 0x1000, 0x178ba1, 0x0, 0x0)
    /usr/go/src/pkg/os/file_plan9.go:247 +0x6a
os.(*File).Read(0x10570528, 0x10549000, 0x1000, 0x1000, 0x7, 0x0, 0x0)
    /usr/go/src/pkg/os/file.go:95 +0x8b
net.(*netFD).Read(0x105b04c0, 0x10549000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
    /usr/go/src/pkg/net/fd_plan9.go:134 +0xfa
net.(*conn).Read(0x10570538, 0x10549000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
    /usr/go/src/pkg/net/net.go:122 +0x8f
bufio.(*Reader).fill(0x105d8f00)
    /usr/go/src/pkg/bufio/bufio.go:97 +0x14d
bufio.(*Reader).Read(0x105d8f00, 0x10616250, 0x5, 0x5, 0x5, 0x0, 0x0)
    /usr/go/src/pkg/bufio/bufio.go:175 +0x193
io.ReadAtLeast(0x3053e908, 0x105d8f00, 0x10616250, 0x5, 0x5, 0x5, 0x0, 0x0, 0x0)
    /usr/go/src/pkg/io/io.go:289 +0xca
io.ReadFull(0x3053e908, 0x105d8f00, 0x10616250, 0x5, 0x5, 0x105880c0, 0x0, 0x0)
    /usr/go/src/pkg/io/io.go:307 +0x71
code.google.com/p/go.crypto/ssh.(*streamPacketCipher).readPacket(0x10616240, 0x3,
0x3053e908, 0x105d8f00, 0x0, 0x0, 0x0, 0x0, 0x0)
    /mnt/term/home/djc/go/src/code.google.com/p/go.crypto/ssh/cipher.go:137 +0xd3
code.google.com/p/go.crypto/ssh.(*connectionState).readPacket(0x10586bd0, 0x105d8f00,
0x0, 0x0, 0x0, 0x0, 0x0)
    /mnt/term/home/djc/go/src/code.google.com/p/go.crypto/ssh/transport.go:110 +0xb1
code.google.com/p/go.crypto/ssh.(*transport).readPacket(0x10586bd0, 0x0, 0x0, 0x0, 0x0,
0x0)
    /mnt/term/home/djc/go/src/code.google.com/p/go.crypto/ssh/transport.go:106 +0x62
code.google.com/p/go.crypto/ssh.(*handshakeTransport).readOnePacket(0x10586cf0, 0x0,
0x0, 0x0, 0x0, 0x0)
    /mnt/term/home/djc/go/src/code.google.com/p/go.crypto/ssh/handshake.go:153 +0xc1
code.google.com/p/go.crypto/ssh.(*handshakeTransport).readLoop(0x10586cf0)
    /mnt/term/home/djc/go/src/code.google.com/p/go.crypto/ssh/handshake.go:133 +0x2d
created by code.google.com/p/go.crypto/ssh.newClientTransport
    /mnt/term/home/djc/go/src/code.google.com/p/go.crypto/ssh/handshake.go:101 +0xb5

goroutine 23 [syscall]:
syscall.Syscall6(0x9, 0x105e2000, 0x1000, 0xffffffff, 0xffffffff, 0x0, 0x0, 0x8, 0x0,
0x0, ...)
    /usr/go/src/pkg/syscall/asm_plan9_386.s:54 +0x5
syscall.Pread(0x9, 0x105e2000, 0x1000, 0x1000, 0xffffffff, 0xffffffff, 0x0, 0x0, 0x0)
    /usr/go/src/pkg/syscall/zsyscall_plan9_386.go:118 +0x8f
syscall.Read(0x9, 0x105e2000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
    /usr/go/src/pkg/syscall/syscall_plan9.go:123 +0x75
os.(*File).read(0x10570548, 0x105e2000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
    /usr/go/src/pkg/os/file_plan9.go:247 +0x6a
os.(*File).Read(0x10570548, 0x105e2000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
    /usr/go/src/pkg/os/file.go:95 +0x8b
net.(*netFD).Read(0x105b0500, 0x105e2000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
    /usr/go/src/pkg/net/fd_plan9.go:134 +0xfa
net.(*conn).Read(0x10570558, 0x105e2000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
    /usr/go/src/pkg/net/net.go:122 +0x8f
bufio.(*Reader).fill(0x105d8f30)
    /usr/go/src/pkg/bufio/bufio.go:97 +0x14d
bufio.(*Reader).Read(0x105d8f30, 0x10589ed0, 0x5, 0x5, 0x5, 0x0, 0x0)
    /usr/go/src/pkg/bufio/bufio.go:175 +0x193
io.ReadAtLeast(0x3053e908, 0x105d8f30, 0x10589ed0, 0x5, 0x5, 0x5, 0x0, 0x0, 0x0)
    /usr/go/src/pkg/io/io.go:289 +0xca
io.ReadFull(0x3053e908, 0x105d8f30, 0x10589ed0, 0x5, 0x5, 0x14, 0x0, 0x0)
    /usr/go/src/pkg/io/io.go:307 +0x71
code.google.com/p/go.crypto/ssh.(*streamPacketCipher).readPacket(0x10589ec0, 0xd,
0x3053e908, 0x105d8f30, 0x0, 0x0, 0x0, 0x0, 0x0)
    /mnt/term/home/djc/go/src/code.google.com/p/go.crypto/ssh/cipher.go:137 +0xd3
code.google.com/p/go.crypto/ssh.(*connectionState).readPacket(0x10586c60, 0x105d8f30,
0x0, 0x0, 0x0, 0x0, 0x0)
    /mnt/term/home/djc/go/src/code.google.com/p/go.crypto/ssh/transport.go:110 +0xb1
code.google.com/p/go.crypto/ssh.(*transport).readPacket(0x10586c60, 0x0, 0x0, 0x0, 0x0,
0x0)
    /mnt/term/home/djc/go/src/code.google.com/p/go.crypto/ssh/transport.go:106 +0x62
code.google.com/p/go.crypto/ssh.(*handshakeTransport).readOnePacket(0x10586d80, 0x0,
0x0, 0x0, 0x0, 0x0)
    /mnt/term/home/djc/go/src/code.google.com/p/go.crypto/ssh/handshake.go:153 +0xc1
code.google.com/p/go.crypto/ssh.(*handshakeTransport).readLoop(0x10586d80)
    /mnt/term/home/djc/go/src/code.google.com/p/go.crypto/ssh/handshake.go:133 +0x2d
created by code.google.com/p/go.crypto/ssh.newServerTransport
    /mnt/term/home/djc/go/src/code.google.com/p/go.crypto/ssh/handshake.go:108 +0xa5
exit status: 'ssh.test 520875: 2'
FAIL    code.google.com/p/go.crypto/ssh 31.912s</pre>