[Openswan dev] [PATCH] Fix race condition between pluto start and whack
D. Hugh Redelmeier
hugh at mimosa.com
Fri Apr 8 02:23:25 EDT 2011
| From: Mattias Walstrom <lazzer at vmlinux.org>
| Fix race condition between pluto start and whack, which can result in
| pluto becoming a zombie that never returns.
Do you really mean "zombie"? A zombie is a process that has exited
but hasn't been reaped by its parent. If pluto is running as a
daemon, init should reap it.
Are you running pluto with --nofork?
| When sending any whack message during the time pluto starts, whack will
| just hang for a long time. And if pluto should die during this hang, it
| will become a Zombie.
I don't understand this. Why would a pending message cause Pluto to
become a Zombie? This should not affect the ability of a parent
process (init or otherwise) to reap it.
| This patch makes sure that we do not open the ctl
| socket until we actually can receive messages (all pluto initialization
| is done).
The code has a comment explaining why the socket is created where it
is. I no longer am certain, but I think the idea was that once a
startup script had executed "pluto", it was safe to assume that the
socket was created. After your change, this is no longer true.
More information about the Dev
mailing list