[Pkg-stud-maintainers] Bug#725797: Bug#725797: stud: Fix failure to run stud restart
Louis Bouchard
louis.bouchard at canonical.com
Sat Oct 12 07:15:04 UTC 2013
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
Le 11/10/2013 22:55, Vincent Bernat a écrit :
>
> It has been some time since I run stud. I just tried and I notice
> that I have a parent process that is supervising childrens and
> restarting them when they die. And the PID registered works as
> expected:
>
> ├─stud(3933)─┬─stud(3950) │ ├─stud(3951) │
> ├─stud(3952) │ └─stud(3953)
>
> $ cat /var/run/stud.take1.conf.pid 3933
>
> I don't understand why this is not your case.
>
It is my case; there is a PID file for each stud configuration
started. The problem is that, when using --pidfile option,
start-stop-daemon only sends the TERM signal to the parent process
then returns. This happens fast enough for the do_start to be executed
before the children processes have time to terminate.
This causes the port used by stud to be busy when do_start executes in
the 'restart' sequence so stud do not get restarted correctly. Using
- --pidfile also make the --retry option to be active only on the parent
process and not on the children.
It is easy to confirm the statement by adding a lsof -i
@127.0.0.1:8445 in the do_start function, just before
start-stop-daemon gets executed. The stud children are still present.
Removing --pidfile in do_stop's start-stop-daemon forces it to ack on
the parent process and all the children process and makes --retry wait
for termination of all of them.
So in short, when using --pidfile, it only acts on the parent process
and do not wait for the children to terminate.
Kind regards,
...Louis
- --
Louis Bouchard
Software engineer, Cloud & Sustaining eng.
Canonical Ltd
Ubuntu support: http://canonical.com/support
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iEYEARECAAYFAlJY9vMACgkQDvqokHrhnCybxwCdFl0qy91t9oDgsCkssyhO1EDj
vT0AoJpDMDG4JgNylRol7nUxcHN0k0/u
=8fYD
-----END PGP SIGNATURE-----
More information about the Pkg-stud-maintainers
mailing list