View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000063 | Pgpool-II | Bug | public | 2013-06-27 21:21 | 2013-06-30 17:19 |
| Reporter | harukat | Assigned To | t-ishii | ||
| Priority | high | Severity | crash | Reproducibility | always |
| Status | resolved | Resolution | open | ||
| Summary | 0000063: Child process was terminated by segmentation fault with memcached | ||||
| Description | Child process was terminated by segmentation fault when a client repeat a prepared statement execution with large response. | ||||
| Steps To Reproduce | I can reproduce this issue in following condition. * pgpool-II 3.2 STABLE 2013/6/27 snapshot * PostgreSQL 9.1.9 * JDBC client program (uploaded) pgpool.conf: * backend0 only * memory_cache_enabled = on * memqcache_method = 'memcached' * memqcache_maxcache = 819200 | ||||
| Additional Information | upload * gstack * valgrid log * java reproduce program | ||||
| Tags | No tags attached. | ||||
|
|
|
|
|
we can prevent this crash by the following fix. $ diff -c ./pool_memqcache.c.ORG ./pool_memqcache.c *** ./pool_memqcache.c.ORG 2013-06-28 11:31:51.397073076 +0900 --- ./pool_memqcache.c 2013-06-28 11:33:58.621054796 +0900 *************** *** 2622,2628 **** pool_discard_buffer(temp_cache->buffer); if (temp_cache->oids) pool_discard_buffer(temp_cache->oids); ! free(temp_cache); } /* --- 2622,2628 ---- pool_discard_buffer(temp_cache->buffer); if (temp_cache->oids) pool_discard_buffer(temp_cache->oids); ! // free(temp_cache); // insincere temporary fix } /* |
|
|
a little more proper fix. $ diff -c pool_memqcache.c.ORG . /pool_memqcache.c *** pool_memqcache.c.ORG 2013-06-28 11:31:51.397073076 +0900 --- ./pool_memqcache.c 2013-06-28 11:49:34.924047711 +0900 *************** *** 2965,2970 **** --- 2965,2973 ---- cache = pool_get_current_cache(); pool_discard_temp_query_cache(cache); + if (cache) { + session_context->query_context->temp_cache = NULL; + } // more proper fix } /* * Otherwise add to the temp cache array. |
|
|
Thanks for the test case. It seems the segfault occurs when: - extended protocol mode - query cache is not created because the SELECT results are tool large - same portal(prepared statement) is used Fix committed in master and 3.2-stable tree. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2013-06-27 21:21 | harukat | New Issue | |
| 2013-06-27 21:21 | harukat | File Added: pgpool2bugreport20130627.zip | |
| 2013-06-28 11:34 | harukat | Note Added: 0000297 | |
| 2013-06-28 11:49 | harukat | Note Added: 0000298 | |
| 2013-06-28 12:57 | t-ishii | Assigned To | => t-ishii |
| 2013-06-28 12:57 | t-ishii | Status | new => assigned |
| 2013-06-30 17:18 | t-ishii | Note Added: 0000299 | |
| 2013-06-30 17:19 | t-ishii | Status | assigned => resolved |