op cli crashes after auth always

shyim
shyim
Community Member

Hey,

It looks like op crashes always after auth (giving the master password). The next command works like expected.

fatal error: runtime.semawakeup

runtime stack:
runtime.throw({0xab1d55, 0x433285})
    /usr/local/go/src/runtime/panic.go:1198 +0x76
runtime.semawakeup.func1()
    /usr/local/go/src/runtime/os_windows.go:873 +0x70
runtime.semawakeup(0x1)
    /usr/local/go/src/runtime/os_windows.go:871 +0x56
runtime.notewakeup(0x0)
    /usr/local/go/src/runtime/lock_sema.go:162 +0x4e
runtime.startm(0x0, 0x1)
    /usr/local/go/src/runtime/proc.go:2504 +0x1e9
runtime.wakep()
    /usr/local/go/src/runtime/proc.go:2584 +0x5a
runtime.resetspinning()
    /usr/local/go/src/runtime/proc.go:3216 +0x45
runtime.schedule()
    /usr/local/go/src/runtime/proc.go:3374 +0x25e
runtime.park_m(0xc0001c3520)
    /usr/local/go/src/runtime/proc.go:3516 +0x14d
runtime.mcall()
    /usr/local/go/src/runtime/asm_amd64.s:307 +0x4a

goroutine 1 [runnable]:
math/big.nat.montgomery({0xc0000e0d80, 0x40, 0x86}, {0xc000308000, 0x40, 0x84}, {0xc000308000, 0x40, 0x84}, {0xc0000ae240, ...}, ...)
    /usr/local/go/src/math/big/nat.go:213 +0x50e
math/big.nat.expNNMontgomery({0xc0000af8c0, 0x440d25, 0x44}, {0xc0000189e0, 0xc000082000, 0xc0000c6738}, {0xc000022320, 0x5, 0x200000003}, {0xc0000ae240, ...})
    /usr/local/go/src/math/big/nat.go:1122 +0xb0b
math/big.nat.expNN({0x0, 0x40d8aa, 0xc0000c68d8}, {0xc0000189e0, 0x48, 0x9bd980}, {0xc000022320, 0x201c770beb8, 0x10}, {0xc0000ae240, ...})
    /usr/local/go/src/math/big/nat.go:937 +0x432
math/big.(*Int).Exp(0xc000091960, 0xc000090620, 0xc00001bc50, 0x1)
    /usr/local/go/src/math/big/int.go:509 +0x199
github.com/1Password/srp.(*SRP).makeA(0xc0000ab7c0)
    /builds/dev/b5/op/vendor/github.com/1Password/srp/internal.go:78 +0xc5
github.com/1Password/srp.newSRP(0x0, 0xc0000be8d0, 0xc0000917e0, 0xc000091820)
    /builds/dev/b5/op/vendor/github.com/1Password/srp/srp.go:143 +0x6f0
github.com/1Password/srp.NewSRPClient(...)
    /builds/dev/b5/op/vendor/github.com/1Password/srp/srp.go:86
go.1password.io/core-security/crypto.NewSRPWithEmailAccountKeyComputedXSessionID({0xc000422030, 0xc00002d450}, 0xc000408870, {{{0x0, 0x0}, {0x0, 0x0}, 0x0, {0x0, 0x0}}, ...}, ...)
    /builds/dev/b5/op/vendor/go.1password.io/core-security/crypto/srp.go:82 +0x175
go.1password.io/op/core/b5/api/credentials.SigninSRPComputedXCredentials.CreateSRPClient({{0xc00041e100, 0x19}, {0xc000422030, 0x13}, {0xc00041e120, 0x1a}, 0xc000408870, 0xc0004600f0, {0xc000412b00, 0x40}}, ...)
    /builds/dev/b5/op/core/b5/api/credentials/signincredentials.go:149 +0xd0
go.1password.io/op/core/b5/api.SigninWithCredentialsAndHeaders({0xbaf888, 0xc00041a120}, {{0xc000266aa0, 0x1a}, {0xaadefc, 0xd}, {0xaa2a03, 0x7}, {0xc00040e4f9, 0x4}, ...}, ...)
    /builds/dev/b5/op/core/b5/api/signin.go:121 +0x942
go.1password.io/op/core/b5/api.SigninWithCredentials(...)
    /builds/dev/b5/op/core/b5/api/signin.go:33
go.1password.io/op/op-cli/desktopapp.signIn({0xba7030, 0xc0000180e0}, 0xb99a80, 0xc00042a000)
    /builds/dev/b5/op/op-cli/desktopapp/desktopapp.go:357 +0x510
go.1password.io/op/op-cli/desktopapp.SignIn({{0xc00025f098, 0x13}, {0xc000266fa0, 0x1a}, {0xc000266f60, 0x1a}, {0xc00025f080, 0x11}, {0xc000266f88, 0x10}})
    /builds/dev/b5/op/op-cli/desktopapp/desktopapp.go:198 +0x172
go.1password.io/op/op-cli/command.initSessionFunc.func1()
    /builds/dev/b5/op/op-cli/command/root.go:440 +0x3f8
go.1password.io/op/op-cli/command.(*itemListCommand).Run(0xc00025c360)
    /builds/dev/b5/op/op-cli/command/item_list.go:83 +0x39
go.1password.io/op/op-cli/command.Bind.func3(0xc00027bb80, {0xc0002658a0, 0x0, 0x2})
    /builds/dev/b5/op/op-cli/command/command.go:71 +0x4e
github.com/spf13/cobra.(*Command).execute(0xc00027bb80, {0xc000265880, 0x2, 0x2})
    /builds/dev/b5/op/vendor/github.com/spf13/cobra/command.go:844 +0x60e
github.com/spf13/cobra.(*Command).ExecuteC(0xffecc0)
    /builds/dev/b5/op/vendor/github.com/spf13/cobra/command.go:952 +0x3ad
go.1password.io/op/op-cli/command.Execute()
    /builds/dev/b5/op/op-cli/command/root.go:317 +0x5d
main.main()
    /builds/dev/b5/op/op-cli/main.go:15 +0x31

goroutine 36 [syscall, locked to thread]:
syscall.Syscall6(0x7ffcbc096320, 0x5, 0x1f8, 0xc000093f84, 0xc000093f88, 0xc000093f98, 0xffffffff, 0x0)
    /usr/local/go/src/runtime/syscall_windows.go:497 +0xfa
github.com/Microsoft/go-winio.getQueuedCompletionStatus(0x1f8, 0xc000093f84, 0xc000093f88, 0xc000093f98, 0xffffffff)
    /builds/dev/b5/op/vendor/github.com/Microsoft/go-winio/zsyscall_windows.go:357 +0xb4
github.com/Microsoft/go-winio.ioCompletionProcessor(0xc00026e080)
    /builds/dev/b5/op/vendor/github.com/Microsoft/go-winio/file.go:173 +0x8a
created by github.com/Microsoft/go-winio.initIo
    /builds/dev/b5/op/vendor/github.com/Microsoft/go-winio/file.go:74 +0x67

goroutine 58 [IO wait]:
internal/poll.runtime_pollWait(0x201ecb0d018, 0x72)
    /usr/local/go/src/runtime/netpoll.go:303 +0x85
internal/poll.(*pollDesc).wait(0x9, 0xd, 0x0)
    /usr/local/go/src/internal/poll/fd_poll_runtime.go:84 +0x32
internal/poll.execIO(0xc000322798, 0xafba18)
    /usr/local/go/src/internal/poll/fd_windows.go:175 +0xe5
internal/poll.(*FD).Read(0xc000322780, {0xc000492000, 0x17cb, 0x17cb})
    /usr/local/go/src/internal/poll/fd_windows.go:441 +0x25f
net.(*netFD).Read(0xc000322780, {0xc000492000, 0xc00049200d, 0x19})
    /usr/local/go/src/net/fd_posix.go:56 +0x29
net.(*conn).Read(0xc000268728, {0xc000492000, 0x17be, 0xc00029f7f8})
    /usr/local/go/src/net/net.go:183 +0x45
crypto/tls.(*atLeastReader).Read(0xc00010a450, {0xc000492000, 0x0, 0x40a4ad})
    /usr/local/go/src/crypto/tls/conn.go:777 +0x3d
bytes.(*Buffer).ReadFrom(0xc0004485f8, {0xb97ce0, 0xc00010a450})
    /usr/local/go/src/bytes/buffer.go:204 +0x98
crypto/tls.(*Conn).readFromUntil(0xc000448380, {0x201ee774110, 0xc000268728}, 0x17cb)
    /usr/local/go/src/crypto/tls/conn.go:799 +0xe5
crypto/tls.(*Conn).readRecordOrCCS(0xc000448380, 0x0)
    /usr/local/go/src/crypto/tls/conn.go:606 +0x112
crypto/tls.(*Conn).readRecord(...)
    /usr/local/go/src/crypto/tls/conn.go:574
crypto/tls.(*Conn).Read(0xc000448380, {0xc0004b7000, 0x1000, 0xc0004821a0})
    /usr/local/go/src/crypto/tls/conn.go:1277 +0x16f
bufio.(*Reader).Read(0xc00041b800, {0xc0004a4818, 0x9, 0xc00009d320})
    /usr/local/go/src/bufio/bufio.go:227 +0x1b4
io.ReadAtLeast({0xb97b60, 0xc00041b800}, {0xc0004a4818, 0x9, 0x9}, 0x9)
    /usr/local/go/src/io/io.go:328 +0x9a
io.ReadFull(...)
    /usr/local/go/src/io/io.go:347
net/http.http2readFrameHeader({0xc0004a4818, 0x9, 0xc000286ea0}, {0xb97b60, 0xc00041b800})
    /usr/local/go/src/net/http/h2_bundle.go:1555 +0x6e
net/http.(*http2Framer).ReadFrame(0xc0004a47e0)
    /usr/local/go/src/net/http/h2_bundle.go:1813 +0x95
net/http.(*http2clientConnReadLoop).run(0xc000487f98)
    /usr/local/go/src/net/http/h2_bundle.go:8608 +0x130
net/http.(*http2ClientConn).readLoop(0xc00047e300)
    /usr/local/go/src/net/http/h2_bundle.go:8531 +0x6f
created by net/http.(*http2Transport).newClientConn
    /usr/local/go/src/net/http/h2_bundle.go:7325 +0xb85

1Password Version: Not Provided
Extension Version: Not Provided
OS Version: Windows 11
Browser:_ Not Provided

Comments

  • Hi @shyim. What do you mean by "The next command works like expected."? I see you are using Windows 11, do you use Powershell? What version of the cli are you using?

    Thanks
    Andi

  • shyim
    shyim
    Community Member

    When I open a fresh powershell and run any op command it asks for my password. After giving the password it breaks like with the error above. When I call now the same command again. It works. I guess on any new shell / process the op asks for password and this breaks really.

    It's not related to power shell. When I use the VSCode extension it explodes one time and then it works

    Version is 2.6.1

  • andi.t_1P
    edited August 2022

    It seems we already have an existing internal issue to track this exact problem. This seems to be caused by a bug in Golang for Windows: https://github.com/golang/go/issues/43720. I initially thought the issue to be related to Windows 11 but Windows 10 Pro users report this as well. I will jump on this and see if I can find a faster solution than opening an issue on the Go codebase, but I do not promise anything.

  • shyim
    shyim
    Community Member

    @andi.t_1P It looks like it solved already that linked issue. Is it also built with a newer Go version? 😅

  • andi.t_1P
    edited August 2022

    This is exactly what I was trying to find out now. We should definitely be on a version which includes this change but maybe this change was not introduced in releases 🤔

  • Hi,

    Just wanted to drop by to let you know that we have just released v2.11.0 of 1Password CLI, which should address this issue. See Update to the latest version of 1Password CLI for instructions on how to update.

    Let us know if you are still having issues with v2.11.0 or later.

This discussion has been closed.