Navigation Menu

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

x/crypto/openpgp/clearsign: TestMultiSign go test fails on armhf system #39831

Open
rogers0 opened this issue Jun 24, 2020 · 4 comments
Open
Labels
help wanted NeedsFix The path to resolution is known, but the work has not been done. Testing An issue that has been verified to require only test changes, not just a test failure.
Milestone

Comments

@rogers0
Copy link

rogers0 commented Jun 24, 2020

What version of Go are you using (go version)?

1.14

Does this issue reproduce with the latest release?

Not sure

What operating system and processor architecture are you using (go env)?

debian unstable

What did you do?

golang-go.crypto test fails on reproducible builds

log:

=== RUN   TestMultiSign
panic: test timed out after 10m0s

goroutine 7 [running]:
testing.(*M).startAlarm.func1()
	/usr/lib/go-1.14/src/testing/testing.go:1459 +0xbc
created by time.goFunc
	/usr/lib/go-1.14/src/time/sleep.go:168 +0x34

goroutine 1 [chan receive, 9 minutes]:
testing.(*T).Run(0x1106140, 0x1c338a, 0xd, 0x1cf1e4, 0x301)
	/usr/lib/go-1.14/src/testing/testing.go:1043 +0x2d0
testing.runTests.func1(0x109a000)
	/usr/lib/go-1.14/src/testing/testing.go:1284 +0x68
testing.tRunner(0x109a000, 0x1045ef8)
	/usr/lib/go-1.14/src/testing/testing.go:991 +0xbc
testing.runTests(0x100e100, 0x308678, 0x6, 0x6, 0x0)
	/usr/lib/go-1.14/src/testing/testing.go:1282 +0x238
testing.(*M).Run(0x1058100, 0x0)
	/usr/lib/go-1.14/src/testing/testing.go:1199 +0x134
main.main()
	_testmain.go:54 +0x120

goroutine 20 [runnable]:
math/big.nat.montgomery(0x136aa20, 0x20, 0x44, 0x136ab40, 0x20, 0x46, 0x136ab40, 0x20, 0x46, 0x12eabd0, ...)
	/usr/lib/go-1.14/src/math/big/nat.go:213 +0x3bc
math/big.nat.expNNMontgomery(0x136aa20, 0x20, 0x46, 0x1345d40, 0x20, 0x24, 0x1345c20, 0x20, 0x24, 0x12eabd0, ...)
	/usr/lib/go-1.14/src/math/big/nat.go:1446 +0x5d4
math/big.nat.expNN(0x136aa20, 0x20, 0x44, 0x1345d40, 0x20, 0x24, 0x1345c20, 0x20, 0x24, 0x12eabd0, ...)
	/usr/lib/go-1.14/src/math/big/nat.go:1261 +0x698
math/big.nat.probablyPrimeMillerRabin(0x12eabd0, 0x20, 0x24, 0x15, 0x56be4f01, 0x24)
	/usr/lib/go-1.14/src/math/big/prime.go:106 +0x380
math/big.(*Int).ProbablyPrime(0x100e240, 0x14, 0x1040d6c)
	/usr/lib/go-1.14/src/math/big/prime.go:78 +0x224
crypto/rand.Prime(0x1fba08, 0x110ab54, 0x400, 0x1100020, 0x16, 0x1018860)
	/usr/lib/go-1.14/src/crypto/rand/util.go:99 +0x244
crypto/rsa.GenerateMultiPrimeKey(0x1fba08, 0x110ab54, 0x2, 0x800, 0x1c18cc, 0x5, 0x14920a0)
	/usr/lib/go-1.14/src/crypto/rsa/rsa.go:268 +0x10c
crypto/rsa.GenerateKey(...)
	/usr/lib/go-1.14/src/crypto/rsa/rsa.go:208
golang.org/x/crypto/openpgp.NewEntity(0x1c1748, 0x4, 0x1c1daa, 0x7, 0x1c18cc, 0x5, 0x1040f7c, 0x2, 0x0, 0x0)
	/build/1st/golang-go.crypto-0.0~git20200604.70a84ac/obj-arm-linux-gnueabihf/src/golang.org/x/crypto/openpgp/keys.go:518 +0xc0
golang.org/x/crypto/openpgp/clearsign.TestMultiSign(0x1106140)
	/build/1st/golang-go.crypto-0.0~git20200604.70a84ac/obj-arm-linux-gnueabihf/src/golang.org/x/crypto/openpgp/clearsign/clearsign_test.go:153 +0x108
testing.tRunner(0x1106140, 0x1cf1e4)
	/usr/lib/go-1.14/src/testing/testing.go:991 +0xbc
created by testing.(*T).Run
	/usr/lib/go-1.14/src/testing/testing.go:1042 +0x2b0
FAIL	golang.org/x/crypto/openpgp/clearsign	600.048s

https://tests.reproducible-builds.org/debian/rbuild/unstable/armhf/golang-go.crypto_0.0~git20200604.70a84ac-1.rbuild.log.gz

@gopherbot gopherbot added this to the Unreleased milestone Jun 24, 2020
@cagedmantis cagedmantis changed the title x/crypto: TestMultiSign go test fails on armhf system x/crypto/openpgp/clearsign: TestMultiSign go test fails on armhf system Jun 29, 2020
@cagedmantis cagedmantis added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jun 29, 2020
@cagedmantis
Copy link
Contributor

/cc @FiloSottile

@FiloSottile FiloSottile added the Testing An issue that has been verified to require only test changes, not just a test failure. label Mar 29, 2021
@mangalaman93
Copy link

I observe this in our jenkins pipeline that runs periodic builds. Jenkins build runs on a gcp node with amd 64 bit architecture running a linux distribution.

panic: test timed out after 10m0s

goroutine 1323 [running]:
testing.(*M).startAlarm.func1()
	/usr/local/go/src/testing/testing.go:1700 +0xe5
created by time.goFunc
	/usr/local/go/src/time/sleep.go:180 +0x45

goroutine 1 [chan receive]:
testing.(*T).Run(0xc000594300, 0xd03bf7, 0x1b, 0xd2bc68, 0x495301)
	/usr/local/go/src/testing/testing.go:1239 +0x2da
testing.runTests.func1(0xc0004d5080)
	/usr/local/go/src/testing/testing.go:1511 +0x78
testing.tRunner(0xc0004d5080, 0xc00049fda8)
	/usr/local/go/src/testing/testing.go:1193 +0xef
testing.runTests(0xc00011c0c0, 0x128b3c0, 0x13, 0x13, 0xc042730e2abde59c, 0x8bf42f1a2c, 0x129b540, 0xcf9016)
	/usr/local/go/src/testing/testing.go:1509 +0x2fe
testing.(*M).Run(0xc00037c300, 0x0)
	/usr/local/go/src/testing/testing.go:1417 +0x1eb
main.main()
	_testmain.go:135 +0x1c5

goroutine 1463 [runnable]:
math/big.nat.montgomery(0xc000972a00, 0x10, 0x26, 0xc00097d320, 0x10, 0x24, 0xc00097d320, 0x10, 0x24, 0xc00070af00, ...)
	/usr/local/go/src/math/big/nat.go:213 +0x50d
math/big.nat.expNNMontgomery(0xc00097d320, 0x10, 0x24, 0xc00096f5e0, 0x10, 0x14, 0xc00096f4a0, 0x10, 0x14, 0xc00070af00, ...)
	/usr/local/go/src/math/big/nat.go:1449 +0x91d
math/big.nat.expNN(0xc00096f680, 0x10, 0x14, 0xc00096f5e0, 0x10, 0x14, 0xc00096f4a0, 0x10, 0x14, 0xc00070af00, ...)
	/usr/local/go/src/math/big/nat.go:1262 +0xa06
math/big.nat.probablyPrimeMillerRabin(0xc00070af00, 0x10, 0x14, 0x15, 0x54a32ebdd2fd1201, 0x0)
	/usr/local/go/src/math/big/prime.go:106 +0x48e
math/big.(*Int).ProbablyPrime(0xc00031c600, 0x14, 0xc0009574e8)
	/usr/local/go/src/math/big/prime.go:78 +0x232
crypto/rand.Prime(0xde2360, 0xc0000fa1e0, 0x400, 0xc0004b6130, 0xc000850038, 0x0)
	/usr/local/go/src/crypto/rand/util.go:99 +0x185
crypto/rsa.GenerateMultiPrimeKey(0xde2360, 0xc0000fa1e0, 0x2, 0x800, 0x0, 0xd2dcd8, 0x0)
	/usr/local/go/src/crypto/rsa/rsa.go:302 +0x170
crypto/rsa.GenerateKey(...)
	/usr/local/go/src/crypto/rsa/rsa.go:242
...
omitted, call to rsa.GenerateKey(crypto/rand.Reader, 2048)
....
testing.tRunner(0xc000594300, 0xd2bc68)
	/usr/local/go/src/testing/testing.go:1193 +0xef
created by testing.(*T).Run
	/usr/local/go/src/testing/testing.go:1238 +0x2b3

@mangalaman93
Copy link

I realized that our jenkins hosts were too slow for 2048 bit rsa keys for our tests. That could have caused this issue too.

@FiloSottile
Copy link
Contributor

I would take a PR to reduce the size of the keys used in tests.

@FiloSottile FiloSottile added help wanted NeedsFix The path to resolution is known, but the work has not been done. and removed NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Sep 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted NeedsFix The path to resolution is known, but the work has not been done. Testing An issue that has been verified to require only test changes, not just a test failure.
Projects
None yet
Development

No branches or pull requests

5 participants