You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "James E. King, III (JIRA)" <ji...@apache.org> on 2018/03/15 19:31:00 UTC

[jira] [Comment Edited] (THRIFT-4515) Gracefully shutdown cross-test servers to fully test teardown

    [ https://issues.apache.org/jira/browse/THRIFT-4515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16400437#comment-16400437 ] 

James E. King, III edited comment on THRIFT-4515 at 3/15/18 7:30 PM:
---------------------------------------------------------------------

So far I have:
 * Teach C++ TestServer to ignore SIGPIPE, which allows it to exit gracefully for SSL based tests.
 * Have C++ TestServer block on a mutex in steady state.  When unblocked, it will stop the server.
 * Fixed the cpp TestServer to handle SIGINT, and unblock the mutex.
 * Set the minimum required python version for cross testing to 3.3, because 3.3 includes subprocess.wait(timeout=n)
 * Have the cross test attempt to wait for server process to end gracefully on SIGINT. 
 * If the wait for server process times out (2 seconds), it is killed (SIGKILL); killing the server is now a cross test error as it means the server didn't stop gracefully.
 * Teach D test server to handle SIGINT and gracefully stop.
 * Add autoconf ax_check_enable_debug to the build process and add appropriate DFLAGS for dlang debug builds to work.

Working through the test suite now to find any issues this uncovered.


was (Author: jking3):
So far I have:
 * Teach C++ TestServer to ignore SIGPIPE, which allows it to exit gracefully for SSL based tests.
 * Have C++ TestServer block on a mutex in steady state.  When unblocked, it will stop the server.
 * Fixed the cpp TestServer to handle SIGINT, and unblock the mutex.
 * Set the minimum required python version for cross testing to 3.3, because 3.3 includes subprocess.wait(timeout=n)
 * Have the cross test attempt to wait for server process to end gracefully on SIGINT. 
 * If the wait for server process times out (2 seconds), it is killed (SIGKILL); killing the server is now a cross test error as it means the server didn't stop gracefully.

Working through the test suite now to find any issues this uncovered.

> Gracefully shutdown cross-test servers to fully test teardown
> -------------------------------------------------------------
>
>                 Key: THRIFT-4515
>                 URL: https://issues.apache.org/jira/browse/THRIFT-4515
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Test Suite
>    Affects Versions: 0.11.0
>            Reporter: James E. King, III
>            Assignee: James E. King, III
>            Priority: Major
>
> The cross test suite kills the server process after the client is done, see test/crosstest/run.py:_scoped, the process is killed. In the C++ TestServer code at the end of main it sits in a TIGHT while loop unnecessarily causing CPU usage and slowing down the system.
> There should be a signal (like SIGINT) that each server waits for, and on receiving that signal stops the thrift server cleanly.  This ensures we properly test teardown.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)