/mandos/release

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/release

  • Committer: Teddy Hogeborn
  • Date: 2015-05-23 20:18:34 UTC
  • mto: (237.7.304 trunk)
  • Revision ID: teddy@recompile.se-20150523201834-e89ex4ito93yni8x
mandos: Use multiprocessing module to run checkers.

For a long time, the Mandos server has occasionally logged the message
"ERROR: Child process vanished".  This was never a fatal error, but it
has been annoying and slightly worrying, since a definite cause was
not found.  One potential cause could be the "multiprocessing" and
"subprocess" modules conflicting w.r.t. SIGCHLD.  To avoid this,
change the running of checkers from using subprocess.Popen
asynchronously to instead first create a multiprocessing.Process()
(which is asynchronous) calling a function, and have that function
then call subprocess.call() (which is synchronous).  In this way, the
only thing using any asynchronous subprocesses is the multiprocessing
module.

This makes it necessary to change one small thing in the D-Bus API,
since the subprocesses.call() function does not expose the raw wait(2)
status value.

DBUS-API (CheckerCompleted): Change the second value provided by this
                             D-Bus signal from the raw wait(2) status
                             to the actual terminating signal number.
mandos (subprocess_call_pipe): New function to be called by
                               multiprocessing.Process (starting a
                               separate process).
(Client.last_checker signal): New attribute for signal which
                              terminated last checker.  Like
                              last_checker_status, only not accessible
                              via D-Bus.
(Client.checker_callback): Take new "connection" argument and use it
                           to get returncode; set last_checker_signal.
                           Return False so gobject does not call this
                           callback again.
(Client.start_checker): Start checker using a multiprocessing.Process
                        instead of a subprocess.Popen.
(ClientDBus.checker_callback): Take new "connection" argument.        Call
                               Client.checker_callback early to have
                               it set last_checker_status and
                               last_checker_signal; use those.  Change
                               second value provided to D-Bus signal
                               CheckerCompleted to use
                               last_checker_signal if checker was
                               terminated by signal.
mandos-monitor: Update to reflect DBus API change.
(MandosClientWidget.checker_completed): Take "signal" instead of
                                        "condition" argument.  Use it
                                        accordingly.  Remove dead code
                                        (os.WCOREDUMP case).
Filename Latest Rev Last Changed Committer Comment Size
..
po 199 16 years ago Teddy Hogeborn * Makefile: Bug fix: fix syntax error. * debian/c Diff
source 237.2.216 14 years ago Teddy Hogeborn * debian/source/format: New; contains "3.0 (quilt) Diff
upstream 237.7.226 10 years ago Teddy Hogeborn Fix location and format of signing key file. * de Diff
changelog 324 10 years ago Teddy Hogeborn * Makefile (version): Changed to "1.6.9". * NEWS ( 17.3 KB Diff Download File
compat 237.7.174 11 years ago Teddy Hogeborn * Makefile (CFLAGS, LDFLAGS): Keep default flags f 2 bytes Diff Download File
control 237.7.285 10 years ago Teddy Hogeborn Update Debian package standards version to 3.9.6. 2.7 KB Diff Download File
copyright 237.7.207 10 years ago Teddy Hogeborn * debian/copyright: Change year to "2014". * mando 1 KB Diff Download File
mandos-client.dirs 237.2.65 15 years ago Teddy Hogeborn * Makefile (install-client-nokey): Move "initramfs 147 bytes Diff Download File
mandos-client.docs 237.7.142 12 years ago Teddy Hogeborn * debian/copyright (Copyright): Join the two lines 17 bytes Diff Download File
mandos-client.examples 237.7.142 12 years ago Teddy Hogeborn * debian/copyright (Copyright): Join the two lines 16 bytes Diff Download File
mandos-client.links 191 16 years ago Teddy Hogeborn * debian/mandos-client.docs: New. Add README and 93 bytes Diff Download File
mandos-client.lintian-overrides 237.7.200 10 years ago Teddy Hogeborn Bug fix from libdir change: make plugins get setui 1.4 KB Diff Download File
mandos-client.postinst 237.11.13 13 years ago Teddy Hogeborn Miscellaneous fixes prompted by lintian: * debian 2 KB Diff Download File
mandos-client.postrm 237.11.13 13 years ago Teddy Hogeborn Miscellaneous fixes prompted by lintian: * debian 1.2 KB Diff Download File
mandos-client.README.Debian 237.7.189 11 years ago Teddy Hogeborn Doc fix: Refer to architecture libdir. * debian/m 4 KB Diff Download File
mandos.dirs 237.7.187 11 years ago Teddy Hogeborn Bug fix: Make sure systemd service file is install 124 bytes Diff Download File
mandos.docs 237.2.186 14 years ago Teddy Hogeborn Documentation changes: * DBUS-API: New file docum 26 bytes Diff Download File
mandos.lintian-overrides 221 16 years ago Teddy Hogeborn * debian/changelog: New Debian revision. * debian 203 bytes Diff Download File
mandos.postinst 237.7.238 10 years ago Teddy Hogeborn Fix typo in code comment. * debian/mandos.postins 1.8 KB Diff Download File
mandos.prerm 237.11.13 13 years ago Teddy Hogeborn Miscellaneous fixes prompted by lintian: * debian 875 bytes Diff Download File
mandos.README.Debian 237.11.2 13 years ago Teddy Hogeborn Change "fukt.bsnet.se" to "recompile.se" throughou 445 bytes Diff Download File
File rules 237.7.231 10 years ago Teddy Hogeborn Do not run self-tests when building arch-indep Deb 918 bytes Diff Download File
watch 237.7.202 10 years ago Teddy Hogeborn Fix running of self-tests. * debian/control (Buil 132 bytes Diff Download File