POV-Ray : Newsgroups : povray.off-topic : Re: Tales from a Renderfarm : Re: Tales from a Renderfarm Server Time
30 Apr 2024 05:08:47 EDT (-0400)
  Re: Tales from a Renderfarm  
From: dick balaska
Date: 30 Sep 2018 06:33:24
Message: <5bb0a674$1@news.povray.org>
On 09/21/2018 02:08 AM, Le Forgeron wrote:

>>
> violent shutdown for reboot have a trend to leave some files behind them
> which make the system believe the process is already running.
> 
> Typical wtf:
> 1. the start process write the psid in a file
> 2. on clean shutdown, file with psid is deleted
> 3. system upgrades cleanly stop all processes before restart (see 2)
> 4. on power-reboot, file with psid exist, so the system is happy and do
> nothing.
> 
> The basic solution is that the psid in the file should also be checked
> to see:
> 1. Is such psid currently in use (does the process exist)
> 2. Is such process matching the command that is associated with the file
> (collisions on psid can occurs, there is only 65535 id, and they get
> reused)
> 
> Especially after a power-reboot, in which more processes are forked at
> start to check the disks, so another service can now use the psid logged
> in the file in the previous session.
> 
> When you forget point 2, you get problem, randomly.

This was the problem, but sideways.
For about 6 years, Debian mounts /var/run as a tmpfs so it is always
empty on boot.  This was done specifically to solve the problem you mention.
On install, I created /var/run/bsac (chown bsac:bsac) because I can't
write to root owned /var/run. The solution was to check for
/var/run/bsac at service startup and create as needed.


-- 
dik
Rendered 1024 of 921600 pixels (0%)


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.