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

c-icap gets stuck while shutting down (reconfigure command then stop command) #54

Open
ae-ignatiev opened this issue Jun 30, 2023 · 0 comments

Comments

@ae-ignatiev
Copy link

Hi
I have used c-icap for a long time and I have recently encountered a problem: c-icap got stuck while shutting down the process.
As I could figure out it happens in really rare conditions: there are two subsequent commands "reconfigure" and "stop" sent to command socket with small pause between them (I guess 0.3 - 0.5s):

      echo -n reconfigure > /var/run/c-icap/c-icap.ctl
      echo -n stop > /var/run/c-icap/c-icap.ctl

The reproducing is quite stable.

As I understand c-icap get stuck while it is waiting for child exit that have to be killed after reconfiguration command. Probably, the cause is in this condition in wait_childs_to_exit function (mpmt_server.c):

        if (q->childs[i].to_be_killed != IMMEDIATELY) {
            ci_debug_printf(5, "Child %d not signaled yet!\n", q->childs[i].pid);
            continue;
        }

to_be_killed here has GRACEFULLY value for those child processes.

Could you please take a look at this issue?
I understand that scenario is quite weird but it happened in my project. And I can't restart the whole service again due to this stuck (process still exists).

Processes/threads configuration in config-file:

StartServers 3
MaxServers 10
MinSpareThreads     10
MaxSpareThreads     10
ThreadsPerChild     10
MaxRequestsPerChild  1000

Version: 0.5.10
CentOS 7.9

Thank you!

@ae-ignatiev ae-ignatiev changed the title c-icap get stuck while shutting down (reconfigure command then stop command) c-icap gets stuck while shutting down (reconfigure command then stop command) Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant