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

"panic: runtime error: invalid memory address or nil pointer dereference" #1058

Open
aheath1992 opened this issue Jun 4, 2024 · 2 comments

Comments

@aheath1992
Copy link

When trying to build an RPM of the receptor, receptorctl, & python3-receptor-python-worker we keep running in to a build error during the testing phase with the error. Not sure if their is a small bug in the actual code or in the tests.

--- FAIL: TestRemoteWorkUnredactedStatus (0.00s)
    --- FAIL: TestRemoteWorkUnredactedStatus/test2 (0.00s)
    controller.go:137: missing call(s) to *mock_workceptor.MockBaseWorkUnitForWorkUnit.GetStatusWithoutExtraData() /builddir/build/BUILD/receptor-1.4.8/_build/src/github.com/ansible/receptor/pkg/workceptor/remote_work_test.go:49
    controller.go:137: missing call(s) to *mock_workceptor.MockBaseWorkUnitForWorkUnit.GetStatusCopy() /builddir/build/BUILD/receptor-1.4.8/_build/src/github.com/ansible/receptor/pkg/workceptor/remote_work_test.go:50
    controller.go:137: aborting test due to missing call(s)
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=0x0 pc=0x1065ca72c]

Full build log: Build Log

@sharkcz
Copy link

sharkcz commented Jun 7, 2024

for the record, the crash occurred on ppc64le and this is a larger snipped from the build.log (as it will be garbage collected)

...
ERROR 2024/06/04 19:40:29 Error reading /tmp/NodeID/test/status: open /tmp/NodeID/test/status.lock: no such file or directory
ERROR 2024/06/04 19:40:29 Error reading /tmp/NodeID/test/status: open /tmp/NodeID/test/status.lock: no such file or directory
--- FAIL: TestRemoteWorkUnredactedStatus (0.00s)
    --- FAIL: TestRemoteWorkUnredactedStatus/test2 (0.00s)
    controller.go:137: missing call(s) to *mock_workceptor.MockBaseWorkUnitForWorkUnit.GetStatusWithoutExtraData() /builddir/build/BUILD/receptor-1.4.8/_build/src/github.com/ansible/receptor/pkg/workceptor/remote_work_test.go:49
    controller.go:137: missing call(s) to *mock_workceptor.MockBaseWorkUnitForWorkUnit.GetStatusCopy() /builddir/build/BUILD/receptor-1.4.8/_build/src/github.com/ansible/receptor/pkg/workceptor/remote_work_test.go:50
    controller.go:137: aborting test due to missing call(s)
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=0x0 pc=0x1065ca72c]
goroutine 405 [running]:
testing.tRunner.func1.2({0x106d80da0, 0x107e05190})
	/usr/lib/golang/src/testing/testing.go:1631 +0x20c
testing.tRunner.func1()
	/usr/lib/golang/src/testing/testing.go:1634 +0x360
panic({0x106d80da0?, 0x107e05190?})
	/usr/lib/golang/src/runtime/panic.go:770 +0x168
sync.(*RWMutex).RLock(...)
	/usr/lib/golang/src/sync/rwmutex.go:68
github.com/ansible/receptor/pkg/workceptor.(*remoteUnit).UnredactedStatus(0xc000118fc0)
	/builddir/build/BUILD/receptor-1.4.8/_build/src/github.com/ansible/receptor/pkg/workceptor/remote_work.go:533 +0x6c
github.com/ansible/receptor/pkg/workceptor_test.TestRemoteWorkUnredactedStatus.func1(0xc00027dd40?)
	/builddir/build/BUILD/receptor-1.4.8/_build/src/github.com/ansible/receptor/pkg/workceptor/remote_work_test.go:53 +0x21c
testing.tRunner(0xc00027dd40, 0xc000169e30)
	/usr/lib/golang/src/testing/testing.go:1689 +0x134
created by testing.(*T).Run in goroutine 200
	/usr/lib/golang/src/testing/testing.go:1742 +0x3a4
exit status 2
FAIL	github.com/ansible/receptor/pkg/workceptor	8.880s
error: 

@sharkcz
Copy link

sharkcz commented Jun 20, 2024

also koji shows failures across all arches (except aarch64)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants