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

Huge amount of zombie ssl_client processes #2096

Closed
p4block opened this issue Oct 17, 2023 · 4 comments · Fixed by #2097
Closed

Huge amount of zombie ssl_client processes #2096

p4block opened this issue Oct 17, 2023 · 4 comments · Fixed by #2097
Milestone

Comments

@p4block
Copy link

p4block commented Oct 17, 2023

As per title. We're using PROXY protocol for our IRC behind a cloud LB.

image

Config (snippet):

network:
    name: ourdomain.com

server:
    # server name
    name: ourdomain.com


    listeners:
        ":6667": # (loopback ipv4, localhost-only)
            proxy: true

        # The standard SSL/TLS port for IRC is 6697. This will listen on all interfaces:
        ":6697":
            tls:
                cert: "/data/fullchain.pem"
                key: "/data/privkey.pem"
            proxy: true
            min-tls-version: 1.2

      proxy-allowed-from:
         - 167.233.22.11



[...]
    auth-script:
        enabled: true
        command: "/ircd/auth.sh"
        args: ["https://user.ourdomain.com/irc/ergochat/login"]
        autocreate: true
        timeout: 9s
        kill-timeout: 1s
        max-concurrency: 64

I'm suspecting it's related to the auth script.

#!/bin/sh
read input
wget --header='CONTENT-TYPE:application/json' --post-data "$input" -O - -q $1 && printf '\n' # This assume no endline ohne the API response

Related issue may be with wget in alpine

@p4block
Copy link
Author

p4block commented Oct 17, 2023

Switched the auth script to use curl and the problem now happens less but it's not fixed, seems to be an upstream alpine/busybox issue.

#!/bin/sh
read input
curl -X POST -H 'Content-Type:application/json' --data "$input" -sS $1 && printf '\n'

Got curl into the image by overriding the container command

  entrypoint: ["/bin/sh", "-c"]
  command: ["apk add curl && /ircd-bin/run.sh"]

@slingamn
Copy link
Member

Thanks for the report! It looks like this is the problem solved by dumb-init and tini. We may need to recommend the use of --init in our Docker guides.

@slingamn slingamn modified the milestones: selected, v2.13 Oct 18, 2023
slingamn added a commit to slingamn/ergo that referenced this issue Oct 19, 2023
See ergochat#2096; this should fix unreaped zombies when using an auth-script or
ip-check-script that spawns its own subprocesses, then exits before reaping
them.
@slingamn
Copy link
Member

@p4block have you tried using --init with your docker run invocation, as per #2097

Brutus5000 added a commit to FAForever/faf-stack that referenced this issue Nov 10, 2023
Avoid zombie processes (see ergochat/ergo#2096)
Brutus5000 added a commit to FAForever/faf-stack that referenced this issue Nov 10, 2023
Avoid zombie processes (see ergochat/ergo#2096)
@Brutus5000
Copy link

Init mode seems to have solved the issue.

slingamn added a commit that referenced this issue Nov 15, 2023
* add --init to suggested docker run invocations

See #2096; this should fix unreaped zombies when using an auth-script or
ip-check-script that spawns its own subprocesses, then exits before reaping
them.

* add a note on why --init
slingamn added a commit to slingamn/ergo that referenced this issue Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants