From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 26434 invoked from network); 29 Jul 2021 08:43:44 -0000 Received: from alyss.skarnet.org (95.142.172.232) by inbox.vuxu.org with ESMTPUTF8; 29 Jul 2021 08:43:44 -0000 Received: (qmail 22986 invoked by uid 89); 29 Jul 2021 08:44:05 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Received: (qmail 22976 invoked from network); 29 Jul 2021 08:44:05 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=75EQF1uu4eTJfy698xELhJC0IMnTz9nIXrSXs8TOloM=; b=bKlA19UY/YOhKAPsXr3WCvK4lkjnous4lX7Dfd0ubBR0rJzP6i/rrApR6IuAXsHMj+ UXp+LfLWu7sRURf0H9gE7Yv5hnN16wG4fxF0qUsJwnO+lwuvQxQSL/PKO2FdneGLKtLf PnoapG6oooJ2d+l0+Y6WK5XAS0Ad7Avg1QU365rGQ1D68oD2Auei77xXFxWjMuI11ERk GYM+5DkBwgeY00GE+MzvU/W7m3IN8tcsaJCOQt5v4/3/VMRyy0/E53kn/ypcD89xjikw MNxh2x9+ZSKobqc1VqlYh88B+mpvmJqbr9TmguRirYRABiufGepootdHq4AQPl3D68Ch CtYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=75EQF1uu4eTJfy698xELhJC0IMnTz9nIXrSXs8TOloM=; b=gBuMXTQkGAg6bgJcq5S71poRzUNKLQTuv850AJ2n+JWwx8EdcPCfAeNbWCaTn+N5vC bGgGRNuKHO0pM/jOaDIH27uAMy61/9RlisecdEgKZsyuaf8FNSjv09XYueg/ONlT7vTc nmWoCzi/gPdo7SMWIvPXxDxUj8lvW/wd3R0YDBMR4MQqd5cdmQHTV7pq6+J+Nr0s5mS6 PeXkiBVeWp6gfBRWbUCwLK0/F7YwnKXYjd/fnZXsr2joTbOX3ePO/VA3DlJCgZPUF0im 3A1otR6ogjSVypehMUbuB1pfXllJxf2iDEyg0l8fTF4rWZQ/EWptZqH4o63aNEz2YGS5 3fIg== X-Gm-Message-State: AOAM530PAQESQQSCqmytvjHBDDeDeOOPM+ArYX1R2ou4FHh1CxvADj+6 k8htdgXmZu8SpQhvA2UclfFs81y71R+4JaZJrwFzfNsYsnFi3g== X-Google-Smtp-Source: ABdhPJx3cfKYOPsO1i3SvZdDC9INslQ4He73cFk8wdJsC+mbYrKFgbeZMVCFJNceMfbe/2SgUEuUeP7npV/XorulHUo= X-Received: by 2002:adf:d4c6:: with SMTP id w6mr3561877wrk.353.1627548217437; Thu, 29 Jul 2021 01:43:37 -0700 (PDT) MIME-Version: 1.0 From: Arjun D R Date: Thu, 29 Jul 2021 14:13:26 +0530 Message-ID: Subject: Query on S6 system shutdown To: supervision@list.skarnet.org Content-Type: multipart/alternative; boundary="0000000000005af04505c83f1990" --0000000000005af04505c83f1990 Content-Type: text/plain; charset="UTF-8" Hi Team, I am facing an issue at the moment of shutting down the system. Whenever I reboot the system, it is triggering "s6-rc -v2 -bda change" and stops all the services. But one service is not responding and it hangs. This blocks the reboot. ps -aef | grep s6-rc root 2770 2707 0 08:24 ? 00:00:00 s6-ipcserverd -1 -- s6-ipcserver-access -v0 -E -l0 -i data/rules -- s6-sudod -t 30000 -- /libexec/s6-rc-oneshot-run -l ../.. -- root 7880 2615 1 08:28 ? 00:00:00 s6-rc -v2 -bda change root 8603 7880 0 08:28 ? 00:00:00 s6-svlisten1 -D -- /run/s6-rc/servicedirs/critical.service s6-svc -d -- /run/s6-rc/servicedirs/critical.service root 8755 2620 0 08:28 ttyS0 00:00:00 grep s6-rc I believe the finish script is not being called by s6-svc. When I run it manually , the finish script runs and kills the process and graceful shutdown is happening as expected. What may be the cause for not triggering the finish script of critical service. cat /run/service/critical.service/run.user #!/bin/execlineb -P foreground { echo "starting critical service" } fdmove -c 2 1 envfile -i /etc/default/critical-env s6-envdir /etc/s6-rc/source/critical.service/env <.. many importas commands..> /usr/bin/critical -b -c /etc/critical/config.json cat /run/service/critical.service/finish.user #!/bin/execlineb -P foreground { echo "Stopping critical service" } fdmove -c 2 1 backtick -n pid_value { pidof critical } importas -i pid_value pid_value /bin/kill -9 -- -${pid_value} Please help. Thanks, Arjun --0000000000005af04505c83f1990--