Skip to content

[bug] goroutine deadlock in version v5.4.9, cause memory leak #1044

@morya

Description

@morya

Describe the bug. A clear and concise description of what the bug is.

goroutine leak lead to memory leak

Versions

Centrifugo version is v5.4.9
Client library used is centrifuge-js of version 5.4.0
Operating system is linux-debian-inside docker

Steps to Reproduce How can the bug be triggered?

with these server config.

token_hmac_secret_key: "aaabbb"
admin: true
address: 0.0.0.0
port: 8000
# log_level: "info"
admin_password: "aaabbb"
admin_secret: aaabbb
api_key: aaabbb

# api_insecure: true
join_leave: true
force_push_join_leave: true
presence: true
allow_presence_for_subscriber: true
allowed_origins:
  - "*"

http_stream: true
sse: true
engine: redis
redis_address: 10.0.0.99:6379
broker: nats
nats_url: nats:4222

proxy_connect_endpoint: http://some-service01/local_hook/im/connect
proxy_rpc_endpoint: http://some-service02/rpc

proxy_http_headers:
        - Origin
        - User-Agent
        - Cookie
        - Authorization
        - X-Real-Ip
        - X-Forwarded-For
        - X-Request-Id

client_channel_limit: 8 # default 128
client_queue_max_size: 65535 # default 1048576 == 1MB

## server side subscribtion
user_subscribe_to_personal: true
user_personal_single_connection: true

"namespaces":
    - name: personal
      presence: true
      publish: false

    - name: audit
      publish: false
      anonymous: false
      history_size: 3
      history_ttl: 300s
      recover: false

Expected behavior What output or behaviour were you expecting instead?

expecting no momery leak.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions