Panic in websocketchannel.go.174
- Dominant language
- Go
- Stars
- 1.2k
- Forks
- 357
- PR merge metrics
- No merged PRs in 30d
Description
SSM Agent version: 3.0.529.0
2021-10-01 09:22:11 ERROR [1 @ websocketchannel.go.174] [ssm-session-worker] [chef-cli-0c6130e6132a14d46] [DataBackend] [pluginName=Port] WebsocketChannel listener run panic: runtime error: invalid memory address or nil pointer dereference
2021-10-01 09:22:11 ERROR [1 @ websocketchannel.go.174] [ssm-session-worker] [chef-cli-0c6130e6132a14d46] [DataBackend] [pluginName=Port] runtime error: invalid memory address or nil pointer dereference: goroutine 69 [running]:
runtime/debug.Stack(0xc000032a20, 0xc000344b80, 0x79)
runtime/debug/stack.go:24 +0x9f
github.com/aws/amazon-ssm-agent/agent/session/communicator.(*WebSocketChannel).Open.func1.1(0x5581d5302660, 0xc000032a20)
github.com/aws/amazon-ssm-agent/agent/session/communicator/websocketchannel.go:174 +0xcc
panic(0x5581d5113b20, 0x5581d5a60590)
runtime/panic.go:679 +0x1b6
github.com/aws/amazon-ssm-agent/agent/session/plugins/port.(*BasicPortSession).HandleStreamMessage(0xc000081860, 0x5581d5302660, 0xc000032a20, 0x74, 0xc000505a20, 0x11, 0x1, 0x17c3b2942c9, 0x1, 0x0, ...)
github.com/aws/amazon-ssm-agent/agent/session/plugins/port/port_basic.go:79 +0x3b2
github.com/aws/amazon-ssm-agent/agent/session/plugins/port.(*PortPlugin).InputStreamMessageHandler(0xc000032a50, 0x5581d5302660, 0xc000032a20, 0x74, 0xc000505a20, 0x11, 0x1, 0x17c3b2942c9, 0x1, 0x0, ...)
github.com/aws/amazon-ssm-agent/agent/session/plugins/port/port.go:206 +0x8a
github.com/aws/amazon-ssm-agent/agent/session/datachannel.(*DataChannel).processStreamDataMessage(0xc000090900, 0x5581d5302660, 0xc000032a20, 0x74, 0xc000505a20, 0x11, 0x1, 0x17c3b2942c9, 0x1, 0x0, ...)
github.com/aws/amazon-ssm-agent/agent/session/datachannel/datachannel.go:804 +0xbb
github.com/aws/amazon-ssm-agent/agent/session/datachannel.(*DataChannel).handleStreamDataMessage(0xc000090900, 0x5581d5302660, 0xc000032a20, 0x74, 0xc000505a20, 0x11, 0x1, 0x17c3b2942c9, 0x1, 0x0, ...)
github.com/aws/amazon-ssm-agent/agent/session/datachannel/datachannel.go:666 +0x614
github.com/aws/amazon-ssm-agent/agent/session/datachannel.(*DataChannel).dataChannelIncomingMessageHandler(0xc000090900, 0x5581d5302660, 0xc000032a20, 0xc000391800, 0xa4, 0x600, 0xc000391800, 0xa4)
github.com/aws/amazon-ssm-agent/agent/session/datachannel/datachannel.go:605 +0x9c4
github.com/aws/amazon-ssm-agent/agent/session/datachannel.NewDataChannel.func1(0xc000391800, 0xa4, 0x600)
github.com/aws/amazon-ssm-agent/agent/session/datachannel/datachannel.go:205 +0x6d
github.com/aws/amazon-ssm-agent/agent/session/communicator.(*WebSocketChannel).Open.func1(0x5581d5302660, 0xc000032a20, 0xc0002d8000)
github.com/aws/amazon-ssm-agent/agent/session/communicator/websocketchannel.go:207 +0x3d2
created by github.com/aws/amazon-ssm-agent/agent/session/communicator.(*WebSocketChannel).Open
github.com/aws/amazon-ssm-agent/agent/session/communicator/websocketchannel.go:169 +0x203
Contributor guide
Research direction
Start at agent/session/plugins/port/port_basic.go:79 in BasicPortSession.HandleStreamMessage, where the reported nil-pointer panic originates. Trace the call through port.go:206 and websocketchannel.go:174, using the supplied stack trace to determine which value can be nil. Done means the reported Port-session message path no longer panics on the failing condition.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100