Cwtch Server Monitoring Crashes Server on Raspberry Pi #136

Closed
opened 2018-10-06 04:48:00 +00:00 by sarah · 4 comments
Owner

This might just be a Raspberry Pi / ARM thing, but we've been noticing our Raspberry Pi Cwtch Server deployment crashing on concurrent map writes in the monitoring software.

Considering we've been running CwtchServer for a while without issue in the monitoring this might be an issue without the PID API is implemented in the library, but we should look into this.

Error:

fatal error: concurrent map writes

goroutine 22 [running]:
runtime.throw(0x29c1b6, 0x15)
/usr/lib/go-1.7/src/runtime/panic.go:566 +0x78 fp=0x10632c58 sp=0x10632c4c
runtime.mapassign1(0x268668, 0x10668880, 0x10632cf8, 0x10632d4c)
/usr/lib/go-1.7/src/runtime/hashmap.go:458 +0x94 fp=0x10632cd8 sp=0x10632c58
github.com/struCoder/pidusage.stat(0x6c30, 0x298086, 0x4, 0x4, 0x0, 0x0)
go/src/github.com/struCoder/pidusage/pidusage.go:142 +0xc64 fp=0x10632ebc sp=0x10632cd8
github.com/struCoder/pidusage.wrapper.func1(0x6c30, 0x106688a0, 0x0, 0x0)
go/src/github.com/struCoder/pidusage/pidusage.go:40 +0x4c fp=0x10632ee0 sp=0x10632ebc
github.com/struCoder/pidusage.GetStat(0x6c30, 0x10632f10, 0x0, 0x0)
go/src/github.com/struCoder/pidusage/pidusage.go:152 +0x6c fp=0x10632ef8 sp=0x10632ee0
cwtch.im/cwtch/server/metrics.(*Monitors).Start.func3(0x1069ebb8, 0x1066a380)
go/src/cwtch.im/cwtch/server/metrics/monitors.go:37 +0x28 fp=0x10632f0c sp=0x10632ef8
cwtch.im/cwtch/server/metrics.(*monitorHistory).monitorThread(0x1069e800)
go/src/cwtch.im/cwtch/server/metrics/metrics.go:218 +0xfc fp=0x10632fcc sp=0x10632f0c
runtime.goexit()
/usr/lib/go-1.7/src/runtime/asm_arm.s:998 +0x4 fp=0x10632fcc sp=0x10632fcc
created by cwtch.im/cwtch/server/metrics.(*monitorHistory).Start

This *might* just be a Raspberry Pi / ARM thing, but we've been noticing our Raspberry Pi Cwtch Server deployment crashing on concurrent map writes in the monitoring software. Considering we've been running CwtchServer for a while without issue in the monitoring this might be an issue without the PID API is implemented in the library, but we should look into this. Error: fatal error: concurrent map writes goroutine 22 [running]: runtime.throw(0x29c1b6, 0x15) /usr/lib/go-1.7/src/runtime/panic.go:566 +0x78 fp=0x10632c58 sp=0x10632c4c runtime.mapassign1(0x268668, 0x10668880, 0x10632cf8, 0x10632d4c) /usr/lib/go-1.7/src/runtime/hashmap.go:458 +0x94 fp=0x10632cd8 sp=0x10632c58 github.com/struCoder/pidusage.stat(0x6c30, 0x298086, 0x4, 0x4, 0x0, 0x0) go/src/github.com/struCoder/pidusage/pidusage.go:142 +0xc64 fp=0x10632ebc sp=0x10632cd8 github.com/struCoder/pidusage.wrapper.func1(0x6c30, 0x106688a0, 0x0, 0x0) go/src/github.com/struCoder/pidusage/pidusage.go:40 +0x4c fp=0x10632ee0 sp=0x10632ebc github.com/struCoder/pidusage.GetStat(0x6c30, 0x10632f10, 0x0, 0x0) go/src/github.com/struCoder/pidusage/pidusage.go:152 +0x6c fp=0x10632ef8 sp=0x10632ee0 cwtch.im/cwtch/server/metrics.(*Monitors).Start.func3(0x1069ebb8, 0x1066a380) go/src/cwtch.im/cwtch/server/metrics/monitors.go:37 +0x28 fp=0x10632f0c sp=0x10632ef8 cwtch.im/cwtch/server/metrics.(*monitorHistory).monitorThread(0x1069e800) go/src/cwtch.im/cwtch/server/metrics/metrics.go:218 +0xfc fp=0x10632fcc sp=0x10632f0c runtime.goexit() /usr/lib/go-1.7/src/runtime/asm_arm.s:998 +0x4 fp=0x10632fcc sp=0x10632fcc created by cwtch.im/cwtch/server/metrics.(*monitorHistory).Start
Owner
https://github.com/struCoder/pidusage/issues/8 https://github.com/struCoder/pidusage/pull/9
Owner
#160
Owner

Erinn, can you confirm this fixes?

Erinn, can you confirm this fixes?
Author
Owner

Changes propagated upstream (yay!) closing.

Changes propagated upstream (yay!) closing.
sarah closed this issue 2019-01-21 18:55:13 +00:00
Sign in to join this conversation.
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/cwtch#136
No description provided.