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

Static Argon2 parameters cause out-of-memory in low-memory (~2GB ram) environments #155

Open
rapenne-s opened this issue Apr 10, 2024 · 1 comment
Labels
bug Something isn't working enhancement New feature or request

Comments

@rapenne-s
Copy link

rapenne-s commented Apr 10, 2024

Hi

I just installed Goldwarden 0.2.13, I tried to set the PIN but it didn't work due to a memory issue. I had to increase my VM memory to 4 GB to get it to work.

Is this expected?

[INF] [16:14] [Goldwarden > Pinentry] >>> Asking for pin |Pin Change|Enter your desired pin|
[INF] [16:14] [Goldwarden > Pinentry] >>> Got pin from user
fatal error: runtime: out of memory

runtime stack:
runtime.throw({0x9350a6?, 0x0?})
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/panic.go:1047 +0x5d fp=0x7144527fbc30 sp=0x7144527fbc00 pc=0x43bedd
runtime.sysMapOS(0xc000800000, 0x80000000?)
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/mem_linux.go:187 +0x11b fp=0x7144527fbc78 sp=0x7144527fbc30 pc=0x41eb9b
runtime.sysMap(0xcef520?, 0xc3ffffffff?, 0xcff6b8?)
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/mem.go:142 +0x35 fp=0x7144527fbca8 sp=0x7144527fbc78 pc=0x41e575
runtime.(*mheap).grow(0xcef520, 0x40000?)
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/mheap.go:1522 +0x252 fp=0x7144527fbd20 sp=0x7144527fbca8 pc=0x42ed12
runtime.(*mheap).allocSpan(0xcef520, 0x40000, 0x0, 0x6c?)
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/mheap.go:1243 +0x1b7 fp=0x7144527fbdb8 sp=0x7144527fbd20 pc=0x42e457
runtime.(*mheap).alloc.func1()
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/mheap.go:961 +0x65 fp=0x7144527fbe00 sp=0x7144527fbdb8 pc=0x42df05
runtime.systemstack()
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/asm_amd64.s:496 +0x49 fp=0x7144527fbe08 sp=0x7144527fbe00 pc=0x46c8a9

goroutine 30 [running]:
runtime.systemstack_switch()
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/asm_amd64.s:463 fp=0xc0000a3610 sp=0xc0000a3608 pc=0x46c840
runtime.(*mheap).alloc(0x80000000?, 0x40000?, 0x33?)
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/mheap.go:955 +0x65 fp=0xc0000a3658 sp=0xc0000a3610 pc=0x42de45
runtime.(*mcache).allocLarge(0x7144807b8108?, 0x80000000, 0x1)
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/mcache.go:234 +0x85 fp=0xc0000a36a0 sp=0xc0000a3658 pc=0x41d605
runtime.mallocgc(0x80000000, 0x8b4860, 0x1)
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/malloc.go:1053 +0x4fe fp=0xc0000a3708 sp=0xc0000a36a0 pc=0x4144fe
runtime.makeslice(0xc000032190?, 0xc0000a3788?, 0x63a5df?)
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/slice.go:103 +0x52 fp=0xc0000a3730 sp=0xc0000a3708 pc=0x4535f2
golang.org/x/crypto/argon2.initBlocks(0xc000032140, 0x200000, 0x8)
	/home/runner/go/pkg/mod/golang.org/x/[email protected]/argon2/argon2.go:158 +0x50 fp=0xc0000a3798 sp=0xc0000a3730 pc=0x63a730
golang.org/x/crypto/argon2.deriveKey(0xc0000a38a0?, {0xc000134788, 0x4, 0x8}, {0xc000030690, 0x24, 0x30}, {0x0, 0x0, 0x0}, ...)
	/home/runner/go/pkg/mod/golang.org/x/[email protected]/argon2/argon2.go:113 +0x1da fp=0xc0000a3898 sp=0xc0000a3798 pc=0x63a27a
golang.org/x/crypto/argon2.Key(...)
	/home/runner/go/pkg/mod/golang.org/x/[email protected]/argon2/argon2.go:73
github.com/quexten/goldwarden/agent/config.(*Config).UpdatePin(0xc000002180, {0xc000134764, 0x4}, 0x1)
	/home/runner/work/goldwarden/goldwarden/agent/config/config.go:183 +0x11a fp=0xc0000a3a58 sp=0xc0000a3898 pc=0x6c5a1a
github.com/quexten/goldwarden/agent/actions.handleUpdateVaultPin({0xc0001343c4?, {0x4?, 0xc0000da244?, 0xa?}}, 0xc000002180, 0x7?, 0xc000174143?)
	/home/runner/work/goldwarden/goldwarden/agent/actions/vault.go:225 +0x2e5 fp=0xc0000a3ad0 sp=0xc0000a3a58 pc=0x84b045
github.com/quexten/goldwarden/agent.serveAgentSession({0x9f4778, 0xc000014010}, 0xc00007c280?, 0xc000002180)
	/home/runner/work/goldwarden/goldwarden/agent/unixsocketagent.go:276 +0x60c fp=0xc0000a3fb0 sp=0xc0000a3ad0 pc=0x84c4ec
github.com/quexten/goldwarden/agent.StartUnixAgent.func9.1()
	/home/runner/work/goldwarden/goldwarden/agent/unixsocketagent.go:511 +0x32 fp=0xc0000a3fe0 sp=0xc0000a3fb0 pc=0x84e7d2
runtime.goexit()
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc0000a3fe8 sp=0xc0000a3fe0 pc=0x46ea61
created by github.com/quexten/goldwarden/agent.StartUnixAgent.func9
	/home/runner/work/goldwarden/goldwarden/agent/unixsocketagent.go:511 +0x45

goroutine 1 [chan receive]:
runtime.gopark(0xc00007a0c0?, 0xc0000f6ec8?, 0xc5?, 0x8b?, 0xc8d120?)
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/proc.go:381 +0xd6 fp=0xc0000f6e98 sp=0xc0000f6e78 pc=0x43ec36
runtime.chanrecv(0xc00007a600, 0x0, 0x1)
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/chan.go:583 +0x49d fp=0xc0000f6f28 sp=0xc0000f6e98 pc=0x40db5d
runtime.chanrecv1(0x9ef080?, 0xc000014020?)
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/chan.go:442 +0x18 fp=0xc0000f6f50 sp=0xc0000f6f28 pc=0x40d658
github.com/quexten/goldwarden/agent.mainloop()
	/home/runner/work/goldwarden/goldwarden/agent/defaultmainloop.go:14 +0xbf fp=0xc0000f6fc0 sp=0xc0000f6f50 pc=0x84bdbf
github.com/quexten/goldwarden/agent.StartUnixAgent({0xc00002c380, 0x3f}, {{0x0, 0x0}, 0x0, {0xc000032280, 0x41}, 0x0, 0x0, {0x0, ...}, ...})
	/home/runner/work/goldwarden/goldwarden/agent/unixsocketagent.go:515 +0xe45 fp=0xc0000f7948 sp=0xc0000f6fc0 pc=0x84e145
github.com/quexten/goldwarden/cmd.glob..func11(0xc94b00?, {0x92c989?, 0x0?, 0x0?})
	/home/runner/work/goldwarden/goldwarden/cmd/daemonize.go:68 +0x3f8 fp=0xc0000f7a90 sp=0xc0000f7948 pc=0x851d18
github.com/spf13/cobra.(*Command).execute(0xc94b00, {0xd062b0, 0x0, 0x0})
	/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:987 +0xa91 fp=0xc0000f7c30 sp=0xc0000f7a90 pc=0x71fc51
github.com/spf13/cobra.(*Command).ExecuteC(0xc953a0)
	/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:1115 +0x425 fp=0xc0000f7d08 sp=0xc0000f7c30 pc=0x720585
github.com/spf13/cobra.(*Command).Execute(...)
	/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:1039
github.com/quexten/goldwarden/cmd.Execute({{0x0, 0x0}, 0x0, {0xc000032280, 0x41}, 0x0, 0x0, {0x0, 0x0}, {0x0, ...}, ...})
	/home/runner/work/goldwarden/goldwarden/cmd/root.go:29 +0xea fp=0xc0000f7d40 sp=0xc0000f7d08 pc=0x85312a
main.main()
	/home/runner/work/goldwarden/goldwarden/main.go:52 +0x5f8 fp=0xc0000f7f80 sp=0xc0000f7d40 pc=0x856eb8
runtime.main()
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/proc.go:250 +0x207 fp=0xc0000f7fe0 sp=0xc0000f7f80 pc=0x43e807
runtime.goexit()
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc0000f7fe8 sp=0xc0000f7fe0 pc=0x46ea61

goroutine 2 [force gc (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/proc.go:381 +0xd6 fp=0xc000050fb0 sp=0xc000050f90 pc=0x43ec36
runtime.goparkunlock(...)
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/proc.go:387
runtime.forcegchelper()
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/proc.go:305 +0xb0 fp=0xc000050fe0 sp=0xc000050fb0 pc=0x43ea70
runtime.goexit()
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc000050fe8 sp=0xc000050fe0 pc=0x46ea61
created by runtime.init.6
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/proc.go:293 +0x25

goroutine 3 [GC sweep wait]:
runtime.gopark(0x1?, 0x0?, 0x0?, 0x0?, 0x0?)
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/proc.go:381 +0xd6 fp=0xc000051780 sp=0xc000051760 pc=0x43ec36
runtime.goparkunlock(...)
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/proc.go:387
runtime.bgsweep(0x0?)
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/mgcsweep.go:319 +0xde fp=0xc0000517c8 sp=0xc000051780 pc=0x42ad5e
runtime.gcenable.func1()
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/mgc.go:178 +0x26 fp=0xc0000517e0 sp=0xc0000517c8 pc=0x41ffc6
runtime.goexit()
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc0000517e8 sp=0xc0000517e0 pc=0x46ea61
created by runtime.gcenable
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/mgc.go:178 +0x6b

goroutine 4 [GC scavenge wait]:
runtime.gopark(0xc7eb3366f?, 0x3b9cb34e?, 0x0?, 0x0?, 0x0?)
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/proc.go:381 +0xd6 fp=0xc000051f70 sp=0xc000051f50 pc=0x43ec36
runtime.goparkunlock(...)
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/proc.go:387
runtime.(*scavengerState).park(0xcd6ce0)
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/mgcscavenge.go:400 +0x53 fp=0xc000051fa0 sp=0xc000051f70 pc=0x428c33
runtime.bgscavenge(0x0?)
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/mgcscavenge.go:633 +0x65 fp=0xc000051fc8 sp=0xc000051fa0 pc=0x429225
runtime.gcenable.func2()
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/mgc.go:179 +0x26 fp=0xc000051fe0 sp=0xc000051fc8 pc=0x41ff66
runtime.goexit()
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc000051fe8 sp=0xc000051fe0 pc=0x46ea61
created by runtime.gcenable
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/mgc.go:179 +0xaa

goroutine 5 [finalizer wait]:
runtime.gopark(0x0?, 0x978468?, 0xe0?, 0x81?, 0x2000000020?)
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/proc.go:381 +0xd6 fp=0xc000050628 sp=0xc000050608 pc=0x43ec36
runtime.runfinq()
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/mfinal.go:193 +0x107 fp=0xc0000507e0 sp=0xc000050628 pc=0x41f007
runtime.goexit()
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc0000507e8 sp=0xc0000507e0 pc=0x46ea61
created by runtime.createfing
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/mfinal.go:163 +0x45

goroutine 6 [chan receive]:
runtime.gopark(0xc00007a7e0?, 0x41460a?, 0x20?, 0xc8?, 0x8c6700?)
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/proc.go:381 +0xd6 fp=0xc000063e18 sp=0xc000063df8 pc=0x43ec36
runtime.chanrecv(0xc00007afc0, 0xc000063f18, 0x1)
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/chan.go:583 +0x49d fp=0xc000063ea8 sp=0xc000063e18 pc=0x40db5d
runtime.chanrecv2(0xc00011a000?, 0xa?)
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/chan.go:447 +0x18 fp=0xc000063ed0 sp=0xc000063ea8 pc=0x40d698
github.com/quexten/goldwarden/agent/processsecurity.MonitorLocks(0xc000063fb8)
	/home/runner/work/goldwarden/goldwarden/agent/processsecurity/unix.go:41 +0x185 fp=0xc000063f70 sp=0xc000063ed0 pc=0x84ba05
github.com/quexten/goldwarden/agent.StartUnixAgent.func2()
	/home/runner/work/goldwarden/goldwarden/agent/unixsocketagent.go:374 +0x58 fp=0xc000063fe0 sp=0xc000063f70 pc=0x84f538
runtime.goexit()
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc000063fe8 sp=0xc000063fe0 pc=0x46ea61
created by github.com/quexten/goldwarden/agent.StartUnixAgent
	/home/runner/work/goldwarden/goldwarden/agent/unixsocketagent.go:373 +0x82a

goroutine 26 [GC worker (idle)]:
runtime.gopark(0xc44261c72?, 0xc000052f80?, 0x3?, 0x0?, 0xc000034a20?)
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/proc.go:381 +0xd6 fp=0xc000052f50 sp=0xc000052f30 pc=0x43ec36
runtime.gcBgMarkWorker()
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/mgc.go:1275 +0xf1 fp=0xc000052fe0 sp=0xc000052f50 pc=0x421d31
runtime.goexit()
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc000052fe8 sp=0xc000052fe0 pc=0x46ea61
created by runtime.gcBgMarkStartWorkers
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/mgc.go:1199 +0x25

goroutine 8 [chan receive]:
runtime.gopark(0xc00007a5a0?, 0x41460a?, 0xd0?, 0xc7?, 0x8c6700?)
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/proc.go:381 +0xd6 fp=0xc000065e40 sp=0xc000065e20 pc=0x43ec36
runtime.chanrecv(0xc00007af60, 0xc000065f50, 0x1)
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/chan.go:583 +0x49d fp=0xc000065ed0 sp=0xc000065e40 pc=0x40db5d
runtime.chanrecv2(0xc00011a000?, 0xa?)
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/chan.go:447 +0x18 fp=0xc000065ef8 sp=0xc000065ed0 pc=0x40d698
github.com/quexten/goldwarden/agent/notify.ListenForNotifications()
	/home/runner/work/goldwarden/goldwarden/agent/notify/dbus.go:66 +0xf7 fp=0xc000065f88 sp=0xc000065ef8 pc=0x678ef7
github.com/quexten/goldwarden/agent.StartUnixAgent.func4()
	/home/runner/work/goldwarden/goldwarden/agent/unixsocketagent.go:396 +0x26 fp=0xc000065fe0 sp=0xc000065f88 pc=0x84f206
runtime.goexit()
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc000065fe8 sp=0xc000065fe0 pc=0x46ea61
created by github.com/quexten/goldwarden/agent.StartUnixAgent
	/home/runner/work/goldwarden/goldwarden/agent/unixsocketagent.go:395 +0x8ef

goroutine 9 [sleep]:
runtime.gopark(0xe2023e856?, 0x0?, 0x0?, 0x0?, 0x0?)
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/proc.go:381 +0xd6 fp=0xc000053f50 sp=0xc000053f30 pc=0x43ec36
time.Sleep(0x3b9aca00)
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/time.go:195 +0x135 fp=0xc000053f90 sp=0xc000053f50 pc=0x46b8d5
github.com/quexten/goldwarden/agent.StartUnixAgent.func5()
	/home/runner/work/goldwarden/goldwarden/agent/unixsocketagent.go:410 +0x5c fp=0xc000053fe0 sp=0xc000053f90 pc=0x84f17c
runtime.goexit()
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc000053fe8 sp=0xc000053fe0 pc=0x46ea61
created by github.com/quexten/goldwarden/agent.StartUnixAgent
	/home/runner/work/goldwarden/goldwarden/agent/unixsocketagent.go:402 +0x99f

goroutine 10 [IO wait]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/proc.go:381 +0xd6 fp=0xc000064b58 sp=0xc000064b38 pc=0x43ec36
runtime.netpollblock(0xc0000e8000?, 0x40a42f?, 0x0?)
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/netpoll.go:527 +0xf7 fp=0xc000064b90 sp=0xc000064b58 pc=0x4374d7
internal/poll.runtime_pollWait(0x7144807417c8, 0x72)
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/netpoll.go:306 +0x89 fp=0xc000064bb0 sp=0xc000064b90 pc=0x469029
internal/poll.(*pollDesc).wait(0xc0000b2a00?, 0xc00007a120?, 0x0)
	/opt/hostedtoolcache/go/1.20.14/x64/src/internal/poll/fd_poll_runtime.go:84 +0x32 fp=0xc000064bd8 sp=0xc000064bb0 pc=0x4a5372
internal/poll.(*pollDesc).waitRead(...)
	/opt/hostedtoolcache/go/1.20.14/x64/src/internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).Accept(0xc0000b2a00)
	/opt/hostedtoolcache/go/1.20.14/x64/src/internal/poll/fd_unix.go:614 +0x2bd fp=0xc000064c80 sp=0xc000064bd8 pc=0x4aac7d
net.(*netFD).accept(0xc0000b2a00)
	/opt/hostedtoolcache/go/1.20.14/x64/src/net/fd_unix.go:172 +0x35 fp=0xc000064d38 sp=0xc000064c80 pc=0x557755
net.(*UnixListener).accept(0x19?)
	/opt/hostedtoolcache/go/1.20.14/x64/src/net/unixsock_posix.go:172 +0x1c fp=0xc000064d60 sp=0xc000064d38 pc=0x5739dc
net.(*UnixListener).Accept(0xc000118240)
	/opt/hostedtoolcache/go/1.20.14/x64/src/net/unixsock.go:260 +0x3d fp=0xc000064d90 sp=0xc000064d60 pc=0x57233d
github.com/quexten/goldwarden/agent/ssh.SSHAgentServer.Serve({0xc00007c280?, 0xc000002180?, 0xc0000c0420?, 0xc00007ff20?})
	/home/runner/work/goldwarden/goldwarden/agent/ssh/sshsocketunix.go:30 +0x20b fp=0xc000064fb0 sp=0xc000064d90 pc=0x8433eb
github.com/quexten/goldwarden/agent.StartUnixAgent.func10()
	/home/runner/work/goldwarden/goldwarden/agent/unixsocketagent.go:462 +0x32 fp=0xc000064fe0 sp=0xc000064fb0 pc=0x84eaf2
runtime.goexit()
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc000064fe8 sp=0xc000064fe0 pc=0x46ea61
created by github.com/quexten/goldwarden/agent.StartUnixAgent
	/home/runner/work/goldwarden/goldwarden/agent/unixsocketagent.go:462 +0xb53

goroutine 11 [sleep]:
runtime.gopark(0xadc40646c?, 0x0?, 0x0?, 0x0?, 0x0?)
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/proc.go:381 +0xd6 fp=0xc00004cf60 sp=0xc00004cf40 pc=0x43ec36
time.Sleep(0x8bb2c97000)
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/time.go:195 +0x135 fp=0xc00004cfa0 sp=0xc00004cf60 pc=0x46b8d5
github.com/quexten/goldwarden/agent.StartUnixAgent.func7()
	/home/runner/work/goldwarden/goldwarden/agent/unixsocketagent.go:467 +0x3e fp=0xc00004cfe0 sp=0xc00004cfa0 pc=0x84ea7e
runtime.goexit()
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc00004cfe8 sp=0xc00004cfe0 pc=0x46ea61
created by github.com/quexten/goldwarden/agent.StartUnixAgent
	/home/runner/work/goldwarden/goldwarden/agent/unixsocketagent.go:465 +0xbcb

goroutine 12 [sleep]:
runtime.gopark(0xadc07e400?, 0x0?, 0x0?, 0x0?, 0x0?)
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/proc.go:381 +0xd6 fp=0xc00004d6a0 sp=0xc00004d680 pc=0x43ec36
time.Sleep(0x34630b8a000)
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/time.go:195 +0x135 fp=0xc00004d6e0 sp=0xc00004d6a0 pc=0x46b8d5
github.com/quexten/goldwarden/agent.StartUnixAgent.func8()
	/home/runner/work/goldwarden/goldwarden/agent/unixsocketagent.go:476 +0x59 fp=0xc00004d7e0 sp=0xc00004d6e0 pc=0x84e8b9
runtime.goexit()
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc00004d7e8 sp=0xc00004d7e0 pc=0x46ea61
created by github.com/quexten/goldwarden/agent.StartUnixAgent
	/home/runner/work/goldwarden/goldwarden/agent/unixsocketagent.go:474 +0xc5e

goroutine 13 [chan receive]:
runtime.gopark(0xc000052728?, 0x472505?, 0x28?, 0x27?, 0x53e606?)
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/proc.go:381 +0xd6 fp=0xc000052700 sp=0xc0000526e0 pc=0x43ec36
runtime.chanrecv(0xc0000346c0, 0x0, 0x1)
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/chan.go:583 +0x49d fp=0xc000052790 sp=0xc000052700 pc=0x40db5d
runtime.chanrecv1(0xc00007c410?, 0xc000002180?)
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/chan.go:442 +0x18 fp=0xc0000527b8 sp=0xc000052790 pc=0x40d658
github.com/godbus/dbus/v5.newConn.func1()
	/home/runner/go/pkg/mod/github.com/godbus/dbus/[email protected]/conn.go:303 +0x32 fp=0xc0000527e0 sp=0xc0000527b8 pc=0x653052
runtime.goexit()
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc0000527e8 sp=0xc0000527e0 pc=0x46ea61
created by github.com/godbus/dbus/v5.newConn
	/home/runner/go/pkg/mod/github.com/godbus/dbus/[email protected]/conn.go:302 +0x4f6

goroutine 14 [IO wait]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/proc.go:381 +0xd6 fp=0xc00005ed20 sp=0xc00005ed00 pc=0x43ec36
runtime.netpollblock(0x7144807c32c8?, 0x40a42f?, 0x0?)
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/netpoll.go:527 +0xf7 fp=0xc00005ed58 sp=0xc00005ed20 pc=0x4374d7
internal/poll.runtime_pollWait(0x7144807416d8, 0x72)
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/netpoll.go:306 +0x89 fp=0xc00005ed78 sp=0xc00005ed58 pc=0x469029
internal/poll.(*pollDesc).wait(0xc0000b2700?, 0x20?, 0x0)
	/opt/hostedtoolcache/go/1.20.14/x64/src/internal/poll/fd_poll_runtime.go:84 +0x32 fp=0xc00005eda0 sp=0xc00005ed78 pc=0x4a5372
internal/poll.(*pollDesc).waitRead(...)
	/opt/hostedtoolcache/go/1.20.14/x64/src/internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).Accept(0xc0000b2700)
	/opt/hostedtoolcache/go/1.20.14/x64/src/internal/poll/fd_unix.go:614 +0x2bd fp=0xc00005ee48 sp=0xc00005eda0 pc=0x4aac7d
net.(*netFD).accept(0xc0000b2700)
	/opt/hostedtoolcache/go/1.20.14/x64/src/net/fd_unix.go:172 +0x35 fp=0xc00005ef00 sp=0xc00005ee48 pc=0x557755
net.(*UnixListener).accept(0x4471e0?)
	/opt/hostedtoolcache/go/1.20.14/x64/src/net/unixsock_posix.go:172 +0x1c fp=0xc00005ef28 sp=0xc00005ef00 pc=0x5739dc
net.(*UnixListener).Accept(0xc000118270)
	/opt/hostedtoolcache/go/1.20.14/x64/src/net/unixsock.go:260 +0x3d fp=0xc00005ef58 sp=0xc00005ef28 pc=0x57233d
github.com/quexten/goldwarden/agent.StartUnixAgent.func9()
	/home/runner/work/goldwarden/goldwarden/agent/unixsocketagent.go:506 +0x55 fp=0xc00005efe0 sp=0xc00005ef58 pc=0x84e695
runtime.goexit()
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc00005efe8 sp=0xc00005efe0 pc=0x46ea61
created by github.com/quexten/goldwarden/agent.StartUnixAgent
	/home/runner/work/goldwarden/goldwarden/agent/unixsocketagent.go:504 +0xe3b

goroutine 15 [select, locked to thread]:
runtime.gopark(0xc00004dfa8?, 0x2?, 0xb2?, 0xef?, 0xc00004dfa4?)
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/proc.go:381 +0xd6 fp=0xc00004de18 sp=0xc00004ddf8 pc=0x43ec36
runtime.selectgo(0xc00004dfa8, 0xc00004dfa0, 0x0?, 0x0, 0x0?, 0x1)
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/select.go:327 +0x7be fp=0xc00004df58 sp=0xc00004de18 pc=0x44e8fe
runtime.ensureSigM.func1()
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/signal_unix.go:1004 +0x1b0 fp=0xc00004dfe0 sp=0xc00004df58 pc=0x466990
runtime.goexit()
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc00004dfe8 sp=0xc00004dfe0 pc=0x46ea61
created by runtime.ensureSigM
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/signal_unix.go:987 +0xbd

goroutine 16 [syscall]:
runtime.notetsleepg(0x0?, 0x0?)
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/lock_futex.go:236 +0x34 fp=0xc00004e7a0 sp=0xc00004e768 pc=0x4130f4
os/signal.signal_recv()
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/sigqueue.go:152 +0x2f fp=0xc00004e7c0 sp=0xc00004e7a0 pc=0x46b30f
os/signal.loop()
	/opt/hostedtoolcache/go/1.20.14/x64/src/os/signal/signal_unix.go:23 +0x19 fp=0xc00004e7e0 sp=0xc00004e7c0 pc=0x636039
runtime.goexit()
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc00004e7e8 sp=0xc00004e7e0 pc=0x46ea61
created by os/signal.Notify.func1.1
	/opt/hostedtoolcache/go/1.20.14/x64/src/os/signal/signal.go:151 +0x2a

goroutine 18 [IO wait]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/proc.go:381 +0xd6 fp=0xc0000a7a38 sp=0xc0000a7a18 pc=0x43ec36
runtime.netpollblock(0x0?, 0x40a42f?, 0x0?)
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/netpoll.go:527 +0xf7 fp=0xc0000a7a70 sp=0xc0000a7a38 pc=0x4374d7
internal/poll.runtime_pollWait(0x7144807418b8, 0x72)
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/netpoll.go:306 +0x89 fp=0xc0000a7a90 sp=0xc0000a7a70 pc=0x469029
internal/poll.(*pollDesc).wait(0xc0000b2800?, 0xc000134730?, 0x0)
	/opt/hostedtoolcache/go/1.20.14/x64/src/internal/poll/fd_poll_runtime.go:84 +0x32 fp=0xc0000a7ab8 sp=0xc0000a7a90 pc=0x4a5372
internal/poll.(*pollDesc).waitRead(...)
	/opt/hostedtoolcache/go/1.20.14/x64/src/internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).ReadMsg(0xc0000b2800, {0xc000134730, 0x10, 0x10}, {0xc000126020, 0x1000, 0x1000}, 0x80000c000055c00?)
	/opt/hostedtoolcache/go/1.20.14/x64/src/internal/poll/fd_unix.go:304 +0x3aa fp=0xc0000a7ba8 sp=0xc0000a7ab8 pc=0x4a7a6a
net.(*netFD).readMsg(0xc0000b2800, {0xc000134730?, 0x46c88e?, 0x43ece7?}, {0xc000126020?, 0x43ed20?, 0xc0000b8d00?}, 0x3?)
	/opt/hostedtoolcache/go/1.20.14/x64/src/net/fd_posix.go:78 +0x37 fp=0xc0000a7c30 sp=0xc0000a7ba8 pc=0x555a37
net.(*UnixConn).readMsg(0xc000014190, {0xc000134730?, 0x2?, 0x9ee5a0?}, {0xc000126020?, 0x0?, 0x2?})
	/opt/hostedtoolcache/go/1.20.14/x64/src/net/unixsock_posix.go:115 +0x4f fp=0xc0000a7cc0 sp=0xc0000a7c30 pc=0x57322f
net.(*UnixConn).ReadMsgUnix(0xc000014190, {0xc000134730?, 0x0?, 0x0?}, {0xc000126020?, 0x41460a?, 0xc000136468?})
	/opt/hostedtoolcache/go/1.20.14/x64/src/net/unixsock.go:143 +0x3c fp=0xc0000a7d38 sp=0xc0000a7cc0 pc=0x5714bc
github.com/godbus/dbus/v5.(*oobReader).Read(0xc000126000, {0xc000134730?, 0xc0000a7de8?, 0x4149e7?})
	/home/runner/go/pkg/mod/github.com/godbus/dbus/[email protected]/transport_unix.go:21 +0x45 fp=0xc0000a7db0 sp=0xc0000a7d38 pc=0x66bba5
io.ReadAtLeast({0x9eea60, 0xc000126000}, {0xc000134730, 0x10, 0x10}, 0x10)
	/opt/hostedtoolcache/go/1.20.14/x64/src/io/io.go:332 +0x9a fp=0xc0000a7df8 sp=0xc0000a7db0 pc=0x4a153a
io.ReadFull(...)
	/opt/hostedtoolcache/go/1.20.14/x64/src/io/io.go:351
github.com/godbus/dbus/v5.(*unixTransport).ReadMessage(0xc0000129a8)
	/home/runner/go/pkg/mod/github.com/godbus/dbus/[email protected]/transport_unix.go:91 +0x11e fp=0xc0000a7f58 sp=0xc0000a7df8 pc=0x66c1be
github.com/godbus/dbus/v5.(*Conn).inWorker(0xc00011a000)
	/home/runner/go/pkg/mod/github.com/godbus/dbus/[email protected]/conn.go:390 +0x48 fp=0xc0000a7fc8 sp=0xc0000a7f58 pc=0x653528
github.com/godbus/dbus/v5.(*Conn).Auth.func1()
	/home/runner/go/pkg/mod/github.com/godbus/dbus/[email protected]/auth.go:118 +0x26 fp=0xc0000a7fe0 sp=0xc0000a7fc8 pc=0x650186
runtime.goexit()
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc0000a7fe8 sp=0xc0000a7fe0 pc=0x46ea61
created by github.com/godbus/dbus/v5.(*Conn).Auth
	/home/runner/go/pkg/mod/github.com/godbus/dbus/[email protected]/auth.go:118 +0x99c

goroutine 24 [select]:
runtime.gopark(0xc0000a1e00?, 0x2?, 0xc0?, 0x2?, 0xc0000a1b7c?)
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/proc.go:381 +0xd6 fp=0xc0000a1990 sp=0xc0000a1970 pc=0x43ec36
runtime.selectgo(0xc0000a1e00, 0xc0000a1b78, 0xc0000a1d00?, 0x0, 0x1?, 0x1)
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/select.go:327 +0x7be fp=0xc0000a1ad0 sp=0xc0000a1990 pc=0x44e8fe
github.com/quexten/goldwarden/agent.serveAgentSession({0x9f4778, 0xc0000141d8}, 0xc00007c280?, 0xc000002180)
	/home/runner/work/goldwarden/goldwarden/agent/unixsocketagent.go:178 +0x971 fp=0xc0000a1fb0 sp=0xc0000a1ad0 pc=0x84c851
github.com/quexten/goldwarden/agent.StartUnixAgent.func9.1()
	/home/runner/work/goldwarden/goldwarden/agent/unixsocketagent.go:511 +0x32 fp=0xc0000a1fe0 sp=0xc0000a1fb0 pc=0x84e7d2
runtime.goexit()
	/opt/hostedtoolcache/go/1.20.14/x64/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc0000a1fe8 sp=0xc0000a1fe0 pc=0x46ea61
created by github.com/quexten/goldwarden/agent.StartUnixAgent.func9
	/home/runner/work/goldwarden/goldwarden/agent/unixsocketagent.go:511 +0x45
Traceback (most recent call last):
  File "/app/bin/src/gui/settings.py", line 176, in update_labels
quitting goldwarden daemon
    status = goldwarden.get_vault_status()
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/bin/src/services/goldwarden.py", line 114, in get_vault_status
    result = send_authenticated_command(f"vault status")
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/bin/src/services/goldwarden.py", line 56, in send_authenticated_command
    authenticated_connection.stdin.flush()
BrokenPipeError: [Errno 32] Relais brisé (pipe)
@quexten
Copy link
Owner

quexten commented Apr 10, 2024

Ah, thanks for the issue report. So right now, to encrypt your credentials, we use argon2 to derive the encryption key from the pin, with a memory setting of 2GB. The reasoning for this is that a pin is usually comparatively low entropy, so the argon2 settings should be higher rather than lower. Since this is static, it's not easily changeable for now, but I guess we can detect the system memory, and then save a local configuration for the argon2 parameters that doesn't require adjusting memory.

@quexten quexten changed the title Very high memory usage when setting a PIN Static Argon2 parameters cause out-of-memory in low-memory (~2GB ram) environments Apr 10, 2024
@quexten quexten added bug Something isn't working enhancement New feature or request labels Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants