getsops / getsops/sops

Failing PGP tests

Open
#1,297 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/CI area/keyservice keyservice/pgp
Dominant language
Go
Stars
23.1k
Forks
1.1k
Avg merge
1d 11h
Merged PRs (30d)
9

Description

Hi everyone. I've faced with unknown issue (even main branch), without touching any code.

Environment (arm64):

  • GO: 1.20.6
  • GPG: 2.2.27
  • OS: Ubuntu 22.04.2 LTS
  • Hardware: Raspberry Pi 4 Model B Rev 1.4

After cloning fresh copy of repository and launching make test, I'm getting:

--- FAIL: TestMasterKey_Encrypt (0.24s)
    --- FAIL: TestMasterKey_Encrypt/with_error (0.03s)
        keysource_test.go:204:
            	Error Trace:	/home/moskovych/sops/pgp/keysource_test.go:204
            	Error:      	An error is expected but got nil.
            	Test:       	TestMasterKey_Encrypt/with_error
        keysource_test.go:205:
            	Error Trace:	/home/moskovych/sops/pgp/keysource_test.go:205
            	Error:      	An error is expected but got nil.
            	Test:       	TestMasterKey_Encrypt/with_error
        keysource_test.go:206:
            	Error Trace:	/home/moskovych/sops/pgp/keysource_test.go:206
            	Error:      	An error is expected but got nil.
            	Test:       	TestMasterKey_Encrypt/with_error
    --- FAIL: TestMasterKey_Encrypt/with_OpenPGP_disabled (0.01s)
        keysource_test.go:215:
            	Error Trace:	/home/moskovych/sops/pgp/keysource_test.go:215
            	Error:      	An error is expected but got nil.
            	Test:       	TestMasterKey_Encrypt/with_OpenPGP_disabled
        keysource_test.go:216:
            	Error Trace:	/home/moskovych/sops/pgp/keysource_test.go:216
            	Error:      	An error is expected but got nil.
            	Test:       	TestMasterKey_Encrypt/with_OpenPGP_disabled
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x34b540]

goroutine 72 [running]:
testing.tRunner.func1.2({0x380920, 0x6570b0})
	/usr/local/go/src/testing/testing.go:1526 +0x278
testing.tRunner.func1()
	/usr/local/go/src/testing/testing.go:1529 +0x448
panic({0x380920, 0x6570b0})
	/usr/local/go/src/runtime/panic.go:890 +0x248
github.com/getsops/sops/v3/pgp.TestMasterKey_Encrypt.func4(0x0?)
	/home/moskovych/sops/pgp/keysource_test.go:217 +0x160
testing.tRunner(0xc0002911e0, 0x4009a0)
	/usr/local/go/src/testing/testing.go:1576 +0x184
created by testing.(*T).Run
	/usr/local/go/src/testing/testing.go:1629 +0x5b8
FAIL	github.com/getsops/sops/v3/pgp	1.735s

Is there something missed/hidden from github workflows?

Expected result: all tests from main branch are successful.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running make test and reproducing TestMasterKey_Encrypt in pgp/keysource_test.go on the reported ARM64 environment. Read the failing cases around lines 204–217 and compare the local setup with the repository's GitHub workflow configuration. Done means the PGP tests, including the error and OpenPGP-disabled cases, pass without a panic.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.