On Mon, Sep 14, 2015 at 03:45:12PM +0200, Jakub Hrozek wrote:
From 7e4ec4a744c5714cb7d6c9a22646d5635e8da0c8 Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik lslebodn@redhat.com Date: Thu, 10 Sep 2015 10:42:02 +0200 Subject: [PATCH] dyndns-tests: Simulate job in wrapped execv
The function be_nsupdate_send fork a child for execution of the utility nsupdate.
The child process builds nsupdate args in the function be_nsupdate_args and then execute the utility.
Meanwhile the parent process register handlers for child and timeout for canceling the long lasting child. nsupdate_child_send -> child_handler_setup
You can see in following log file that the wrapped version of execv function might be very fast and therefore parent can register handlers after finishing child. This is a reason why there is a child timeout.
(10:18:48:556001 2015) [sssd] [be_nsupdate_args] (0x0200): nsupdate auth type: GSS-TSIG (10:18:48:556126 2015) [sssd] [__wrap_execv] (0x0200): nsupdate success test case (10:18:48:556200 2015) [sssd] [__wrap_execv] (0x1000): Child exiting with status 0 (10:18:48:557218 2015) [sssd] [child_handler_setup] (0x2000): Setting up signal handler up for pid [3957] (10:18:48:560987 2015) [sssd] [child_handler_setup] (0x2000): Signal handler set up for pid [3957] (10:18:50:608520 2015) [sssd] [nsupdate_child_timeout] (0x0020): Timeout reached for dynamic DNS update (10:18:50:681525 2015) [sssd] [be_nsupdate_done] (0x0040): nsupdate child execution failed [1432158233]: Dynamic DNS update timed out (10:18:50:687031 2015) [sssd] [dyndns_test_ok] (0x1000): Child request returned [1432158233]: Unknown error 1432158233
The patch simulate a work in wrapped function with small delay. It should be enough time for the parent process to registering a child.
Based on patch from Jurica Stanojkovic jurica.stanojkovic@rt-rk.com Thank you.
I never could reproduce the failures myself, but this patch is obviously not harmful and both you and Jurica confirmed it helps, so fine, ACK.
* master: b3074dca3acebd91437ef13d3329d6d65d655215