panic: runtime error due to running on OpenBSD #11

Closed
opened 2021-08-10 18:20:40 +00:00 by NetworkString · 3 comments
Contributor

Operating System: OpenBSD 6.9 AMD64
Golang: go1.16.2 openbsd/amd64
Tor: 0.4.6.6

After 1 minute of operation the following error is encountered;

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0x699e35]

goroutine 16 [running]:
git.openprivacy.ca/cwtch.im/server/metrics.(*Monitors).report(0xc0000fa0e8)
	/home/ansible/server/metrics/monitors.go:105 +0x4b5
git.openprivacy.ca/cwtch.im/server/metrics.(*Monitors).run(0xc0000fa0e8)
	/home/ansible/server/metrics/monitors.go:76 +0x31
created by git.openprivacy.ca/cwtch.im/server/metrics.(*Monitors).Start
	/home/ansible/server/metrics/monitors.go:68 +0x2f6

This was traced to github.com/stru!coder/pidusage@v0.1.3/pidusage.go

At the current locked version (0.1.3) adding fnMap["openbsd"] = wrapper("proc") to the init() function resolves the issue and the daemon has run for 15 minutes.

I'll send an MR upstream but they look to be quite far ahead to what is locked here.

**Operating System:** OpenBSD 6.9 AMD64 **Golang:** go1.16.2 openbsd/amd64 **Tor:** 0.4.6.6 After 1 minute of operation the following error is encountered; ``` panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0x699e35] goroutine 16 [running]: git.openprivacy.ca/cwtch.im/server/metrics.(*Monitors).report(0xc0000fa0e8) /home/ansible/server/metrics/monitors.go:105 +0x4b5 git.openprivacy.ca/cwtch.im/server/metrics.(*Monitors).run(0xc0000fa0e8) /home/ansible/server/metrics/monitors.go:76 +0x31 created by git.openprivacy.ca/cwtch.im/server/metrics.(*Monitors).Start /home/ansible/server/metrics/monitors.go:68 +0x2f6 ``` This was traced to `github.com/stru!coder/pidusage@v0.1.3/pidusage.go` At the current locked version (0.1.3) adding `fnMap["openbsd"] = wrapper("proc")` to the init() function resolves the issue and the daemon has run for 15 minutes. I'll send an MR upstream but they look to be quite far ahead to what is locked here.
Author
Contributor
PR https://github.com/struCoder/pidusage/pull/13
Author
Contributor
https://github.com/struCoder/pidusage/pull/13 merged.
Owner

version bumped in #13! :)

version bumped in #13! :)
dan closed this issue 2021-08-31 14:47:47 +00:00
Sign in to join this conversation.
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cwtch.im/server#11
No description provided.