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

socket mode deadman timer ineffective #1093

Closed
parsley42 opened this issue Jul 28, 2022 · 0 comments · Fixed by #1094
Closed

socket mode deadman timer ineffective #1093

parsley42 opened this issue Jul 28, 2022 · 0 comments · Fixed by #1094
Labels
SocketMode about SocketMode

Comments

@parsley42
Copy link
Member

What happened

After noticing one of my robots became unresponsive for several minutes, I ran a bot locally and artificially prevented the slack ping from being received using an inbound firewall rule, and found that the connection didn't reset until long after the default 30s timeout.

I triggered a stack dump and found threads blocked on wg.Wait() (as expected) and also receiveMessagesInto / conn.ReadJSON(...). So, it appears the connection isn't reset until both the deadman timer expires AND ReadJSON times out.

Expected behavior

When the deadman timer fires, socket mode should reconnect right away.

Steps to reproduce

  • Establish a socketmode connection
  • Use netstat -ntp to find the port in use
  • Block inbound traffic on the port with e.g. iptable -A INPUT --dport 12345 -j DROP
  • Watch the debug output and wait for the connection to reset

reproducible code

This can be done using just the socket mode example.

manifest.yaml

?

Versions

  • Go:
  • slack-go/slack:
@kanata2 kanata2 added the SocketMode about SocketMode label Aug 22, 2022
kanata2 added a commit that referenced this issue Sep 11, 2022

Verified

This commit was signed with the committer’s verified signature.
Honor deadman timer, fixes #1093
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SocketMode about SocketMode
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants