View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000269 | Pgpool-II | Bug | public | 2016-12-14 12:04 | 2017-05-18 17:48 |
| Reporter | nagata | Assigned To | nagata | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | resolved | Resolution | open | ||
| Product Version | 3.5.5 | ||||
| Fixed in Version | 3.5.6 | ||||
| Summary | 0000269: authentication timeout with connection_life_time | ||||
| Description | When connection_life_time is enabled, "authentication timeout" can occur right after a client connects to Pgpool-II. SIGALRM signal is used for both connection_life_time and authentication_timeout. Usually, SIGALRM is for connection_life_time, but when the new connection is arrive, read_startup_packet() is called, and the handler for authentication_timeout is set bu pool_signal() and alarm(authentication_timeout) is called in enable_authentication_timeout(). However, if connection_life_time is expired *between pool_signal() and alarm()*, authenticate_timeout() will be called when connection_life_time is expired instead of pool_backend_timer_handler(). The attached simple patch will fix the bug, but there may be better way to handle SIGALRM more carefully. | ||||
| Steps To Reproduce | To reproduce this, apply the following patch; --- a/src/protocol/child.c +++ b/src/protocol/child.c @@ -1026,6 +1026,7 @@ static void enable_authentication_timeout(void) if(pool_config->authentication_timeout <= 0) return; pool_signal(SIGALRM, authentication_timeout); + sleep(3); /* connection_life_time could be expired here */ alarm(pool_config->authentication_timeout); alarm_enabled = true; } configure pgpool.conf as below; num_init_children = 1 max_pool = 1 connection_life_time = 1 and connect to pgpool-II repeatedly. $ psql test -c "select 1" > /dev/null $ psql test -c "select 1" > /dev/null ... $ psql test -c "select 1" > /dev/null psql: server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. | ||||
| Tags | No tags attached. | ||||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2016-12-14 12:04 | nagata | New Issue | |
| 2016-12-14 12:04 | nagata | File Added: authencitation_timeout.patch | |
| 2016-12-14 12:09 | nagata | Description Updated | |
| 2016-12-14 12:10 | nagata | Steps to Reproduce Updated | |
| 2016-12-20 09:31 | t-ishii | Assigned To | => nagata |
| 2016-12-20 09:31 | t-ishii | Status | new => assigned |
| 2017-05-18 17:48 | t-ishii | Status | assigned => resolved |
| 2017-05-18 17:48 | t-ishii | Fixed in Version | => 3.5.6 |