Skip to content

panic: non-positive interval for Ticker.Reset #10527

Closed
@ashmckenzie

Description

@ashmckenzie

Hi,

Every few days my Docker based Coder setup crashes with the same error in the logs:

coder-coder-1     | 2023-11-05 09:51:25.757 [warn]  net.devtunnel: periodically re-register tunnel ...
coder-coder-1     |     error= do:
coder-coder-1     |                github.com/coder/wgtunnel/tunnelsdk.(*Client).Request
coder-coder-1     |                    /home/runner/go/pkg/mod/github.com/coder/wgtunnel@v0.1.12/tunnelsdk/client.go:67
coder-coder-1     |              - Post "https://pit-1.try.coder.app/api/v2/clients": context deadline exceeded
coder-coder-1     | panic: non-positive interval for Ticker.Reset
coder-coder-1     |
coder-coder-1     | goroutine 68 [running]:
coder-coder-1     | time.(*Ticker).Reset(0xc000864cb0?, 0x1?)
coder-coder-1     |     /opt/hostedtoolcache/go/1.20.10/x64/src/time/tick.go:55 +0x8f
coder-coder-1     | github.com/coder/wgtunnel/tunnelsdk.(*Client).LaunchTunnel.func2()
coder-coder-1     |     /home/runner/go/pkg/mod/github.com/coder/wgtunnel@v0.1.12/tunnelsdk/tunnel.go:250 +0xdc
coder-coder-1     | created by github.com/coder/wgtunnel/tunnelsdk.(*Client).LaunchTunnel
coder-coder-1     |     /home/runner/go/pkg/mod/github.com/coder/wgtunnel@v0.1.12/tunnelsdk/tunnel.go:231 +0x9d3

The entire app is inaccessible and a restart of the container is required. Here is the compose.yaml I'm using, I'm not overriding any of the environment variables either:

version: "3.9"

services:
  coder:
    image: ghcr.io/coder/coder:${CODER_VERSION:-latest}
    ports:
      - "7080:7080"
    environment:
      CODER_PG_CONNECTION_URL: "postgresql://${POSTGRES_USER:-username}:${POSTGRES_PASSWORD:-password}@database:5432/${POSTGRES_DB:-coder}?sslmode=disable"
      CODER_HTTP_ADDRESS: "0.0.0.0:7080"
      CODER_ACCESS_URL: "${CODER_ACCESS_URL}"
      CODER_DANGEROUS_ALLOW_PATH_APP_SITE_OWNER_ACCESS: true
    group_add:
      - "114"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    depends_on:
      database:
        condition: service_healthy

  database:
    image: "postgres:14.2"
    environment:
      POSTGRES_USER: ${POSTGRES_USER:-username}
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-password}database)
      POSTGRES_DB: ${POSTGRES_DB:-coder}
    volumes:
      - coder_data:/var/lib/postgresql/data
    healthcheck:
      test:
        [
          "CMD-SHELL",
          "pg_isready -U ${POSTGRES_USER:-username} -d ${POSTGRES_DB:-coder}",
        ]
      interval: 5s
      timeout: 5s
      retries: 5

volumes:
  coder_data:

Metadata

Metadata

Assignees

Labels

s2Broken use cases or features (with a workaround). Only humans may set this.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions