- 
Committer:
Teddy Hogeborn
- 
Date:
2015-05-23 20:18:34 UTC
- 
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).
 
 
|  .. | 
|  .bzr-builddeb | 185 | 17 years ago | Teddy Hogeborn | * .bzr-builddeb/default.conf: New.
* Makefile (in |  |   |  | 
|  debian | 185 | 17 years ago | Teddy Hogeborn | * .bzr-builddeb/default.conf: New.
* Makefile (in |  |   |  | 
|  network-hooks.d | 505.3.10 | 13 years ago | Teddy Hogeborn | * network-hooks.d: New directory.
* network-hooks. |  |   |  | 
|  plugins.d | 13 | 17 years ago | Björn Påhlsson | Added following support:
Pluginbased client handle |  |   |  | 
|  .bzrignore | 585 | 13 years ago | Teddy Hogeborn | * .bzrignore (statedir): Added. | 188 bytes |   |   | 
|  clients.conf | 609 | 13 years ago | Teddy Hogeborn | * clients.conf: Convert all time intervals to new | 3.1 KB |   |   | 
|  common.ent | 237.4.55 | 11 years ago | Teddy Hogeborn | * Makefile (version): Changed to "1.6.9".
* NEWS ( | 93 bytes |   |   | 
|  COPYING | 24.1.51 | 17 years ago | Björn Påhlsson | Added configuration files support for mandos-clien | 34.2 KB |   |   | 
|  DBUS-API | 749.1.1 | 10 years ago | Teddy Hogeborn | mandos: Use multiprocessing module to run checkers | 6.6 KB |   |   | 
|  dbus-mandos.conf | 24.1.186 | 14 years ago | Björn Påhlsson | transitional stuff actually working
documented cha | 820 bytes |   |   | 
|  default-mandos | 185 | 17 years ago | Teddy Hogeborn | * .bzr-builddeb/default.conf: New.
* Makefile (in | 174 bytes |   |   | 
|  init.d-mandos | 648 | 11 years ago | Teddy Hogeborn | Update init script to modern standards.
* init.d- | 4.3 KB |   |   | 
|  initramfs-tools-hook | 717 | 11 years ago | Teddy Hogeborn | mandos-client: Fix bug with GPGME 1.5.0.
* initra | 6.2 KB |   |   | 
|  initramfs-tools-hook-conf | 237.2.19 | 16 years ago | Teddy Hogeborn | * initramfs-tools-hook-conf: Security bug fix: Add | 407 bytes |   |   | 
|  initramfs-tools-script | 487 | 14 years ago | Teddy Hogeborn | * initramfs-tools-script: Abort if plugin-runner i | 3.6 KB |   |   | 
|  initramfs-unpack | 624 | 12 years ago | Teddy Hogeborn | * initramfs-unpack: Bug fix: Made executable. | 2.2 KB |   |   | 
|  INSTALL | 723.1.1 | 11 years ago | Teddy Hogeborn | Require Python 2.7.
This is in preparation for th | 5.3 KB |   |   | 
|  intro.xml | 742 | 10 years ago | Teddy Hogeborn | Add ":!RSA" to GnuTLS priority string, to disallow | 15.9 KB |   |   | 
|  legalnotice.xml | 174 | 17 years ago | Teddy Hogeborn | * legalnotice.xml: Copy DocBook 4.4-formatted text | 1 KB |   |   | 
|  Makefile | 237.4.55 | 11 years ago | Teddy Hogeborn | * Makefile (version): Changed to "1.6.9".
* NEWS ( | 16.1 KB |   |   | 
|  mandos | 749.1.1 | 10 years ago | Teddy Hogeborn | mandos: Use multiprocessing module to run checkers | 116 KB |   |   | 
|  mandos-clients.conf.xml | 708 | 11 years ago | Teddy Hogeborn | mandos-keygen: Generate "checker" option to use SS | 18.5 KB |   |   | 
|  mandos-ctl | 745 | 10 years ago | Teddy Hogeborn | mandos-ctl: Do minor formatting and whitespace adj | 18.4 KB |   |   | 
|  mandos-ctl.xml | 608 | 13 years ago | Teddy Hogeborn | * Makefile (check): Also check mandos-ctl.
* mando | 16.3 KB |   |   | 
|  mandos-keygen | 748 | 10 years ago | Teddy Hogeborn | mandos-keygen: Update copyright year. | 10.5 KB |   |   | 
|  mandos-keygen.xml | 708 | 11 years ago | Teddy Hogeborn | mandos-keygen: Generate "checker" option to use SS | 15.2 KB |   |   | 
|  mandos-monitor | 749.1.1 | 10 years ago | Teddy Hogeborn | mandos: Use multiprocessing module to run checkers | 29.6 KB |   |   | 
|  mandos-monitor.xml | 713 | 11 years ago | Teddy Hogeborn | mandos-monitor: New "verbose" mode to see less imp | 6.1 KB |   |   | 
|  mandos-options.xml | 742 | 10 years ago | Teddy Hogeborn | Add ":!RSA" to GnuTLS priority string, to disallow | 5.4 KB |   |   | 
|  mandos.conf | 744 | 10 years ago | Teddy Hogeborn | Add "!RSA" also to examples/documentation.
* mand | 1.6 KB |   |   | 
|  mandos.conf.xml | 744 | 10 years ago | Teddy Hogeborn | Add "!RSA" also to examples/documentation.
* mand | 8.7 KB |   |   | 
|  mandos.lsm | 237.4.55 | 11 years ago | Teddy Hogeborn | * Makefile (version): Changed to "1.6.9".
* NEWS ( | 906 bytes |   |   | 
|  mandos.service | 734 | 11 years ago | Teddy Hogeborn | * mandos.service ([Unit]/Documentation): New. | 708 bytes |   |   | 
|  mandos.xml | 741 | 10 years ago | Teddy Hogeborn | mandos.xml (SEE ALSO): Update links.
Update link | 23.7 KB |   |   | 
|  NEWS | 237.4.55 | 11 years ago | Teddy Hogeborn | * Makefile (version): Changed to "1.6.9".
* NEWS ( | 12.5 KB |   |   | 
|  overview.xml | 183 | 17 years ago | Teddy Hogeborn | * Makefile (install-client-nokey): Do "&&" instead | 926 bytes |   |   | 
|  plugin-runner.c | 716 | 11 years ago | Teddy Hogeborn | plugin-runner: Bug Fix: Fix some memory leaks.
* | 35.6 KB |   |   | 
|  plugin-runner.conf | 342 | 16 years ago | Teddy Hogeborn | * initramfs-tools-hook: Bug fix: Add "--userid" an | 380 bytes |   |   | 
|  plugin-runner.xml | 544 | 13 years ago | Teddy Hogeborn | Updated year in copyright notices. | 20.5 KB |   |   | 
|  README | 550 | 13 years ago | Teddy Hogeborn | * README: Hint that the intro(8mandos) manual page | 409 bytes |   |   | 
|  TODO | 747 | 10 years ago | Teddy Hogeborn | mandos-keygen: Bug fix: Only use one SSH key from | 5.5 KB |   |   |