[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-ha-dev
Subject:    Re: [Linux-ha-dev] heartbeat is killing system logger...
From:       Lars Marowsky-Bree <lmb () suse ! de>
Date:       2003-04-08 16:00:21
[Download RAW message or body]

On 2003-04-08T09:57:40,
   lee leahu <lee@ricis.com> said:

OK, I've dug in a bit.

heartbeat has two paths for shutting down and taking it's process group with
itself:

hb_emergency_shutdown() uses CL_KILL(-getpgrp(), SIGTERM);. This signals
SIGTERM to all processes in heartbeat's own process group.

FinalCPShutdown() however uses CL_KILL(-getpid(), SIGTERM), as does
heartbeat_restart(). This seems dangerous.

hb_kill_tracked_process() also directly kills the PID of the tracked process
even for a process group, I think it ought to call getpgid(pid) on that PID
first.

The setpgid() call in heartbeat.c is also not checked; it could,
theoretically, also fail, in which case subsequent kills to the process group
might be misdirected.

However, I'm unsure whether any of these theoretical problems could lead to
the behaviour described.

I've got to run now, maybe Alan or horms (our signal expert ;) can comment?


Sincerely,
    Lars Marowsky-Brée <lmb@suse.de>

-- 
SuSE Labs - Research & Development, SuSE Linux AG
  
"If anything can go wrong, it will." "Chance favors the prepared (mind)."
  -- Capt. Edward A. Murphy            -- Louis Pasteur
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.community.tummy.com
http://lists.community.tummy.com/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic