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

Tests fail on 32bit architectures. #244

Closed
mdosch opened this issue Nov 9, 2024 · 1 comment · Fixed by #245
Closed

Tests fail on 32bit architectures. #244

mdosch opened this issue Nov 9, 2024 · 1 comment · Fixed by #245

Comments

@mdosch
Copy link
Contributor

mdosch commented Nov 9, 2024

Version: 1.1.2

Dear ProtonMail devs,
running the tests on my amd64 Laptop with 16GB RAM I get the following out of memory failure:

GOARCH=386 go test ./...
?   	github.com/ProtonMail/go-crypto/bitcurves	[no test files]
?   	github.com/ProtonMail/go-crypto/internal/byteutil	[no test files]
ok  	github.com/ProtonMail/go-crypto/brainpool	0.478s
ok  	github.com/ProtonMail/go-crypto/eax	0.010s
ok  	github.com/ProtonMail/go-crypto/ocb	0.022s
?   	github.com/ProtonMail/go-crypto/openpgp/errors	[no test files]
?   	github.com/ProtonMail/go-crypto/openpgp/internal/algorithm	[no test files]
runtime: out of memory: cannot allocate 2147483648-byte block (2289303552 in use)
fatal error: out of memory

goroutine 435 gp=0xa482368 m=4 mp=0xa480008 [running]:
runtime.throw({0x82f826b, 0xd})
	/usr/lib/go-1.23/src/runtime/panic.go:1067 +0x35 fp=0xbb22b70 sp=0xbb22b5c pc=0x80bc2b5
runtime.(*mcache).allocLarge(0xf7f7ee98, 0x80000000, 0x1)
	/usr/lib/go-1.23/src/runtime/mcache.go:236 +0x1c7 fp=0xbb22b9c sp=0xbb22b70 pc=0x8058e07
runtime.mallocgc(0x80000000, 0x82c8800, 0x1)
	/usr/lib/go-1.23/src/runtime/malloc.go:1177 +0x647 fp=0xbb22c14 sp=0xbb22b9c pc=0x80b82d7
runtime.makeslice(0x82c8800, 0x200000, 0x200000)
	/usr/lib/go-1.23/src/runtime/slice.go:116 +0x4a fp=0xbb22c28 sp=0xbb22c14 pc=0x80bde8a
golang.org/x/crypto/argon2.initBlocks(0x11d17310, 0x200000, 0x4)
	/home/martin/build/go/pkg/mod/golang.org/x/[email protected]/argon2/argon2.go:158 +0x49 fp=0xbb22c64 sp=0xbb22c28 pc=0x8243ad9
golang.org/x/crypto/argon2.deriveKey(0x2, {0x10509d78, 0x8, 0x8}, {0x105129aa, 0x10, 0x10}, {0x0, 0x0, 0x0}, ...)
	/home/martin/build/go/pkg/mod/golang.org/x/[email protected]/argon2/argon2.go:113 +0x181 fp=0xbb22d0c sp=0xbb22c64 pc=0x8243721
golang.org/x/crypto/argon2.IDKey(...)
	/home/martin/build/go/pkg/mod/golang.org/x/[email protected]/argon2/argon2.go:97
github.com/ProtonMail/go-crypto/openpgp/s2k.Argon2({0x10509dc0, 0x10, 0x10}, {0x10509d78, 0x8, 0x8}, {0x105129aa, 0x10, 0x10}, 0x1, ...)
	/home/martin/build/go-crypto/openpgp/s2k/s2k.go:178 +0xb9 fp=0xbb22d60 sp=0xbb22d0c pc=0x82463e9
github.com/ProtonMail/go-crypto/openpgp/s2k.(*Params).Function.func4({0x10509dc0, 0x10, 0x10}, {0x10509d78, 0x8, 0x8})
	/home/martin/build/go-crypto/openpgp/s2k/s2k.go:359 +0xa5 fp=0xbb22d8c sp=0xbb22d60 pc=0x8247005
github.com/ProtonMail/go-crypto/openpgp/packet.(*SymmetricKeyEncrypted).Decrypt(0xb67cba0, {0x10509d78, 0x8, 0x8})
	/home/martin/build/go-crypto/openpgp/packet/symmetric_key_encrypted.go:124 +0xb1 fp=0xbb22dc0 sp=0xbb22d8c pc=0x82719e1
github.com/ProtonMail/go-crypto/openpgp.ReadMessage({0x836e7b0, 0xaa09d28}, {0x0, 0x0}, 0xbb22f68, 0x0)
	/home/martin/build/go-crypto/openpgp/read.go:214 +0xcfb fp=0xbb22f24 sp=0xbb22dc0 pc=0x828556b
github.com/ProtonMail/go-crypto/openpgp.TestSymmetricDecryptionArgon2(0xbb1b008)
	/home/martin/build/go-crypto/openpgp/read_test.go:660 +0x26b fp=0xbb22f84 sp=0xbb22f24 pc=0x82a169b
testing.tRunner(0xbb1b008, 0x8321934)
	/usr/lib/go-1.23/src/testing/testing.go:1690 +0x119 fp=0xbb22fe4 sp=0xbb22f84 pc=0x8131229
testing.(*T).Run.gowrap1()
	/usr/lib/go-1.23/src/testing/testing.go:1743 +0x2e fp=0xbb22ff0 sp=0xbb22fe4 pc=0x813224e
runtime.goexit({})
	/usr/lib/go-1.23/src/runtime/asm_386.s:1393 +0x1 fp=0xbb22ff4 sp=0xbb22ff0 pc=0x80c2731
created by testing.(*T).Run in goroutine 1
	/usr/lib/go-1.23/src/testing/testing.go:1743 +0x3d1

goroutine 1 gp=0xa406128 m=nil [chan receive]:
runtime.gopark(0x8321a44, 0x1071caf4, 0xe, 0x7, 0x2)
	/usr/lib/go-1.23/src/runtime/proc.go:424 +0x10c fp=0xa4a4c54 sp=0xa4a4c40 pc=0x80bc3fc
runtime.chanrecv(0x1071cac0, 0xa4a4cc7, 0x1)
	/usr/lib/go-1.23/src/runtime/chan.go:639 +0x3c9 fp=0xa4a4c90 sp=0xa4a4c54 pc=0x804dec9
runtime.chanrecv1(0x1071cac0, 0xa4a4cc7)
	/usr/lib/go-1.23/src/runtime/chan.go:489 +0x1c fp=0xa4a4ca4 sp=0xa4a4c90 pc=0x804dafc
testing.(*T).Run(0xa4f0008, {0x82fec2c, 0x1d}, 0x8321934)
	/usr/lib/go-1.23/src/testing/testing.go:1751 +0x3f0 fp=0xa4a4d1c sp=0xa4a4ca4 pc=0x8132100
testing.runTests.func1(0xa4f0008)
	/usr/lib/go-1.23/src/testing/testing.go:2168 +0x45 fp=0xa4a4d3c sp=0xa4a4d1c pc=0x81341c5
testing.tRunner(0xa4f0008, 0xa4a4df4)
	/usr/lib/go-1.23/src/testing/testing.go:1690 +0x119 fp=0xa4a4d9c sp=0xa4a4d3c pc=0x8131229
testing.runTests(0xa4a8770, {0x84d7ec0, 0x65, 0x65}, {0xc1c3e9d415ee27eb, 0x8bb2d46072, 0x84d92e0})
	/usr/lib/go-1.23/src/testing/testing.go:2166 +0x37f fp=0xa4a4e08 sp=0xa4a4d9c pc=0x81340df
testing.(*M).Run(0xa4b6050)
	/usr/lib/go-1.23/src/testing/testing.go:2034 +0x63a fp=0xa4a4f54 sp=0xa4a4e08 pc=0x8132afa
main.main()
	_testmain.go:245 +0xe5 fp=0xa4a4fac sp=0xa4a4f54 pc=0x82aaa15
runtime.main()
	/usr/lib/go-1.23/src/runtime/proc.go:272 +0x2a6 fp=0xa4a4ff0 sp=0xa4a4fac pc=0x8084076
runtime.goexit({})
	/usr/lib/go-1.23/src/runtime/asm_386.s:1393 +0x1 fp=0xa4a4ff4 sp=0xa4a4ff0 pc=0x80c2731

goroutine 2 gp=0xa406488 m=nil [force gc (idle), 2 minutes]:
runtime.gopark(0x8321bac, 0x84d9010, 0x11, 0xa, 0x1)
	/usr/lib/go-1.23/src/runtime/proc.go:424 +0x10c fp=0xa442fdc sp=0xa442fc8 pc=0x80bc3fc
runtime.goparkunlock(...)
	/usr/lib/go-1.23/src/runtime/proc.go:430
runtime.forcegchelper()
	/usr/lib/go-1.23/src/runtime/proc.go:337 +0xd3 fp=0xa442ff0 sp=0xa442fdc pc=0x80843e3
runtime.goexit({})
	/usr/lib/go-1.23/src/runtime/asm_386.s:1393 +0x1 fp=0xa442ff4 sp=0xa442ff0 pc=0x80c2731
created by runtime.init.6 in goroutine 1
	/usr/lib/go-1.23/src/runtime/proc.go:325 +0x23

goroutine 3 gp=0xa4067e8 m=nil [GC sweep wait]:
runtime.gopark(0x8321bac, 0x84d91a0, 0xc, 0x9, 0x1)
	/usr/lib/go-1.23/src/runtime/proc.go:424 +0x10c fp=0xa4437cc sp=0xa4437b8 pc=0x80bc3fc
runtime.goparkunlock(...)
	/usr/lib/go-1.23/src/runtime/proc.go:430
runtime.bgsweep(0xa41c080)
	/usr/lib/go-1.23/src/runtime/mgcsweep.go:317 +0xf8 fp=0xa4437e8 sp=0xa4437cc pc=0x806c718
runtime.gcenable.gowrap1()
	/usr/lib/go-1.23/src/runtime/mgc.go:203 +0x27 fp=0xa4437f0 sp=0xa4437e8 pc=0x805d277
runtime.goexit({})
	/usr/lib/go-1.23/src/runtime/asm_386.s:1393 +0x1 fp=0xa4437f4 sp=0xa4437f0 pc=0x80c2731
created by runtime.gcenable in goroutine 1
	/usr/lib/go-1.23/src/runtime/mgc.go:203 +0x77

goroutine 4 gp=0xa406908 m=nil [GC scavenge wait]:
runtime.gopark(0x8321bac, 0x84d9400, 0xd, 0xa, 0x2)
	/usr/lib/go-1.23/src/runtime/proc.go:424 +0x10c fp=0xa443fb8 sp=0xa443fa4 pc=0x80bc3fc
runtime.goparkunlock(...)
	/usr/lib/go-1.23/src/runtime/proc.go:430
runtime.(*scavengerState).park(0x84d9400)
	/usr/lib/go-1.23/src/runtime/mgcscavenge.go:425 +0x60 fp=0xa443fcc sp=0xa443fb8 pc=0x80696d0
runtime.bgscavenge(0xa41c080)
	/usr/lib/go-1.23/src/runtime/mgcscavenge.go:658 +0x6f fp=0xa443fe8 sp=0xa443fcc pc=0x8069ecf
runtime.gcenable.gowrap2()
	/usr/lib/go-1.23/src/runtime/mgc.go:204 +0x27 fp=0xa443ff0 sp=0xa443fe8 pc=0x805d237
runtime.goexit({})
	/usr/lib/go-1.23/src/runtime/asm_386.s:1393 +0x1 fp=0xa443ff4 sp=0xa443ff0 pc=0x80c2731
created by runtime.gcenable in goroutine 1
	/usr/lib/go-1.23/src/runtime/mgc.go:204 +0xb7

goroutine 17 gp=0xa482248 m=nil [finalizer wait, 2 minutes]:
runtime.gopark(0x8321a60, 0x84e6278, 0x10, 0xa, 0x1)
	/usr/lib/go-1.23/src/runtime/proc.go:424 +0x10c fp=0xa442798 sp=0xa442784 pc=0x80bc3fc
runtime.runfinq()
	/usr/lib/go-1.23/src/runtime/mfinal.go:193 +0xfc fp=0xa4427f0 sp=0xa442798 pc=0x805c37c
runtime.goexit({})
	/usr/lib/go-1.23/src/runtime/asm_386.s:1393 +0x1 fp=0xa4427f4 sp=0xa4427f0 pc=0x80c2731
created by runtime.createfing in goroutine 1
	/usr/lib/go-1.23/src/runtime/mfinal.go:163 +0x60

goroutine 22 gp=0xa4826c8 m=nil [GC worker (idle), 2 minutes]:
runtime.gopark(0x8321a70, 0xa4d4828, 0x1a, 0xa, 0x0)
	/usr/lib/go-1.23/src/runtime/proc.go:424 +0x10c fp=0xa43e78c sp=0xa43e778 pc=0x80bc3fc
runtime.gcBgMarkWorker(0xa497200)
	/usr/lib/go-1.23/src/runtime/mgc.go:1363 +0xfd fp=0xa43e7e8 sp=0xa43e78c pc=0x805fd4d
runtime.gcBgMarkStartWorkers.gowrap1()
	/usr/lib/go-1.23/src/runtime/mgc.go:1279 +0x27 fp=0xa43e7f0 sp=0xa43e7e8 pc=0x805fc37
runtime.goexit({})
	/usr/lib/go-1.23/src/runtime/asm_386.s:1393 +0x1 fp=0xa43e7f4 sp=0xa43e7f0 pc=0x80c2731
created by runtime.gcBgMarkStartWorkers in goroutine 21
	/usr/lib/go-1.23/src/runtime/mgc.go:1279 +0x12c

goroutine 23 gp=0xa4827e8 m=nil [GC worker (idle), 2 minutes]:
runtime.gopark(0x8321a70, 0xa4d4840, 0x1a, 0xa, 0x0)
	/usr/lib/go-1.23/src/runtime/proc.go:424 +0x10c fp=0xa43ef8c sp=0xa43ef78 pc=0x80bc3fc
runtime.gcBgMarkWorker(0xa497200)
	/usr/lib/go-1.23/src/runtime/mgc.go:1363 +0xfd fp=0xa43efe8 sp=0xa43ef8c pc=0x805fd4d
runtime.gcBgMarkStartWorkers.gowrap1()
	/usr/lib/go-1.23/src/runtime/mgc.go:1279 +0x27 fp=0xa43eff0 sp=0xa43efe8 pc=0x805fc37
runtime.goexit({})
	/usr/lib/go-1.23/src/runtime/asm_386.s:1393 +0x1 fp=0xa43eff4 sp=0xa43eff0 pc=0x80c2731
created by runtime.gcBgMarkStartWorkers in goroutine 21
	/usr/lib/go-1.23/src/runtime/mgc.go:1279 +0x12c

goroutine 24 gp=0xa482908 m=nil [GC worker (idle)]:
runtime.gopark(0x8321a70, 0xa4d4858, 0x1a, 0xa, 0x0)
	/usr/lib/go-1.23/src/runtime/proc.go:424 +0x10c fp=0xa43f78c sp=0xa43f778 pc=0x80bc3fc
runtime.gcBgMarkWorker(0xa497200)
	/usr/lib/go-1.23/src/runtime/mgc.go:1363 +0xfd fp=0xa43f7e8 sp=0xa43f78c pc=0x805fd4d
runtime.gcBgMarkStartWorkers.gowrap1()
	/usr/lib/go-1.23/src/runtime/mgc.go:1279 +0x27 fp=0xa43f7f0 sp=0xa43f7e8 pc=0x805fc37
runtime.goexit({})
	/usr/lib/go-1.23/src/runtime/asm_386.s:1393 +0x1 fp=0xa43f7f4 sp=0xa43f7f0 pc=0x80c2731
created by runtime.gcBgMarkStartWorkers in goroutine 21
	/usr/lib/go-1.23/src/runtime/mgc.go:1279 +0x12c

goroutine 25 gp=0xa482a28 m=nil [GC worker (idle)]:
runtime.gopark(0x8321a70, 0xa4d4870, 0x1a, 0xa, 0x0)
	/usr/lib/go-1.23/src/runtime/proc.go:424 +0x10c fp=0xa43ff8c sp=0xa43ff78 pc=0x80bc3fc
runtime.gcBgMarkWorker(0xa497200)
	/usr/lib/go-1.23/src/runtime/mgc.go:1363 +0xfd fp=0xa43ffe8 sp=0xa43ff8c pc=0x805fd4d
runtime.gcBgMarkStartWorkers.gowrap1()
	/usr/lib/go-1.23/src/runtime/mgc.go:1279 +0x27 fp=0xa43fff0 sp=0xa43ffe8 pc=0x805fc37
runtime.goexit({})
	/usr/lib/go-1.23/src/runtime/asm_386.s:1393 +0x1 fp=0xa43fff4 sp=0xa43fff0 pc=0x80c2731
created by runtime.gcBgMarkStartWorkers in goroutine 21
	/usr/lib/go-1.23/src/runtime/mgc.go:1279 +0x12c

goroutine 26 gp=0xa482b48 m=nil [GC worker (idle)]:
runtime.gopark(0x8321a70, 0xa4d4888, 0x1a, 0xa, 0x0)
	/usr/lib/go-1.23/src/runtime/proc.go:424 +0x10c fp=0xa44078c sp=0xa440778 pc=0x80bc3fc
runtime.gcBgMarkWorker(0xa497200)
	/usr/lib/go-1.23/src/runtime/mgc.go:1363 +0xfd fp=0xa4407e8 sp=0xa44078c pc=0x805fd4d
runtime.gcBgMarkStartWorkers.gowrap1()
	/usr/lib/go-1.23/src/runtime/mgc.go:1279 +0x27 fp=0xa4407f0 sp=0xa4407e8 pc=0x805fc37
runtime.goexit({})
	/usr/lib/go-1.23/src/runtime/asm_386.s:1393 +0x1 fp=0xa4407f4 sp=0xa4407f0 pc=0x80c2731
created by runtime.gcBgMarkStartWorkers in goroutine 21
	/usr/lib/go-1.23/src/runtime/mgc.go:1279 +0x12c

goroutine 27 gp=0xa482c68 m=nil [GC worker (idle)]:
runtime.gopark(0x8321a70, 0xa4d48a0, 0x1a, 0xa, 0x0)
	/usr/lib/go-1.23/src/runtime/proc.go:424 +0x10c fp=0xa440f8c sp=0xa440f78 pc=0x80bc3fc
runtime.gcBgMarkWorker(0xa497200)
	/usr/lib/go-1.23/src/runtime/mgc.go:1363 +0xfd fp=0xa440fe8 sp=0xa440f8c pc=0x805fd4d
runtime.gcBgMarkStartWorkers.gowrap1()
	/usr/lib/go-1.23/src/runtime/mgc.go:1279 +0x27 fp=0xa440ff0 sp=0xa440fe8 pc=0x805fc37
runtime.goexit({})
	/usr/lib/go-1.23/src/runtime/asm_386.s:1393 +0x1 fp=0xa440ff4 sp=0xa440ff0 pc=0x80c2731
created by runtime.gcBgMarkStartWorkers in goroutine 21
	/usr/lib/go-1.23/src/runtime/mgc.go:1279 +0x12c

goroutine 28 gp=0xa482d88 m=nil [GC worker (idle), 1 minutes]:
runtime.gopark(0x8321a70, 0xa4d48b8, 0x1a, 0xa, 0x0)
	/usr/lib/go-1.23/src/runtime/proc.go:424 +0x10c fp=0xa44178c sp=0xa441778 pc=0x80bc3fc
runtime.gcBgMarkWorker(0xa497200)
	/usr/lib/go-1.23/src/runtime/mgc.go:1363 +0xfd fp=0xa4417e8 sp=0xa44178c pc=0x805fd4d
runtime.gcBgMarkStartWorkers.gowrap1()
	/usr/lib/go-1.23/src/runtime/mgc.go:1279 +0x27 fp=0xa4417f0 sp=0xa4417e8 pc=0x805fc37
runtime.goexit({})
	/usr/lib/go-1.23/src/runtime/asm_386.s:1393 +0x1 fp=0xa4417f4 sp=0xa4417f0 pc=0x80c2731
created by runtime.gcBgMarkStartWorkers in goroutine 21
	/usr/lib/go-1.23/src/runtime/mgc.go:1279 +0x12c

goroutine 29 gp=0xa482ea8 m=nil [GC worker (idle)]:
runtime.gopark(0x8321a70, 0xa4d48d0, 0x1a, 0xa, 0x0)
	/usr/lib/go-1.23/src/runtime/proc.go:424 +0x10c fp=0xa441f8c sp=0xa441f78 pc=0x80bc3fc
runtime.gcBgMarkWorker(0xa497200)
	/usr/lib/go-1.23/src/runtime/mgc.go:1363 +0xfd fp=0xa441fe8 sp=0xa441f8c pc=0x805fd4d
runtime.gcBgMarkStartWorkers.gowrap1()
	/usr/lib/go-1.23/src/runtime/mgc.go:1279 +0x27 fp=0xa441ff0 sp=0xa441fe8 pc=0x805fc37
runtime.goexit({})
	/usr/lib/go-1.23/src/runtime/asm_386.s:1393 +0x1 fp=0xa441ff4 sp=0xa441ff0 pc=0x80c2731
created by runtime.gcBgMarkStartWorkers in goroutine 21
	/usr/lib/go-1.23/src/runtime/mgc.go:1279 +0x12c
FAIL	github.com/ProtonMail/go-crypto/openpgp	157.389s
ok  	github.com/ProtonMail/go-crypto/openpgp/aes/keywrap	0.005s
ok  	github.com/ProtonMail/go-crypto/openpgp/armor	0.004s
ok  	github.com/ProtonMail/go-crypto/openpgp/clearsign	65.601s
ok  	github.com/ProtonMail/go-crypto/openpgp/ecdh	0.808s
ok  	github.com/ProtonMail/go-crypto/openpgp/ecdsa	0.706s
ok  	github.com/ProtonMail/go-crypto/openpgp/ed25519	0.011s
ok  	github.com/ProtonMail/go-crypto/openpgp/ed448	0.034s
ok  	github.com/ProtonMail/go-crypto/openpgp/eddsa	0.027s
ok  	github.com/ProtonMail/go-crypto/openpgp/elgamal	0.013s
ok  	github.com/ProtonMail/go-crypto/openpgp/integration_tests	229.496s
ok  	github.com/ProtonMail/go-crypto/openpgp/integration_tests/v2	240.510s
ok  	github.com/ProtonMail/go-crypto/openpgp/internal/ecc	0.006s
ok  	github.com/ProtonMail/go-crypto/openpgp/internal/encoding	0.003s
ok  	github.com/ProtonMail/go-crypto/openpgp/packet	33.374s
ok  	github.com/ProtonMail/go-crypto/openpgp/s2k	38.649s
runtime: out of memory: cannot allocate 2147483648-byte block (2289303552 in use)
fatal error: out of memory

goroutine 435 gp=0x8c82908 m=2 mp=0x8c46508 [running]:
runtime.throw({0x830685d, 0xd})
	/usr/lib/go-1.23/src/runtime/panic.go:1067 +0x35 fp=0xaeaeb40 sp=0xaeaeb2c pc=0x80bc4a5
runtime.(*mcache).allocLarge(0xf7fa8e98, 0x80000000, 0x1)
	/usr/lib/go-1.23/src/runtime/mcache.go:236 +0x1c7 fp=0xaeaeb6c sp=0xaeaeb40 pc=0x8058ff7
runtime.mallocgc(0x80000000, 0x82d62c0, 0x1)
	/usr/lib/go-1.23/src/runtime/malloc.go:1177 +0x647 fp=0xaeaebe4 sp=0xaeaeb6c pc=0x80b84c7
runtime.makeslice(0x82d62c0, 0x200000, 0x200000)
	/usr/lib/go-1.23/src/runtime/slice.go:116 +0x4a fp=0xaeaebf8 sp=0xaeaebe4 pc=0x80be07a
golang.org/x/crypto/argon2.initBlocks(0xcf337c0, 0x200000, 0x4)
	/home/martin/build/go/pkg/mod/golang.org/x/[email protected]/argon2/argon2.go:158 +0x49 fp=0xaeaec34 sp=0xaeaebf8 pc=0x8243f09
golang.org/x/crypto/argon2.deriveKey(0x2, {0xcf75180, 0x8, 0x8}, {0xcf27dba, 0x10, 0x10}, {0x0, 0x0, 0x0}, ...)
	/home/martin/build/go/pkg/mod/golang.org/x/[email protected]/argon2/argon2.go:113 +0x181 fp=0xaeaecdc sp=0xaeaec34 pc=0x8243b51
golang.org/x/crypto/argon2.IDKey(...)
	/home/martin/build/go/pkg/mod/golang.org/x/[email protected]/argon2/argon2.go:97
github.com/ProtonMail/go-crypto/openpgp/s2k.Argon2({0xcf751d0, 0x10, 0x10}, {0xcf75180, 0x8, 0x8}, {0xcf27dba, 0x10, 0x10}, 0x1, ...)
	/home/martin/build/go-crypto/openpgp/s2k/s2k.go:178 +0xb9 fp=0xaeaed30 sp=0xaeaecdc pc=0x8246819
github.com/ProtonMail/go-crypto/openpgp/s2k.(*Params).Function.func4({0xcf751d0, 0x10, 0x10}, {0xcf75180, 0x8, 0x8})
	/home/martin/build/go-crypto/openpgp/s2k/s2k.go:359 +0xa5 fp=0xaeaed5c sp=0xaeaed30 pc=0x8247435
github.com/ProtonMail/go-crypto/openpgp/packet.(*SymmetricKeyEncrypted).Decrypt(0xdd2c6f0, {0xcf75180, 0x8, 0x8})
	/home/martin/build/go-crypto/openpgp/packet/symmetric_key_encrypted.go:124 +0xb1 fp=0xaeaed90 sp=0xaeaed5c pc=0x82738f1
github.com/ProtonMail/go-crypto/openpgp/v2.ReadMessage({0x8384320, 0x9101468}, {0x0, 0x0}, 0xaeaef68, 0x0)
	/home/martin/build/go-crypto/openpgp/v2/read.go:243 +0xf9f fp=0xaeaef24 sp=0xaeaed90 pc=0x8287aef
github.com/ProtonMail/go-crypto/openpgp/v2.TestSymmetricDecryptionArgon2(0xdd54208)
	/home/martin/build/go-crypto/openpgp/v2/read_test.go:691 +0x26b fp=0xaeaef84 sp=0xaeaef24 pc=0x82ab44b
testing.tRunner(0xdd54208, 0x8335870)
	/usr/lib/go-1.23/src/testing/testing.go:1690 +0x119 fp=0xaeaefe4 sp=0xaeaef84 pc=0x8131419
testing.(*T).Run.gowrap1()
	/usr/lib/go-1.23/src/testing/testing.go:1743 +0x2e fp=0xaeaeff0 sp=0xaeaefe4 pc=0x813243e
runtime.goexit({})
	/usr/lib/go-1.23/src/runtime/asm_386.s:1393 +0x1 fp=0xaeaeff4 sp=0xaeaeff0 pc=0x80c2921
created by testing.(*T).Run in goroutine 1
	/usr/lib/go-1.23/src/testing/testing.go:1743 +0x3d1

goroutine 1 gp=0x8c06128 m=nil [chan receive]:
runtime.gopark(0x833597c, 0xf17a7b4, 0xe, 0x7, 0x2)
	/usr/lib/go-1.23/src/runtime/proc.go:424 +0x10c fp=0x8ca4c54 sp=0x8ca4c40 pc=0x80bc5ec
runtime.chanrecv(0xf17a780, 0x8ca4cc7, 0x1)
	/usr/lib/go-1.23/src/runtime/chan.go:639 +0x3c9 fp=0x8ca4c90 sp=0x8ca4c54 pc=0x804dec9
runtime.chanrecv1(0xf17a780, 0x8ca4cc7)
	/usr/lib/go-1.23/src/runtime/chan.go:489 +0x1c fp=0x8ca4ca4 sp=0x8ca4c90 pc=0x804dafc
testing.(*T).Run(0x8cf0008, {0x830d45a, 0x1d}, 0x8335870)
	/usr/lib/go-1.23/src/testing/testing.go:1751 +0x3f0 fp=0x8ca4d1c sp=0x8ca4ca4 pc=0x81322f0
testing.runTests.func1(0x8cf0008)
	/usr/lib/go-1.23/src/testing/testing.go:2168 +0x45 fp=0x8ca4d3c sp=0x8ca4d1c pc=0x81343b5
testing.tRunner(0x8cf0008, 0x8ca4df4)
	/usr/lib/go-1.23/src/testing/testing.go:1690 +0x119 fp=0x8ca4d9c sp=0x8ca4d3c pc=0x8131419
testing.runTests(0x8ca8770, {0x84f3f80, 0x6d, 0x6d}, {0xc1c3e9d4b55dba33, 0x8bb2d46632, 0x84f5400})
	/usr/lib/go-1.23/src/testing/testing.go:2166 +0x37f fp=0x8ca4e08 sp=0x8ca4d9c pc=0x81342cf
testing.(*M).Run(0x8cb6050)
	/usr/lib/go-1.23/src/testing/testing.go:2034 +0x63a fp=0x8ca4f54 sp=0x8ca4e08 pc=0x8132cea
main.main()
	_testmain.go:261 +0xe5 fp=0x8ca4fac sp=0x8ca4f54 pc=0x82b70d5
runtime.main()
	/usr/lib/go-1.23/src/runtime/proc.go:272 +0x2a6 fp=0x8ca4ff0 sp=0x8ca4fac pc=0x8084266
runtime.goexit({})
	/usr/lib/go-1.23/src/runtime/asm_386.s:1393 +0x1 fp=0x8ca4ff4 sp=0x8ca4ff0 pc=0x80c2921

goroutine 2 gp=0x8c06488 m=nil [force gc (idle), 2 minutes]:
runtime.gopark(0x8335ae4, 0x84f5130, 0x11, 0xa, 0x1)
	/usr/lib/go-1.23/src/runtime/proc.go:424 +0x10c fp=0x8c42fdc sp=0x8c42fc8 pc=0x80bc5ec
runtime.goparkunlock(...)
	/usr/lib/go-1.23/src/runtime/proc.go:430
runtime.forcegchelper()
	/usr/lib/go-1.23/src/runtime/proc.go:337 +0xd3 fp=0x8c42ff0 sp=0x8c42fdc pc=0x80845d3
runtime.goexit({})
	/usr/lib/go-1.23/src/runtime/asm_386.s:1393 +0x1 fp=0x8c42ff4 sp=0x8c42ff0 pc=0x80c2921
created by runtime.init.6 in goroutine 1
	/usr/lib/go-1.23/src/runtime/proc.go:325 +0x23

goroutine 3 gp=0x8c067e8 m=nil [GC sweep wait]:
runtime.gopark(0x8335ae4, 0x84f52c0, 0xc, 0x9, 0x1)
	/usr/lib/go-1.23/src/runtime/proc.go:424 +0x10c fp=0x8c437cc sp=0x8c437b8 pc=0x80bc5ec
runtime.goparkunlock(...)
	/usr/lib/go-1.23/src/runtime/proc.go:430
runtime.bgsweep(0x8c1c080)
	/usr/lib/go-1.23/src/runtime/mgcsweep.go:317 +0xf8 fp=0x8c437e8 sp=0x8c437cc pc=0x806c908
runtime.gcenable.gowrap1()
	/usr/lib/go-1.23/src/runtime/mgc.go:203 +0x27 fp=0x8c437f0 sp=0x8c437e8 pc=0x805d467
runtime.goexit({})
	/usr/lib/go-1.23/src/runtime/asm_386.s:1393 +0x1 fp=0x8c437f4 sp=0x8c437f0 pc=0x80c2921
created by runtime.gcenable in goroutine 1
	/usr/lib/go-1.23/src/runtime/mgc.go:203 +0x77

goroutine 4 gp=0x8c06908 m=nil [GC scavenge wait]:
runtime.gopark(0x8335ae4, 0x84f5520, 0xd, 0xa, 0x2)
	/usr/lib/go-1.23/src/runtime/proc.go:424 +0x10c fp=0x8c43fb8 sp=0x8c43fa4 pc=0x80bc5ec
runtime.goparkunlock(...)
	/usr/lib/go-1.23/src/runtime/proc.go:430
runtime.(*scavengerState).park(0x84f5520)
	/usr/lib/go-1.23/src/runtime/mgcscavenge.go:425 +0x60 fp=0x8c43fcc sp=0x8c43fb8 pc=0x80698c0
runtime.bgscavenge(0x8c1c080)
	/usr/lib/go-1.23/src/runtime/mgcscavenge.go:658 +0x6f fp=0x8c43fe8 sp=0x8c43fcc pc=0x806a0bf
runtime.gcenable.gowrap2()
	/usr/lib/go-1.23/src/runtime/mgc.go:204 +0x27 fp=0x8c43ff0 sp=0x8c43fe8 pc=0x805d427
runtime.goexit({})
	/usr/lib/go-1.23/src/runtime/asm_386.s:1393 +0x1 fp=0x8c43ff4 sp=0x8c43ff0 pc=0x80c2921
created by runtime.gcenable in goroutine 1
	/usr/lib/go-1.23/src/runtime/mgc.go:204 +0xb7

goroutine 17 gp=0x8c82248 m=nil [finalizer wait, 2 minutes]:
runtime.gopark(0x8335998, 0x8502398, 0x10, 0xa, 0x1)
	/usr/lib/go-1.23/src/runtime/proc.go:424 +0x10c fp=0x8c42798 sp=0x8c42784 pc=0x80bc5ec
runtime.runfinq()
	/usr/lib/go-1.23/src/runtime/mfinal.go:193 +0xfc fp=0x8c427f0 sp=0x8c42798 pc=0x805c56c
runtime.goexit({})
	/usr/lib/go-1.23/src/runtime/asm_386.s:1393 +0x1 fp=0x8c427f4 sp=0x8c427f0 pc=0x80c2921
created by runtime.createfing in goroutine 1
	/usr/lib/go-1.23/src/runtime/mfinal.go:163 +0x60

goroutine 33 gp=0x8eee128 m=nil [GC worker (idle), 2 minutes]:
runtime.gopark(0x83359a8, 0x8ed00d8, 0x1a, 0xa, 0x0)
	/usr/lib/go-1.23/src/runtime/proc.go:424 +0x10c fp=0x908e78c sp=0x908e778 pc=0x80bc5ec
runtime.gcBgMarkWorker(0x8eda0c0)
	/usr/lib/go-1.23/src/runtime/mgc.go:1363 +0xfd fp=0x908e7e8 sp=0x908e78c pc=0x805ff3d
runtime.gcBgMarkStartWorkers.gowrap1()
	/usr/lib/go-1.23/src/runtime/mgc.go:1279 +0x27 fp=0x908e7f0 sp=0x908e7e8 pc=0x805fe27
runtime.goexit({})
	/usr/lib/go-1.23/src/runtime/asm_386.s:1393 +0x1 fp=0x908e7f4 sp=0x908e7f0 pc=0x80c2921
created by runtime.gcBgMarkStartWorkers in goroutine 21
	/usr/lib/go-1.23/src/runtime/mgc.go:1279 +0x12c

goroutine 34 gp=0x8eee248 m=nil [GC worker (idle), 2 minutes]:
runtime.gopark(0x83359a8, 0x8ed00f0, 0x1a, 0xa, 0x0)
	/usr/lib/go-1.23/src/runtime/proc.go:424 +0x10c fp=0x908ef8c sp=0x908ef78 pc=0x80bc5ec
runtime.gcBgMarkWorker(0x8eda0c0)
	/usr/lib/go-1.23/src/runtime/mgc.go:1363 +0xfd fp=0x908efe8 sp=0x908ef8c pc=0x805ff3d
runtime.gcBgMarkStartWorkers.gowrap1()
	/usr/lib/go-1.23/src/runtime/mgc.go:1279 +0x27 fp=0x908eff0 sp=0x908efe8 pc=0x805fe27
runtime.goexit({})
	/usr/lib/go-1.23/src/runtime/asm_386.s:1393 +0x1 fp=0x908eff4 sp=0x908eff0 pc=0x80c2921
created by runtime.gcBgMarkStartWorkers in goroutine 21
	/usr/lib/go-1.23/src/runtime/mgc.go:1279 +0x12c

goroutine 35 gp=0x8eee368 m=nil [GC worker (idle)]:
runtime.gopark(0x83359a8, 0x8ed0108, 0x1a, 0xa, 0x0)
	/usr/lib/go-1.23/src/runtime/proc.go:424 +0x10c fp=0x908f78c sp=0x908f778 pc=0x80bc5ec
runtime.gcBgMarkWorker(0x8eda0c0)
	/usr/lib/go-1.23/src/runtime/mgc.go:1363 +0xfd fp=0x908f7e8 sp=0x908f78c pc=0x805ff3d
runtime.gcBgMarkStartWorkers.gowrap1()
	/usr/lib/go-1.23/src/runtime/mgc.go:1279 +0x27 fp=0x908f7f0 sp=0x908f7e8 pc=0x805fe27
runtime.goexit({})
	/usr/lib/go-1.23/src/runtime/asm_386.s:1393 +0x1 fp=0x908f7f4 sp=0x908f7f0 pc=0x80c2921
created by runtime.gcBgMarkStartWorkers in goroutine 21
	/usr/lib/go-1.23/src/runtime/mgc.go:1279 +0x12c

goroutine 36 gp=0x8eee488 m=nil [GC worker (idle)]:
runtime.gopark(0x83359a8, 0x8ed0120, 0x1a, 0xa, 0x0)
	/usr/lib/go-1.23/src/runtime/proc.go:424 +0x10c fp=0x908ff8c sp=0x908ff78 pc=0x80bc5ec
runtime.gcBgMarkWorker(0x8eda0c0)
	/usr/lib/go-1.23/src/runtime/mgc.go:1363 +0xfd fp=0x908ffe8 sp=0x908ff8c pc=0x805ff3d
runtime.gcBgMarkStartWorkers.gowrap1()
	/usr/lib/go-1.23/src/runtime/mgc.go:1279 +0x27 fp=0x908fff0 sp=0x908ffe8 pc=0x805fe27
runtime.goexit({})
	/usr/lib/go-1.23/src/runtime/asm_386.s:1393 +0x1 fp=0x908fff4 sp=0x908fff0 pc=0x80c2921
created by runtime.gcBgMarkStartWorkers in goroutine 21
	/usr/lib/go-1.23/src/runtime/mgc.go:1279 +0x12c

goroutine 37 gp=0x8eee5a8 m=nil [GC worker (idle)]:
runtime.gopark(0x83359a8, 0x8ed0138, 0x1a, 0xa, 0x0)
	/usr/lib/go-1.23/src/runtime/proc.go:424 +0x10c fp=0x909078c sp=0x9090778 pc=0x80bc5ec
runtime.gcBgMarkWorker(0x8eda0c0)
	/usr/lib/go-1.23/src/runtime/mgc.go:1363 +0xfd fp=0x90907e8 sp=0x909078c pc=0x805ff3d
runtime.gcBgMarkStartWorkers.gowrap1()
	/usr/lib/go-1.23/src/runtime/mgc.go:1279 +0x27 fp=0x90907f0 sp=0x90907e8 pc=0x805fe27
runtime.goexit({})
	/usr/lib/go-1.23/src/runtime/asm_386.s:1393 +0x1 fp=0x90907f4 sp=0x90907f0 pc=0x80c2921
created by runtime.gcBgMarkStartWorkers in goroutine 21
	/usr/lib/go-1.23/src/runtime/mgc.go:1279 +0x12c

goroutine 38 gp=0x8eee6c8 m=nil [GC worker (idle)]:
runtime.gopark(0x83359a8, 0x8ed0150, 0x1a, 0xa, 0x0)
	/usr/lib/go-1.23/src/runtime/proc.go:424 +0x10c fp=0x9090f8c sp=0x9090f78 pc=0x80bc5ec
runtime.gcBgMarkWorker(0x8eda0c0)
	/usr/lib/go-1.23/src/runtime/mgc.go:1363 +0xfd fp=0x9090fe8 sp=0x9090f8c pc=0x805ff3d
runtime.gcBgMarkStartWorkers.gowrap1()
	/usr/lib/go-1.23/src/runtime/mgc.go:1279 +0x27 fp=0x9090ff0 sp=0x9090fe8 pc=0x805fe27
runtime.goexit({})
	/usr/lib/go-1.23/src/runtime/asm_386.s:1393 +0x1 fp=0x9090ff4 sp=0x9090ff0 pc=0x80c2921
created by runtime.gcBgMarkStartWorkers in goroutine 21
	/usr/lib/go-1.23/src/runtime/mgc.go:1279 +0x12c

goroutine 39 gp=0x8eee7e8 m=nil [GC worker (idle)]:
runtime.gopark(0x83359a8, 0x8ed0168, 0x1a, 0xa, 0x0)
	/usr/lib/go-1.23/src/runtime/proc.go:424 +0x10c fp=0x909178c sp=0x9091778 pc=0x80bc5ec
runtime.gcBgMarkWorker(0x8eda0c0)
	/usr/lib/go-1.23/src/runtime/mgc.go:1363 +0xfd fp=0x90917e8 sp=0x909178c pc=0x805ff3d
runtime.gcBgMarkStartWorkers.gowrap1()
	/usr/lib/go-1.23/src/runtime/mgc.go:1279 +0x27 fp=0x90917f0 sp=0x90917e8 pc=0x805fe27
runtime.goexit({})
	/usr/lib/go-1.23/src/runtime/asm_386.s:1393 +0x1 fp=0x90917f4 sp=0x90917f0 pc=0x80c2921
created by runtime.gcBgMarkStartWorkers in goroutine 21
	/usr/lib/go-1.23/src/runtime/mgc.go:1279 +0x12c

goroutine 40 gp=0x8eee908 m=nil [GC worker (idle)]:
runtime.gopark(0x83359a8, 0x8ed0180, 0x1a, 0xa, 0x0)
	/usr/lib/go-1.23/src/runtime/proc.go:424 +0x10c fp=0x9091f8c sp=0x9091f78 pc=0x80bc5ec
runtime.gcBgMarkWorker(0x8eda0c0)
	/usr/lib/go-1.23/src/runtime/mgc.go:1363 +0xfd fp=0x9091fe8 sp=0x9091f8c pc=0x805ff3d
runtime.gcBgMarkStartWorkers.gowrap1()
	/usr/lib/go-1.23/src/runtime/mgc.go:1279 +0x27 fp=0x9091ff0 sp=0x9091fe8 pc=0x805fe27
runtime.goexit({})
	/usr/lib/go-1.23/src/runtime/asm_386.s:1393 +0x1 fp=0x9091ff4 sp=0x9091ff0 pc=0x80c2921
created by runtime.gcBgMarkStartWorkers in goroutine 21
	/usr/lib/go-1.23/src/runtime/mgc.go:1279 +0x12c
FAIL	github.com/ProtonMail/go-crypto/openpgp/v2	128.979s
ok  	github.com/ProtonMail/go-crypto/openpgp/x25519	0.010s
ok  	github.com/ProtonMail/go-crypto/openpgp/x448	0.039s
FAIL
GOARCH=386 go test ./...  898,76s user 33,32s system 373% cpu 4:09,55 total

According to the debian tests [1] it looks like all 32bit architectures are affected. So maybe this is not really an issue of not enough physical ram but som 64bit/32bit issue.

Best regards,
Martin

[1] https://qa.debian.org/excuses.php?package=golang-github-protonmail-go-crypto

@lubux
Copy link
Contributor

lubux commented Nov 9, 2024

Could be that the tests for argon2 key encryption use relatively expensive parameters. I will check if we could reduce them for the tests.

@lubux lubux linked a pull request Nov 11, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants