public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Peter Humphrey <peter@prh.myzen.co.uk>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Protecting init.d files from auto-update
Date: Fri, 31 Jan 2025 14:24:15 +0000	[thread overview]
Message-ID: <23817797.6Emhk5qWAg@cube> (raw)
In-Reply-To: <871pwjofsd.fsf@gmail.com>

On Friday 31 January 2025 02:53:06 Greenwich Mean Time Alexis wrote:

--->8

> If you set `retry` in boinc.conf to, say, "SIGTERM/10/SIGKILL/20",
> for a 10-second timeout in response to a SIGTERM signal and a
> 20-second timeout in response to a SIGKILL signal, does that
> reduce the stopping time? If so, to what duration? Hopefully
> setting different timeout periods for different signals will mean
> we can deduce what signals are being received from the stopping
> duration.

In the -r1 version, with SIGTERM/60/SIGTERM/30/SIGKILL/30, BOINC activity 
stopped immediately*, but control wasn't returned to me until 60s later. That 
is, the first SIGTERM was obeyed but the system didn't become aware of it until 
it sent the second SIGTERM. So, apparently, the boinc code needed a second 
prod to report back.

Today I set retry="SIGTERM/4/SIGTERM/3/SIGKILL/3" on this machine, which only 
ever runs one BOINC task at a time. That process stopped straight away, but 
control didn't return to me until 7s after the 'boinc stop' command. That is, 
the first SIGTERM was obeyed, but this time the system didn't know until it 
sent the SIGKILL command, having apparently not seen any effect from the second 
SIGTERM. Does that mean the code needs longer between signals?

To test that I changed the intervals to SIGTERM/8/SIGTERM/6/SIGKILL/4, then 
started and stopped boinc. Its Asteroids@Home process stopped within about 6s, 
but control didn't return to me until 14s.

I deduce that the boinc management code is not reacting to signals properly.

> Even if it does, it's a concern that the timeout limit is being
> reached; it suggests that the boinc service isn't shutting down
> gracefully in response to a SIGTERM, even after 60 seconds,
> resulting in it needing to be forcefully terminated.

Well, it does seem so now, but until I started all this it was stopping on the 
second SIGTERM. I could spend hours on establishing definitely what's going on, 
but I hope it doesn't come to that - for one thing, I only have the two 
machines to test on: an i5 NUC and a Ryzen M9. At the moment I'm content that 
my settings are not going to be overwritten with every upgrade of sci-misc/
boinc.

Incidentally, I've been seeing "A new version of BOINC is available (8.0.2)." 
for some months in messages from the boinc manager.

*  'tail -f /var/lib/boinc/stdoutdae.txt' showed boinc exiting instantly, and 
gkrellm showed CPU use dropping to zero. It's hard to be definite about what   
/bin/top shows, as it only updates every 3s, gkrellm every 2s. That caveat 
applies to all the times I've mentioned in this thread.

-- 
Regards,
Peter.





  reply	other threads:[~2025-01-31 14:25 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-14 11:28 [gentoo-user] Protecting init.d files from auto-update Peter Humphrey
2025-01-14 12:01 ` Michael
2025-01-14 16:31   ` Peter Humphrey
2025-01-14 12:36 ` Arve Barsnes
2025-01-14 14:18 ` Michael Orlitzky
2025-01-14 16:28   ` Peter Humphrey
2025-01-14 16:53     ` Michael Orlitzky
2025-01-15 11:50       ` Peter Humphrey
2025-01-20 13:24         ` Peter Humphrey
2025-01-20 23:40           ` Alexis
2025-01-21 11:14             ` Peter Humphrey
2025-01-21 11:59               ` Alexis
2025-01-21 12:45                 ` Michael
2025-01-30 15:50                 ` Peter Humphrey
2025-01-30 15:47           ` Peter Humphrey
2025-01-31  2:53             ` Alexis
2025-01-31 14:24               ` Peter Humphrey [this message]
2025-01-31 14:34                 ` Peter Humphrey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=23817797.6Emhk5qWAg@cube \
    --to=peter@prh.myzen.co.uk \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox