gravitational / teleport

The easiest, and most secure way to access and protect all of your infrastructure.
https://goteleport.com
GNU Affero General Public License v3.0
17.33k stars 1.74k forks source link

Error adding U2F device from tsh #6189

Closed RihanArfan closed 2 years ago

RihanArfan commented 3 years ago

Description

What happened: I am trying to add a U2F MFA device from tsh.

What you expected to happen: I expect the key to be added without errors.

Reproduction Steps

As minimally and precisely as possible, describe step-by-step how to reproduce the problem.

  1. tsh mfa add
  2. Choose "U2F"
  3. Enter a name for the device
  4. Enter OTP code
  5. Tap key
  6. See error

Server Details

Client Details

Debug Logs

Choose device type [TOTP, U2F]: u2f
Enter device name: U2F
Enter an OTP code from a *registered* device: <removed>
Tap your *new* security key
runtime: bad pointer in frame github.com/flynn/hid.openDevice at 0xc000010ae0: 0x3cc
fatal error: invalid pointer found on stack

runtime stack:
runtime.throw(0x1c168a6, 0x1e)
        /opt/go/src/runtime/panic.go:1116 +0x79 fp=0x2b4f450 sp=0x2b4f420 pc=0x43c6d9
runtime.adjustpointers(0xc000010ad8, 0x2b4f540, 0x2b4f8c8, 0x24944d8, 0x18251c0)
        /opt/go/src/runtime/stack.go:605 +0x1e8 fp=0x2b4f4a0 sp=0x2b4f450 pc=0x453208
runtime.adjustframe(0x2b4f7d8, 0x2b4f8c8, 0x18251c0)
        /opt/go/src/runtime/stack.go:647 +0x36b fp=0x2b4f570 sp=0x2b4f4a0 pc=0x45358b
runtime.gentraceback(0xffffffffffffffff, 0xffffffffffffffff, 0x0, 0xc000062000, 0x0, 0x0, 0x7fffffff, 0x1cc8cf0, 0x2b4f8c8, 0x0, ...)
        /opt/go/src/runtime/traceback.go:334 +0x11b5 fp=0x2b4f840 sp=0x2b4f570 pc=0x461255
runtime.copystack(0xc000062000, 0x4000)
        /opt/go/src/runtime/stack.go:910 +0x2a7 fp=0x2b4f9f8 sp=0x2b4f840 pc=0x453d07
runtime.shrinkstack(0xc000062000)
        /opt/go/src/runtime/stack.go:1178 +0x149 fp=0x2b4fa20 sp=0x2b4f9f8 pc=0x454da9
runtime.scanstack(0xc000062000, 0xc00004ce98)
        /opt/go/src/runtime/mgcmark.go:815 +0x56e fp=0x2b4fc28 sp=0x2b4fa20 pc=0x42276e
runtime.markroot.func1()
        /opt/go/src/runtime/mgcmark.go:245 +0xce fp=0x2b4fc78 sp=0x2b4fc28 pc=0x4681ae
runtime.markroot(0xc00004ce98, 0x7)
        /opt/go/src/runtime/mgcmark.go:218 +0x310 fp=0x2b4fd00 sp=0x2b4fc78 pc=0x421230
runtime.gcDrain(0xc00004ce98, 0x7)
        /opt/go/src/runtime/mgcmark.go:1109 +0x138 fp=0x2b4fd58 sp=0x2b4fd00 pc=0x422e98
runtime.gcBgMarkWorker.func2()
        /opt/go/src/runtime/mgc.go:1981 +0x176 fp=0x2b4fd98 sp=0x2b4fd58 pc=0x468096
runtime.systemstack(0x34d16f0)
        /opt/go/src/runtime/asm_amd64.s:370 +0x6b fp=0x2b4fda0 sp=0x2b4fd98 pc=0x4712ab
runtime.mstart()
        /opt/go/src/runtime/proc.go:1116 fp=0x2b4fda8 sp=0x2b4fda0 pc=0x441860

goroutine 15 [GC worker (idle)]:
runtime.systemstack_switch()
        /opt/go/src/runtime/asm_amd64.s:330 fp=0xc0000a9f60 sp=0xc0000a9f58 pc=0x471220
runtime.gcBgMarkWorker(0xc00004b800)
        /opt/go/src/runtime/mgc.go:1945 +0x1db fp=0xc0000a9fd8 sp=0xc0000a9f60 pc=0x41fb5b
runtime.goexit()
        /opt/go/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc0000a9fe0 sp=0xc0000a9fd8 pc=0x473061
created by runtime.gcBgMarkStartWorkers
        /opt/go/src/runtime/mgc.go:1839 +0x7e

goroutine 1 [GC assist marking (scan)]:
runtime.systemstack_switch()
        /opt/go/src/runtime/asm_amd64.s:330 fp=0xc000010960 sp=0xc000010958 pc=0x471220
runtime.gcAssistAlloc(0xc000062000)
        /opt/go/src/runtime/mgcmark.go:546 +0x177 fp=0xc0000109c0 sp=0xc000010960 pc=0x421997
runtime.mallocgc(0x40, 0x1ae0a60, 0x1, 0xc00012ca90)
        /opt/go/src/runtime/malloc.go:952 +0xa1c fp=0xc000010a60 sp=0xc0000109c0 pc=0x40febc
runtime.newobject(0x1ae0a60, 0x0)
        /opt/go/src/runtime/malloc.go:1195 +0x3f fp=0xc000010a90 sp=0xc000010a60 pc=0x4101ff
github.com/flynn/hid.openDevice(0xc0004b36c0, 0xc0004b3601, 0x34d7220, 0x34d7220, 0x0)
        /go/src/github.com/gravitational/teleport/vendor/github.com/flynn/hid/hid_windows.go:122 +0x113 fp=0xc000010af8 sp=0xc000010a90 pc=0xe7c353
github.com/flynn/hid.ByPath(0xc0004be9c0, 0x52, 0x0, 0x0, 0x0)
        /go/src/github.com/gravitational/teleport/vendor/github.com/flynn/hid/hid_windows.go:184 +0xa6 fp=0xc000010b88 sp=0xc000010af8 pc=0xe7c746
github.com/flynn/hid.getDeviceDetails(0x2cafd00, 0xc000453da0, 0xc00012cc54)
        /go/src/github.com/gravitational/teleport/vendor/github.com/flynn/hid/hid_windows.go:177 +0x1e5 fp=0xc000010c10 sp=0xc000010b88 pc=0xe7c645
github.com/flynn/hid.Devices(0x0, 0x0, 0x0, 0x0, 0x0)
        /go/src/github.com/gravitational/teleport/vendor/github.com/flynn/hid/hid_windows.go:244 +0x170 fp=0xc000010ca8 sp=0xc000010c10 pc=0xe7cc10
github.com/flynn/u2f/u2fhid.Devices(0xc0005ccf00, 0xc00012ce14, 0x13, 0x0, 0xc0000864e0)
        /go/src/github.com/gravitational/teleport/vendor/github.com/flynn/u2f/u2fhid/hid.go:52 +0x2d fp=0xc000010d20 sp=0xc000010ca8 pc=0xe7e7ad
github.com/gravitational/teleport/lib/auth/u2f.foreachLocalDevice(0xc00012d220, 0x0, 0x0)
        /go/src/github.com/gravitational/teleport/lib/auth/u2f/device.go:137 +0x46 fp=0xc000010dc8 sp=0xc000010d20 pc=0xe816e6
github.com/gravitational/teleport/lib/auth/u2f.pollLocalDevices(0x1e3f980, 0xc0000c4400, 0xc00012d220, 0x0, 0x0)
        /go/src/github.com/gravitational/teleport/lib/auth/u2f/device.go:110 +0x95 fp=0xc000010e98 sp=0xc000010dc8 pc=0xe81415
github.com/gravitational/teleport/lib/auth/u2f.RegisterSignChallenge(0x1e3f980, 0xc0000c4400, 0x0, 0x0, 0xc000214000, 0x2b, 0xc000396080, 0x1c, 0xc000396120, 0x20, ...)
        /go/src/github.com/gravitational/teleport/lib/auth/u2f/register.go:159 +0x338 fp=0xc000011300 sp=0xc000010e98 pc=0xe81f58
main.promptU2FRegisterChallenge(0x1e3f980, 0xc0000c4400, 0xc0003961c0, 0x18, 0xc00020c240, 0x1b5ddc0, 0xc0001b80c0, 0x0)
        /go/src/github.com/gravitational/teleport/tool/tsh/mfa.go:308 +0x189 fp=0xc0000113c8 sp=0xc000011300 pc=0x17e3429
main.promptRegisterChallenge(0x1e3f980, 0xc0000c4400, 0xc0003961c0, 0x18, 0xc0001b8120, 0x1bf9b29, 0xd, 0xc0001b8060)
        /go/src/github.com/gravitational/teleport/tool/tsh/mfa.go:274 +0x9b fp=0xc000011428 sp=0xc0000113c8 pc=0x17e2b3b
main.(*mfaAddCommand).addDeviceRPC.func1(0x0, 0x0)
        /go/src/github.com/gravitational/teleport/tool/tsh/mfa.go:242 +0x6af fp=0xc0000115d8 sp=0xc000011428 pc=0x17ffe0f
github.com/gravitational/teleport/lib/client.RetryWithRelogin(0x1e3f980, 0xc0000c4400, 0xc00024aa00, 0xc00012d6c8, 0x0, 0x1000)
        /go/src/github.com/gravitational/teleport/lib/client/api.go:400 +0x43 fp=0xc000011688 sp=0xc0000115d8 pc=0x17666e3
main.(*mfaAddCommand).addDeviceRPC(0xc0000e4bd0, 0xc0000d4000, 0xc0001a2014, 0x9, 0x1, 0x11, 0xc0001a2014, 0x9)
        /go/src/github.com/gravitational/teleport/tool/tsh/mfa.go:186 +0xf2 fp=0xc000011710 sp=0xc000011688 pc=0x17e2972
main.(*mfaAddCommand).run(0xc0000e4bd0, 0xc0000d4000, 0x7, 0x1)
        /go/src/github.com/gravitational/teleport/tool/tsh/mfa.go:170 +0x11d fp=0xc0000117d8 sp=0xc000011710 pc=0x17e235d
main.Run(0xc00007a050, 0x2, 0x3, 0x0, 0x0, 0x0, 0xc0004c7f78, 0x40788b)
        /go/src/github.com/gravitational/teleport/tool/tsh/tsh.go:517 +0x74b4 fp=0xc000011f08 sp=0xc0000117d8 pc=0x17ebb54
main.main()
        /go/src/github.com/gravitational/teleport/tool/tsh/tsh.go:231 +0xee fp=0xc000011f88 sp=0xc000011f08 pc=0x17e448e
runtime.main()
        /opt/go/src/runtime/proc.go:204 +0x209 fp=0xc000011fe0 sp=0xc000011f88 pc=0x43ee89
runtime.goexit()
        /opt/go/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc000011fe8 sp=0xc000011fe0 pc=0x473061

goroutine 2 [force gc (idle)]:
runtime.gopark(0x1cc8f90, 0x2900df0, 0x1411, 0x1)
        /opt/go/src/runtime/proc.go:306 +0xfa fp=0xc000065fb0 sp=0xc000065f90 pc=0x43f25a
runtime.goparkunlock(...)
        /opt/go/src/runtime/proc.go:312
runtime.forcegchelper()
        /opt/go/src/runtime/proc.go:255 +0xcd fp=0xc000065fe0 sp=0xc000065fb0 pc=0x43f0ed
runtime.goexit()
        /opt/go/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc000065fe8 sp=0xc000065fe0 pc=0x473061
created by runtime.init.6
        /opt/go/src/runtime/proc.go:243 +0x3c

goroutine 3 [GC sweep wait]:
runtime.gopark(0x1cc8f90, 0x2908f00, 0x140c, 0x1)
        /opt/go/src/runtime/proc.go:306 +0xfa fp=0xc000067fa8 sp=0xc000067f88 pc=0x43f25a
runtime.goparkunlock(...)
        /opt/go/src/runtime/proc.go:312
runtime.bgsweep(0xc000070000)
        /opt/go/src/runtime/mgcsweep.go:182 +0x149 fp=0xc000067fd8 sp=0xc000067fa8 pc=0x427249
runtime.goexit()
        /opt/go/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc000067fe0 sp=0xc000067fd8 pc=0x473061
created by runtime.gcenable
        /opt/go/src/runtime/mgc.go:217 +0x67

goroutine 4 [GC scavenge wait]:
runtime.gopark(0x1cc8f90, 0x2909840, 0x140d, 0x1)
        /opt/go/src/runtime/proc.go:306 +0xfa fp=0xc000077f78 sp=0xc000077f58 pc=0x43f25a
runtime.goparkunlock(...)
        /opt/go/src/runtime/proc.go:312
runtime.bgscavenge(0xc000070000)
        /opt/go/src/runtime/mgcscavenge.go:314 +0x2b9 fp=0xc000077fd8 sp=0xc000077f78 pc=0x425359
runtime.goexit()
        /opt/go/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc000077fe0 sp=0xc000077fd8 pc=0x473061
created by runtime.gcenable
        /opt/go/src/runtime/mgc.go:218 +0x89

goroutine 5 [finalizer wait]:
runtime.gopark(0x1cc8f90, 0x29407f8, 0x1ffff1410, 0x1)
        /opt/go/src/runtime/proc.go:306 +0xfa fp=0xc000069f58 sp=0xc000069f38 pc=0x43f25a
runtime.goparkunlock(...)
        /opt/go/src/runtime/proc.go:312
runtime.runfinq()
        /opt/go/src/runtime/mfinal.go:175 +0xb2 fp=0xc000069fe0 sp=0xc000069f58 pc=0x41bd12
runtime.goexit()
        /opt/go/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc000069fe8 sp=0xc000069fe0 pc=0x473061
created by runtime.createfing
        /opt/go/src/runtime/mfinal.go:156 +0x68

goroutine 14 [GC worker (idle)]:
runtime.gopark(0x1cc8e10, 0xc00012f690, 0x401418, 0x0)
        /opt/go/src/runtime/proc.go:306 +0xfa fp=0xc000079f60 sp=0xc000079f40 pc=0x43f25a
runtime.gcBgMarkWorker(0xc000046800)
        /opt/go/src/runtime/mgc.go:1891 +0x114 fp=0xc000079fd8 sp=0xc000079f60 pc=0x41fa94
runtime.goexit()
        /opt/go/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc000079fe0 sp=0xc000079fd8 pc=0x473061
created by runtime.gcBgMarkStartWorkers
        /opt/go/src/runtime/mgc.go:1839 +0x7e

goroutine 18 [chan receive]:
runtime.gopark(0x1cc8d60, 0xc000086358, 0x170e, 0x2)
        /opt/go/src/runtime/proc.go:306 +0xfa fp=0xc000073ed0 sp=0xc000073eb0 pc=0x43f25a
runtime.chanrecv(0xc000086300, 0xc000073fb0, 0xc000094001, 0x290a458)
        /opt/go/src/runtime/chan.go:577 +0x37a fp=0xc000073f60 sp=0xc000073ed0 pc=0x407d3a
runtime.chanrecv2(0xc000086300, 0xc000073fb0, 0x1)
        /opt/go/src/runtime/chan.go:444 +0x2b fp=0xc000073f90 sp=0xc000073f60 pc=0x4079ab
k8s.io/klog/v2.(*loggingT).flushDaemon(0x290a440)
        /go/src/github.com/gravitational/teleport/vendor/k8s.io/klog/v2/klog.go:1169 +0x92 fp=0xc000073fd8 sp=0xc000073f90 pc=0xd84e32
runtime.goexit()
        /opt/go/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc000073fe0 sp=0xc000073fd8 pc=0x473061
created by k8s.io/klog/v2.init.0
        /go/src/github.com/gravitational/teleport/vendor/k8s.io/klog/v2/klog.go:417 +0xe5

goroutine 26 [GC worker (idle)]:
runtime.gopark(0x1cc8e10, 0xc000090020, 0x1418, 0x0)
        /opt/go/src/runtime/proc.go:306 +0xfa fp=0xc000075f60 sp=0xc000075f40 pc=0x43f25a
runtime.gcBgMarkWorker(0xc000044000)
        /opt/go/src/runtime/mgc.go:1891 +0x114 fp=0xc000075fd8 sp=0xc000075f60 pc=0x41fa94
runtime.goexit()
        /opt/go/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc000075fe0 sp=0xc000075fd8 pc=0x473061
created by runtime.gcBgMarkStartWorkers
        /opt/go/src/runtime/mgc.go:1839 +0x7e

goroutine 41 [GC worker (idle)]:
runtime.gopark(0x1cc8e10, 0xc00012f6a0, 0x1418, 0x0)
        /opt/go/src/runtime/proc.go:306 +0xfa fp=0xc0000adf60 sp=0xc0000adf40 pc=0x43f25a
runtime.gcBgMarkWorker(0xc000049000)
        /opt/go/src/runtime/mgc.go:1891 +0x114 fp=0xc0000adfd8 sp=0xc0000adf60 pc=0x41fa94
runtime.goexit()
        /opt/go/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc0000adfe0 sp=0xc0000adfd8 pc=0x473061
created by runtime.gcBgMarkStartWorkers
        /opt/go/src/runtime/mgc.go:1839 +0x7e

goroutine 16 [GC worker (idle)]:
runtime.gopark(0x1cc8e10, 0xc0001a23c0, 0x1418, 0x0)
        /opt/go/src/runtime/proc.go:306 +0xfa fp=0xc0000abf60 sp=0xc0000abf40 pc=0x43f25a
runtime.gcBgMarkWorker(0xc00004e000)
        /opt/go/src/runtime/mgc.go:1891 +0x114 fp=0xc0000abfd8 sp=0xc0000abf60 pc=0x41fa94
runtime.goexit()
        /opt/go/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc0000abfe0 sp=0xc0000abfd8 pc=0x473061
created by runtime.gcBgMarkStartWorkers
        /opt/go/src/runtime/mgc.go:1839 +0x7e

goroutine 50 [GC worker (idle)]:
runtime.gopark(0x1cc8e10, 0xc00012f6b0, 0x1418, 0x0)
        /opt/go/src/runtime/proc.go:306 +0xfa fp=0xc0004adf60 sp=0xc0004adf40 pc=0x43f25a
runtime.gcBgMarkWorker(0xc000050800)
        /opt/go/src/runtime/mgc.go:1891 +0x114 fp=0xc0004adfd8 sp=0xc0004adf60 pc=0x41fa94
runtime.goexit()
        /opt/go/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc0004adfe0 sp=0xc0004adfd8 pc=0x473061
created by runtime.gcBgMarkStartWorkers
        /opt/go/src/runtime/mgc.go:1839 +0x7e

goroutine 42 [GC worker (idle)]:
runtime.gopark(0x1cc8e10, 0xc00012f6c0, 0x1418, 0x0)
        /opt/go/src/runtime/proc.go:306 +0xfa fp=0xc0000aff60 sp=0xc0000aff40 pc=0x43f25a
runtime.gcBgMarkWorker(0xc000053000)
        /opt/go/src/runtime/mgc.go:1891 +0x114 fp=0xc0000affd8 sp=0xc0000aff60 pc=0x41fa94
runtime.goexit()
        /opt/go/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc0000affe0 sp=0xc0000affd8 pc=0x473061
created by runtime.gcBgMarkStartWorkers
        /opt/go/src/runtime/mgc.go:1839 +0x7e

goroutine 51 [GC worker (idle)]:
runtime.gopark(0x1cc8e10, 0xc00012f6d0, 0x1418, 0x0)
        /opt/go/src/runtime/proc.go:306 +0xfa fp=0xc0004aff60 sp=0xc0004aff40 pc=0x43f25a
runtime.gcBgMarkWorker(0xc000055800)
        /opt/go/src/runtime/mgc.go:1891 +0x114 fp=0xc0004affd8 sp=0xc0004aff60 pc=0x41fa94
runtime.goexit()
        /opt/go/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc0004affe0 sp=0xc0004affd8 pc=0x473061
created by runtime.gcBgMarkStartWorkers
        /opt/go/src/runtime/mgc.go:1839 +0x7e

goroutine 43 [GC worker (idle)]:
runtime.gopark(0x1cc8e10, 0xc000090030, 0x1418, 0x0)
        /opt/go/src/runtime/proc.go:306 +0xfa fp=0xc0004a9f60 sp=0xc0004a9f40 pc=0x43f25a
runtime.gcBgMarkWorker(0xc000058000)
        /opt/go/src/runtime/mgc.go:1891 +0x114 fp=0xc0004a9fd8 sp=0xc0004a9f60 pc=0x41fa94
runtime.goexit()
        /opt/go/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc0004a9fe0 sp=0xc0004a9fd8 pc=0x473061
created by runtime.gcBgMarkStartWorkers
        /opt/go/src/runtime/mgc.go:1839 +0x7e

goroutine 44 [GC worker (idle)]:
runtime.gopark(0x1cc8e10, 0xc000090040, 0x1418, 0x0)
        /opt/go/src/runtime/proc.go:306 +0xfa fp=0xc0004abf60 sp=0xc0004abf40 pc=0x43f25a
runtime.gcBgMarkWorker(0xc00005a800)
        /opt/go/src/runtime/mgc.go:1891 +0x114 fp=0xc0004abfd8 sp=0xc0004abf60 pc=0x41fa94
runtime.goexit()
        /opt/go/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc0004abfe0 sp=0xc0004abfd8 pc=0x473061
created by runtime.gcBgMarkStartWorkers
        /opt/go/src/runtime/mgc.go:1839 +0x7e

goroutine 45 [GC worker (idle)]:
runtime.gopark(0x1cc8e10, 0xc00012f6e0, 0x1418, 0x0)
        /opt/go/src/runtime/proc.go:306 +0xfa fp=0xc0000b7f60 sp=0xc0000b7f40 pc=0x43f25a
runtime.gcBgMarkWorker(0xc00005d000)
        /opt/go/src/runtime/mgc.go:1891 +0x114 fp=0xc0000b7fd8 sp=0xc0000b7f60 pc=0x41fa94
runtime.goexit()
        /opt/go/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc0000b7fe0 sp=0xc0000b7fd8 pc=0x473061
created by runtime.gcBgMarkStartWorkers
        /opt/go/src/runtime/mgc.go:1839 +0x7e

goroutine 52 [GC worker (idle)]:
runtime.gopark(0x1cc8e10, 0xc00012f6f0, 0x1418, 0x0)
        /opt/go/src/runtime/proc.go:306 +0xfa fp=0xc0000b3f60 sp=0xc0000b3f40 pc=0x43f25a
runtime.gcBgMarkWorker(0xc00005f800)
        /opt/go/src/runtime/mgc.go:1891 +0x114 fp=0xc0000b3fd8 sp=0xc0000b3f60 pc=0x41fa94
runtime.goexit()
        /opt/go/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc0000b3fe0 sp=0xc0000b3fd8 pc=0x473061
created by runtime.gcBgMarkStartWorkers
        /opt/go/src/runtime/mgc.go:1839 +0x7e

goroutine 46 [chan receive]:
runtime.gopark(0x1cc8d60, 0xc00058a0b8, 0x1cc170e, 0x2)
        /opt/go/src/runtime/proc.go:306 +0xfa fp=0xc000513e88 sp=0xc000513e68 pc=0x43f25a
runtime.chanrecv(0xc00058a060, 0xc000513f88, 0x290ac01, 0x1cc9178)
        /opt/go/src/runtime/chan.go:577 +0x37a fp=0xc000513f18 sp=0xc000513e88 pc=0x407d3a
runtime.chanrecv1(0xc00058a060, 0xc000513f88)
        /opt/go/src/runtime/chan.go:439 +0x2b fp=0xc000513f48 sp=0xc000513f18 pc=0x40796b
main.Run.func2(0xc00006f580)
        /go/src/github.com/gravitational/teleport/tool/tsh/tsh.go:444 +0xd4 fp=0xc000513fd8 sp=0xc000513f48 pc=0x1801234
runtime.goexit()
        /opt/go/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc000513fe0 sp=0xc000513fd8 pc=0x473061
created by main.Run
        /go/src/github.com/gravitational/teleport/tool/tsh/tsh.go:440 +0x6efe

goroutine 82 [syscall]:
runtime.notetsleepg(0x2941180, 0xffffffffffffffff, 0x0)
        /opt/go/src/runtime/lock_sema.go:294 +0x53 fp=0xc00050ff98 sp=0xc00050ff58 pc=0x40e2f3
os/signal.signal_recv(0x0)
        /opt/go/src/runtime/sigqueue.go:147 +0xa9 fp=0xc00050ffc0 sp=0xc00050ff98 pc=0x46e869
os/signal.loop()
        /opt/go/src/os/signal/signal_unix.go:23 +0x29 fp=0xc00050ffe0 sp=0xc00050ffc0 pc=0xc40989
runtime.goexit()
        /opt/go/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc00050ffe8 sp=0xc00050ffe0 pc=0x473061
created by os/signal.Notify.func1.1
        /opt/go/src/os/signal/signal.go:150 +0x4b

goroutine 78 [chan receive]:
runtime.gopark(0x1cc8d60, 0xc00058a7d8, 0x170e, 0x2)
        /opt/go/src/runtime/proc.go:306 +0xfa fp=0xc00055fe28 sp=0xc00055fe08 pc=0x43f25a
runtime.chanrecv(0xc00058a780, 0xc00055ff38, 0xc0005dc201, 0x9)
        /opt/go/src/runtime/chan.go:577 +0x37a fp=0xc00055feb8 sp=0xc00055fe28 pc=0x407d3a
runtime.chanrecv2(0xc00058a780, 0xc00055ff38, 0xc000538590)
        /opt/go/src/runtime/chan.go:444 +0x2b fp=0xc00055fee8 sp=0xc00055feb8 pc=0x4079ab
golang.org/x/crypto/ssh.(*Session).wait(0xc000230000, 0xc00058a780, 0x1cc8e68, 0x0)
        /go/src/github.com/gravitational/teleport/vendor/golang.org/x/crypto/ssh/session.go:423 +0x85 fp=0xc00055ff90 sp=0xc00055fee8 pc=0xc72bc5
golang.org/x/crypto/ssh.newSession.func1(0xc000230000, 0xc00058a780)
        /go/src/github.com/gravitational/teleport/vendor/golang.org/x/crypto/ssh/session.go:593 +0x3c fp=0xc00055ffd0 sp=0xc00055ff90 pc=0xc7a5dc
runtime.goexit()
        /opt/go/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc00055ffd8 sp=0xc00055ffd0 pc=0x473061
created by golang.org/x/crypto/ssh.newSession
        /go/src/github.com/gravitational/teleport/vendor/golang.org/x/crypto/ssh/session.go:592 +0xbb

goroutine 72 [IO wait]:
runtime.gopark(0x1cc8f68, 0x29cc28d8, 0xc0002d1b02, 0x5)
        /opt/go/src/runtime/proc.go:306 +0xfa fp=0xc000543a40 sp=0xc000543a20 pc=0x43f25a
runtime.netpollblock(0x29cc28b0, 0x72, 0xc000000001)
        /opt/go/src/runtime/netpoll.go:438 +0xa5 fp=0xc000543a78 sp=0xc000543a40 pc=0x4355e5
internal/poll.runtime_pollWait(0x29cc28b0, 0x72, 0x1dfc620)
        /opt/go/src/runtime/netpoll.go:222 +0x65 fp=0xc000543aa0 sp=0xc000543a78 pc=0x46c7c5
internal/poll.(*pollDesc).wait(0xc0002d3338, 0x72, 0x180c600, 0x0, 0x0)
        /opt/go/src/internal/poll/fd_poll_runtime.go:87 +0x4c fp=0xc000543ad0 sp=0xc000543aa0 pc=0x4ea5cc
internal/poll.execIO(0xc0002d3198, 0x1cc81a0, 0x1, 0x0, 0x0)
        /opt/go/src/internal/poll/fd_windows.go:175 +0x105 fp=0xc000543b38 sp=0xc000543ad0 pc=0x4ebac5
internal/poll.(*FD).Read(0xc0002d3180, 0xc00054c000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
        /opt/go/src/internal/poll/fd_windows.go:441 +0x2ff fp=0xc000543bb8 sp=0xc000543b38 pc=0x4ecc9f
net.(*netFD).Read(0xc0002d3180, 0xc00054c000, 0x1000, 0x1000, 0x6e241e, 0xc000543cd8, 0x10)
        /opt/go/src/net/fd_posix.go:55 +0x56 fp=0xc000543c18 sp=0xc000543bb8 pc=0x7662f6
net.(*conn).Read(0xc00050a0c0, 0xc00054c000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
        /opt/go/src/net/net.go:182 +0x95 fp=0xc000543c78 sp=0xc000543c18 pc=0x779c55
bufio.(*Reader).Read(0xc0005086c0, 0xc00007c8d0, 0x4, 0x4, 0x2000, 0x1000000521b9d7b, 0xc000543d18)
        /opt/go/src/bufio/bufio.go:227 +0x238 fp=0xc000543cc8 sp=0xc000543c78 pc=0x545078
io.ReadAtLeast(0x1df8ae0, 0xc0005086c0, 0xc00007c8d0, 0x4, 0x4, 0x4, 0x40f830, 0x2bc1500, 0x9)
        /opt/go/src/io/io.go:314 +0x8e fp=0xc000543d28 sp=0xc000543cc8 pc=0x4b850e
io.ReadFull(...)
        /opt/go/src/io/io.go:333
golang.org/x/crypto/ssh.(*gcmCipher).readCipherPacket(0xc00007c8c0, 0xc00000001d, 0x1df8ae0, 0xc0005086c0, 0xc0002cb801, 0x30, 0x7af, 0x0, 0x0)
        /go/src/github.com/gravitational/teleport/vendor/golang.org/x/crypto/ssh/cipher.go:373 +0x8a fp=0xc000543e00 sp=0xc000543d28 pc=0xc4f6ca
golang.org/x/crypto/ssh.(*connectionState).readPacket(0xc0002ba6c0, 0xc0005086c0, 0xc000543f30, 0x4072a8, 0xc000508838, 0xc00022f830, 0xc000543fb0)
        /go/src/github.com/gravitational/teleport/vendor/golang.org/x/crypto/ssh/transport.go:130 +0x6f fp=0xc000543ea0 sp=0xc000543e00 pc=0xc77f8f
golang.org/x/crypto/ssh.(*transport).readPacket(0xc0002ba6c0, 0xc0000bc000, 0xc000508838, 0x30, 0x0, 0x0)
        /go/src/github.com/gravitational/teleport/vendor/golang.org/x/crypto/ssh/transport.go:114 +0x45 fp=0xc000543ee8 sp=0xc000543ea0 pc=0xc77ea5
golang.org/x/crypto/ssh.(*handshakeTransport).readOnePacket(0xc00054e000, 0xc000543f00, 0xc0000bc000, 0x30, 0x30, 0x0, 0x0)
        /go/src/github.com/gravitational/teleport/vendor/golang.org/x/crypto/ssh/handshake.go:374 +0x57 fp=0xc000543f78 sp=0xc000543ee8 pc=0xc58497
golang.org/x/crypto/ssh.(*handshakeTransport).readLoop(0xc00054e000)
        /go/src/github.com/gravitational/teleport/vendor/golang.org/x/crypto/ssh/handshake.go:197 +0x54 fp=0xc000543fd8 sp=0xc000543f78 pc=0xc579d4
runtime.goexit()
        /opt/go/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc000543fe0 sp=0xc000543fd8 pc=0x473061
created by golang.org/x/crypto/ssh.newClientTransport
        /go/src/github.com/gravitational/teleport/vendor/golang.org/x/crypto/ssh/handshake.go:134 +0x185

goroutine 73 [select]:
runtime.gopark(0x1cc8fe8, 0x0, 0x1809, 0x1)
        /opt/go/src/runtime/proc.go:306 +0xfa fp=0xc000199db0 sp=0xc000199d90 pc=0x43f25a
runtime.selectgo(0xc000199f78, 0xc000199f28, 0x2, 0x101, 0x0)
        /opt/go/src/runtime/select.go:338 +0xd0f fp=0xc000199ed8 sp=0xc000199db0 pc=0x44f26f
golang.org/x/crypto/ssh.(*handshakeTransport).kexLoop(0xc00054e000)
        /go/src/github.com/gravitational/teleport/vendor/golang.org/x/crypto/ssh/handshake.go:268 +0x114 fp=0xc000199fd8 sp=0xc000199ed8 pc=0xc57e74
runtime.goexit()
        /opt/go/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc000199fe0 sp=0xc000199fd8 pc=0x473061
created by golang.org/x/crypto/ssh.newClientTransport
        /go/src/github.com/gravitational/teleport/vendor/golang.org/x/crypto/ssh/handshake.go:135 +0x1a7

goroutine 74 [chan receive]:
runtime.gopark(0x1cc8d60, 0xc000508838, 0xc00022170e, 0x2)
        /opt/go/src/runtime/proc.go:306 +0xfa fp=0xc000515e08 sp=0xc000515de8 pc=0x43f25a
runtime.chanrecv(0xc0005087e0, 0xc000515ee0, 0x1915d01, 0xc000200101)
        /opt/go/src/runtime/chan.go:577 +0x37a fp=0xc000515e98 sp=0xc000515e08 pc=0x407d3a
runtime.chanrecv2(0xc0005087e0, 0xc000515ee0, 0xc00054e001)
        /opt/go/src/runtime/chan.go:444 +0x2b fp=0xc000515ec8 sp=0xc000515e98 pc=0x4079ab
golang.org/x/crypto/ssh.(*handshakeTransport).readPacket(0xc00054e000, 0xc0000bc000, 0x30, 0x30, 0x0, 0x0)
        /go/src/github.com/gravitational/teleport/vendor/golang.org/x/crypto/ssh/handshake.go:187 +0x55 fp=0xc000515f08 sp=0xc000515ec8 pc=0xc578f5
golang.org/x/crypto/ssh.(*mux).onePacket(0xc0002b5260, 0x0, 0x0)
        /go/src/github.com/gravitational/teleport/vendor/golang.org/x/crypto/ssh/mux.go:215 +0x3e fp=0xc000515f80 sp=0xc000515f08 pc=0xc702fe
golang.org/x/crypto/ssh.(*mux).loop(0xc0002b5260)
        /go/src/github.com/gravitational/teleport/vendor/golang.org/x/crypto/ssh/mux.go:190 +0x3c fp=0xc000515fd8 sp=0xc000515f80 pc=0xc7015c
runtime.goexit()
        /opt/go/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc000515fe0 sp=0xc000515fd8 pc=0x473061
created by golang.org/x/crypto/ssh.newMux
        /go/src/github.com/gravitational/teleport/vendor/golang.org/x/crypto/ssh/mux.go:128 +0x165

goroutine 75 [chan receive]:
runtime.gopark(0x1cc8d60, 0xc000508a78, 0x170e, 0x2)
        /opt/go/src/runtime/proc.go:306 +0xfa fp=0xc00053dec0 sp=0xc00053dea0 pc=0x43f25a
runtime.chanrecv(0xc000508a20, 0xc00053dfb8, 0x1, 0x0)
        /opt/go/src/runtime/chan.go:577 +0x37a fp=0xc00053df50 sp=0xc00053dec0 pc=0x407d3a
runtime.chanrecv2(0xc000508a20, 0xc00053dfb8, 0x0)
        /opt/go/src/runtime/chan.go:444 +0x2b fp=0xc00053df80 sp=0xc00053df50 pc=0x4079ab
golang.org/x/crypto/ssh.(*Client).handleGlobalRequests(0xc00007c9b0, 0xc000508a20)
        /go/src/github.com/gravitational/teleport/vendor/golang.org/x/crypto/ssh/client.go:138 +0x74 fp=0xc00053dfd0 sp=0xc00053df80 pc=0xc530f4
runtime.goexit()
        /opt/go/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc00053dfd8 sp=0xc00053dfd0 pc=0x473061
created by golang.org/x/crypto/ssh.NewClient
        /go/src/github.com/gravitational/teleport/vendor/golang.org/x/crypto/ssh/client.go:59 +0xa5

goroutine 76 [chan receive]:
runtime.gopark(0x1cc8d60, 0xc0005089b8, 0x170e, 0x2)
        /opt/go/src/runtime/proc.go:306 +0xfa fp=0xc00053fe10 sp=0xc00053fdf0 pc=0x43f25a
runtime.chanrecv(0xc000508960, 0xc00053ff30, 0x1, 0x0)
        /opt/go/src/runtime/chan.go:577 +0x37a fp=0xc00053fea0 sp=0xc00053fe10 pc=0x407d3a
runtime.chanrecv2(0xc000508960, 0xc00053ff30, 0x0)
        /opt/go/src/runtime/chan.go:444 +0x2b fp=0xc00053fed0 sp=0xc00053fea0 pc=0x4079ab
golang.org/x/crypto/ssh.(*Client).handleChannelOpens(0xc00007c9b0, 0xc000508960)
        /go/src/github.com/gravitational/teleport/vendor/golang.org/x/crypto/ssh/client.go:147 +0x59 fp=0xc00053ffd0 sp=0xc00053fed0 pc=0xc53179
runtime.goexit()
        /opt/go/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc00053ffd8 sp=0xc00053ffd0 pc=0x473061
created by golang.org/x/crypto/ssh.NewClient
        /go/src/github.com/gravitational/teleport/vendor/golang.org/x/crypto/ssh/client.go:60 +0xd1

goroutine 77 [sync.Cond.Wait]:
runtime.gopark(0x1cc8f90, 0xc00007b158, 0x1a14, 0x3)
        /opt/go/src/runtime/proc.go:306 +0xfa fp=0xc000561f00 sp=0xc000561ee0 pc=0x43f25a
runtime.goparkunlock(...)
        /opt/go/src/runtime/proc.go:312
sync.runtime_notifyListWait(0xc00007b150, 0x0)
        /opt/go/src/runtime/sema.go:513 +0x117 fp=0xc000561f48 sp=0xc000561f00 pc=0x46e2d7
sync.(*Cond).Wait(0xc00007b140)
        /opt/go/src/sync/cond.go:56 +0xa5 fp=0xc000561f80 sp=0xc000561f48 pc=0x48b1c5
golang.org/x/crypto/ssh.(*mux).Wait(0xc0002b5260, 0x0, 0x0)
        /go/src/github.com/gravitational/teleport/vendor/golang.org/x/crypto/ssh/mux.go:110 +0x8b fp=0xc000561fb0 sp=0xc000561f80 pc=0xc6f72b
golang.org/x/crypto/ssh.NewClient.func1(0xc00007c9b0)
        /go/src/github.com/gravitational/teleport/vendor/golang.org/x/crypto/ssh/client.go:62 +0x3a fp=0xc000561fd8 sp=0xc000561fb0 pc=0xc7a07a
runtime.goexit()
        /opt/go/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc000561fe0 sp=0xc000561fd8 pc=0x473061
created by golang.org/x/crypto/ssh.NewClient
        /go/src/github.com/gravitational/teleport/vendor/golang.org/x/crypto/ssh/client.go:61 +0xf3

goroutine 83 [select]:
runtime.gopark(0x1cc8fe8, 0x0, 0x1809, 0x1)
        /opt/go/src/runtime/proc.go:306 +0xfa fp=0xc00055dd80 sp=0xc00055dd60 pc=0x43f25a
runtime.selectgo(0xc00055df18, 0xc00055dee0, 0x2, 0x2, 0x0)
        /opt/go/src/runtime/select.go:338 +0xd0f fp=0xc00055dea8 sp=0xc00055dd80 pc=0x44f26f
google.golang.org/grpc.(*ccBalancerWrapper).watcher(0xc00059e440)
        /go/src/github.com/gravitational/teleport/vendor/google.golang.org/grpc/balancer_conn_wrappers.go:69 +0xd1 fp=0xc00055dfd8 sp=0xc00055dea8 pc=0xb84c71
runtime.goexit()
        /opt/go/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc00055dfe0 sp=0xc00055dfd8 pc=0x473061
created by google.golang.org/grpc.newCCBalancerWrapper
        /go/src/github.com/gravitational/teleport/vendor/google.golang.org/grpc/balancer_conn_wrappers.go:60 +0x17a

goroutine 84 [chan receive]:
runtime.gopark(0x1cc8d60, 0xc0005a2718, 0x170e, 0x2)
        /opt/go/src/runtime/proc.go:306 +0xfa fp=0xc0005f3d00 sp=0xc0005f3ce0 pc=0x43f25a
runtime.chanrecv(0xc0005a26c0, 0x0, 0xc0005efd01, 0x1cc6c18)
        /opt/go/src/runtime/chan.go:577 +0x37a fp=0xc0005f3d90 sp=0xc0005f3d00 pc=0x407d3a
runtime.chanrecv1(0xc0005a26c0, 0x0)
        /opt/go/src/runtime/chan.go:439 +0x2b fp=0xc0005f3dc0 sp=0xc0005f3d90 pc=0x40796b
google.golang.org/grpc.(*addrConn).resetTransport(0xc0005dc000)
        /go/src/github.com/gravitational/teleport/vendor/google.golang.org/grpc/clientconn.go:1156 +0x709 fp=0xc0005f3fd8 sp=0xc0005f3dc0 pc=0xb8ce29
runtime.goexit()
        /opt/go/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc0005f3fe0 sp=0xc0005f3fd8 pc=0x473061
created by google.golang.org/grpc.(*addrConn).connect
        /go/src/github.com/gravitational/teleport/vendor/google.golang.org/grpc/clientconn.go:799 +0x13b

goroutine 99 [select]:
runtime.gopark(0x1cc8fe8, 0x0, 0x1809, 0x1)
        /opt/go/src/runtime/proc.go:306 +0xfa fp=0xc00019bdb8 sp=0xc00019bd98 pc=0x43f25a
runtime.selectgo(0xc00019bf78, 0xc00019bf50, 0x2, 0x81c451, 0xc000380000)
        /opt/go/src/runtime/select.go:338 +0xd0f fp=0xc00019bee0 sp=0xc00019bdb8 pc=0x44f26f
google.golang.org/grpc/internal/transport.(*http2Client).keepalive(0xc000395180)
        /go/src/github.com/gravitational/teleport/vendor/google.golang.org/grpc/internal/transport/http2_client.go:1339 +0x1ac fp=0xc00019bfd8 sp=0xc00019bee0 pc=0xb5d94c
runtime.goexit()
        /opt/go/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc00019bfe0 sp=0xc00019bfd8 pc=0x473061
created by google.golang.org/grpc/internal/transport.newHTTP2Client
        /go/src/github.com/gravitational/teleport/vendor/google.golang.org/grpc/internal/transport/http2_client.go:295 +0x171c

goroutine 100 [sync.Cond.Wait]:
runtime.gopark(0x1cc8f90, 0xc00059e598, 0x8ec4a4c1e26f1a14, 0x3)
        /opt/go/src/runtime/proc.go:306 +0xfa fp=0xc000549568 sp=0xc000549548 pc=0x43f25a
runtime.goparkunlock(...)
        /opt/go/src/runtime/proc.go:312
sync.runtime_notifyListWait(0xc00059e590, 0xc000000007)
        /opt/go/src/runtime/sema.go:513 +0x117 fp=0xc0005495b0 sp=0xc000549568 pc=0x46e2d7
sync.(*Cond).Wait(0xc00059e580)
        /opt/go/src/sync/cond.go:56 +0xa5 fp=0xc0005495e8 sp=0xc0005495b0 pc=0x48b1c5
golang.org/x/crypto/ssh.(*buffer).Read(0xc0005d4e60, 0xc0001d8a80, 0xa3a, 0xa3a, 0x0, 0x0, 0x0)
        /go/src/github.com/gravitational/teleport/vendor/golang.org/x/crypto/ssh/buffer.go:94 +0x1dc fp=0xc000549630 sp=0xc0005495e8 pc=0xc4717c
golang.org/x/crypto/ssh.(*channel).ReadExtended(0xc0005b8240, 0xc0001d8a80, 0xa3a, 0xa3a, 0x0, 0xa3a, 0xc0001d8a85, 0x12)
        /go/src/github.com/gravitational/teleport/vendor/golang.org/x/crypto/ssh/channel.go:351 +0x1fb fp=0xc0005496a0 sp=0xc000549630 pc=0xc4c13b
golang.org/x/crypto/ssh.(*channel).Read(0xc0005b8240, 0xc0001d8a80, 0xa3a, 0xa3a, 0xc0001d8a85, 0x0, 0xa35)
        /go/src/github.com/gravitational/teleport/vendor/golang.org/x/crypto/ssh/channel.go:528 +0x65 fp=0xc0005496f0 sp=0xc0005496a0 pc=0xc4d405
github.com/gravitational/teleport/lib/utils.(*PipeNetConn).Read(0xc00007c0a0, 0xc0001d8a80, 0xa3a, 0xa3a, 0xc0001d8a80, 0x5, 0x2bc9b20)
        /go/src/github.com/gravitational/teleport/lib/utils/fakeconn.go:59 +0x58 fp=0xc000549738 sp=0xc0005496f0 pc=0xdf70b8
crypto/tls.(*atLeastReader).Read(0xc00019c100, 0xc0001d8a80, 0xa3a, 0xa3a, 0x22, 0xa35, 0xc0000157f8)
        /opt/go/src/crypto/tls/conn.go:779 +0x67 fp=0xc000549798 sp=0xc000549738 pc=0x7db0e7
bytes.(*Buffer).ReadFrom(0xc000380280, 0x1df8c80, 0xc00019c100, 0x40d2ec, 0x19fa2c0, 0x1ab6760)
        /opt/go/src/bytes/buffer.go:204 +0xbb fp=0xc000549808 sp=0xc000549798 pc=0x51c51b
crypto/tls.(*Conn).readFromUntil(0xc000380000, 0x29c22858, 0xc00007c0a0, 0x5, 0xc00007c0a0, 0x11)
        /opt/go/src/crypto/tls/conn.go:801 +0xf3 fp=0xc000549858 sp=0xc000549808 pc=0x7db333
crypto/tls.(*Conn).readRecordOrCCS(0xc000380000, 0x0, 0x0, 0x100)
        /opt/go/src/crypto/tls/conn.go:608 +0x12d fp=0xc000549cb8 sp=0xc000549858 pc=0x7d814d
crypto/tls.(*Conn).readRecord(...)
        /opt/go/src/crypto/tls/conn.go:576
crypto/tls.(*Conn).Read(0xc000380000, 0xc00001e000, 0x8000, 0x8000, 0x0, 0x0, 0x0)
        /opt/go/src/crypto/tls/conn.go:1252 +0x16d fp=0xc000549d18 sp=0xc000549cb8 pc=0x7de46d
bufio.(*Reader).Read(0xc0006f08a0, 0xc0002c21f8, 0x9, 0x9, 0xc00001e009, 0xc000580000, 0x0)
        /opt/go/src/bufio/bufio.go:227 +0x238 fp=0xc000549d68 sp=0xc000549d18 pc=0x545078
io.ReadAtLeast(0x1df8ae0, 0xc0006f08a0, 0xc0002c21f8, 0x9, 0x9, 0x9, 0x909fa0dde34, 0xc000015e48, 0x4df145)
        /opt/go/src/io/io.go:314 +0x8e fp=0xc000549dc8 sp=0xc000549d68 pc=0x4b850e
io.ReadFull(...)
        /opt/go/src/io/io.go:333
golang.org/x/net/http2.readFrameHeader(0xc0002c21f8, 0x9, 0x9, 0x1df8ae0, 0xc0006f08a0, 0x0, 0x400000000, 0x290a120, 0xf43210)
        /go/src/github.com/gravitational/teleport/vendor/golang.org/x/net/http2/frame.go:237 +0x8e fp=0xc000549e30 sp=0xc000549dc8 pc=0xb41a0e
golang.org/x/net/http2.(*Framer).ReadFrame(0xc0002c21c0, 0xc0001ce020, 0x290a120, 0x0, 0x0)
        /go/src/github.com/gravitational/teleport/vendor/golang.org/x/net/http2/frame.go:492 +0xa8 fp=0xc000549ef0 sp=0xc000549e30 pc=0xb42288
google.golang.org/grpc/internal/transport.(*http2Client).reader(0xc000395180)
        /go/src/github.com/gravitational/teleport/vendor/google.golang.org/grpc/internal/transport/http2_client.go:1273 +0x179 fp=0xc000549fd8 sp=0xc000549ef0 pc=0xb5d059
runtime.goexit()
        /opt/go/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc000549fe0 sp=0xc000549fd8 pc=0x473061
created by google.golang.org/grpc/internal/transport.newHTTP2Client
        /go/src/github.com/gravitational/teleport/vendor/google.golang.org/grpc/internal/transport/http2_client.go:300 +0xd51

goroutine 101 [select]:
runtime.gopark(0x1cc8fe8, 0x0, 0x1809, 0x1)
        /opt/go/src/runtime/proc.go:306 +0xfa fp=0xc000195d50 sp=0xc000195d30 pc=0x43f25a
runtime.selectgo(0xc000195ed0, 0xc000195ea8, 0x2, 0x290a107, 0x0)
        /opt/go/src/runtime/select.go:338 +0xd0f fp=0xc000195e78 sp=0xc000195d50 pc=0x44f26f
google.golang.org/grpc/internal/transport.(*controlBuffer).get(0xc00007c780, 0x1, 0x0, 0x0, 0x0, 0x0)
        /go/src/github.com/gravitational/teleport/vendor/google.golang.org/grpc/internal/transport/controlbuf.go:395 +0x13b fp=0xc000195f30 sp=0xc000195e78 pc=0xb4fe1b
google.golang.org/grpc/internal/transport.(*loopyWriter).run(0xc00058a180, 0x0, 0x0)
        /go/src/github.com/gravitational/teleport/vendor/google.golang.org/grpc/internal/transport/controlbuf.go:513 +0x1dd fp=0xc000195f88 sp=0xc000195f30 pc=0xb5077d
google.golang.org/grpc/internal/transport.newHTTP2Client.func3(0xc000395180)
        /go/src/github.com/gravitational/teleport/vendor/google.golang.org/grpc/internal/transport/http2_client.go:346 +0x85 fp=0xc000195fd8 sp=0xc000195f88 pc=0xb641c5
runtime.goexit()
        /opt/go/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc000195fe0 sp=0xc000195fd8 pc=0x473061
created by google.golang.org/grpc/internal/transport.newHTTP2Client
        /go/src/github.com/gravitational/teleport/vendor/google.golang.org/grpc/internal/transport/http2_client.go:344 +0xf1c

goroutine 85 [select]:
runtime.gopark(0x1cc8fe8, 0x0, 0x1809, 0x1)
        /opt/go/src/runtime/proc.go:306 +0xfa fp=0xc0005f7e00 sp=0xc0005f7de0 pc=0x43f25a
runtime.selectgo(0xc0005f7f60, 0xc0005f7f50, 0x2, 0x0, 0x0)
        /opt/go/src/runtime/select.go:338 +0xd0f fp=0xc0005f7f28 sp=0xc0005f7e00 pc=0x44f26f
google.golang.org/grpc.newClientStream.func5(0xc000193500, 0xc00042c000, 0x1e3fa40, 0xc0005cacf0)
        /go/src/github.com/gravitational/teleport/vendor/google.golang.org/grpc/stream.go:318 +0xde fp=0xc0005f7fc0 sp=0xc0005f7f28 pc=0xba2c1e
runtime.goexit()
        /opt/go/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc0005f7fc8 sp=0xc0005f7fc0 pc=0x473061
created by google.golang.org/grpc.newClientStream
        /go/src/github.com/gravitational/teleport/vendor/google.golang.org/grpc/stream.go:317 +0xc10

While running with debug mode, the only concerning thing I see is ERRO [CLIENT] [KEY AGENT] Unable to connect to SSH agent on socket: "". client\api.go:2449 after I enter the device name.

awly commented 3 years ago

Looks like a cgo bug in https://github.com/flynn/hid/blob/master/hid_windows.go I'll try to repro this on a Windows box.

@LeCodeCo how did you run the tsh binary? Under the Linux subsystem or MinGW?

RihanArfan commented 3 years ago

@LeCodeCo how did you run the tsh binary? Under the Linux subsystem or MinGW?

Downloaded it, opened PowerShell and ran .\tsh.exe. Guessing that'd be MinGW.

awly commented 3 years ago

Cool, I'm able to reproduce it in powershell. At first, the MFA prompt just hangs, not responding to u2f taps. When I cancel it and try again, it hangs for a bit but then unblocks with the above panic.

Since the problem is in a dependency, I don't have a quick way to fix it right now. Need to make a minimal repro snippet and submit a report to the dependency maintainers.

zmb3 commented 2 years ago

Closing as U2F is no longer supported in Teleport.