View Issue Details

IDProjectCategoryView StatusLast Update
0000051Pgpool-IIBugpublic2013-03-15 20:40
Reporterandreas Assigned Tot-ishii  
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionopen 
OSLinux x86_64OS Version3.7.9 
Summary0000051: pgpool crashes on DDL statements
DescriptionWhen sending a few DDL statements pgpool segfaults.
Tested and reproduced for versions 3.1-3.2.3
Steps To ReproduceQueries in attached log should suffice.
Additional Informationpostgresql-9.2.3

Also reproduced on a debian system
TagsNo tags attached.

Activities

andreas

2013-03-05 01:04

reporter  

pgpool-log (9,049 bytes)   
pgpool-log (9,049 bytes)   

t-ishii

2013-03-05 08:24

developer   ~0000233

To make sure what series of DDLs causes the problem, can you please attach the DDLs, rather than pgpool log file.

andreas

2013-03-06 23:37

reporter   ~0000235

Sorry, I made a wrong presumption.
I thought the crash was because of the DDLs since it always occurred on DB migration.
I tried exporting the DDLs and ran them with psql, but couldn't reproduce the crash that way.

I'm currently debugging, so far I at least have a stacktrace for you:
#0 pool_memory_alloc (pool=0x23fbad0, size=size@entry=32) at pool_memory.c:99
0000001 0x0000000000470443 in pool_memory_alloc_zero (pool=<optimized out>, size=size@entry=32) at pool_memory.c:144
0000002 0x0000000000445541 in rewrite_timestamp (backend=backend@entry=0x23e6670, node=node@entry=0x2417958, rewrite_to_params=0 '\000', message=message@entry=0x23fbc38) at pool_timestamp.c:620
0000003 0x000000000044c46d in Parse (frontend=frontend@entry=0x23f3050, backend=backend@entry=0x23e6670, len=459, contents=<optimized out>, contents@entry=0x2402190 "") at pool_proto_modules.c:1024
0000004 0x000000000044cbd0 in ProcessFrontendResponse (frontend=frontend@entry=0x23f3050, backend=backend@entry=0x23e6670) at pool_proto_modules.c:2475
0000005 0x00000000004195a7 in pool_process_query (frontend=frontend@entry=0x23f3050, backend=backend@entry=0x23e6670, reset_request=reset_request@entry=0) at pool_process_query.c:231
0000006 0x000000000040b4ef in do_child (unix_fd=unix_fd@entry=5, inet_fd=inet_fd@entry=6) at child.c:371
0000007 0x0000000000404e1c in fork_a_child (unix_fd=5, inet_fd=6, id=id@entry=62) at main.c:1243
0000008 0x0000000000407f4d in main (argc=<optimized out>, argv=<optimized out>) at main.c:661

andreas

2013-03-07 00:09

reporter  

pgpool.conf (24,909 bytes)

andreas

2013-03-07 00:11

reporter  

andreas

2013-03-07 00:12

reporter  

andreas

2013-03-07 00:14

reporter   ~0000236

conf, coredump and binary attached

andreas

2013-03-07 00:58

reporter  

pgpool.log.xz (7,024 bytes)

andreas

2013-03-07 00:59

reporter  

statements.sql (10,366 bytes)   
statements.sql (10,366 bytes)   

andreas

2013-03-07 01:00

reporter   ~0000237

tried extracting all statements from the verbose log, but pgpool probably crashes before the last statement is logged

t-ishii

2013-03-14 20:23

developer   ~0000243

A user from pgpool comunity in Japan found a bug which might be related to your problem. According to him, the bug is triggered by 1) replication mode 2) queries are using now() or current_timestamp things which envoke time stamp rewriting code. It seems the backtrace includes rewirte_timestamp() call and I suspect yours is the case. Can you please try attached patch? It was created by the user.

t-ishii

2013-03-14 20:24

developer  

pool_proto_modules.patch (601 bytes)   
pool_proto_modules.patch (601 bytes)   

andreas

2013-03-15 03:37

reporter   ~0000244

Thank you, the first tests were successful.
I'm going to do more testing tomorrow.
(Applied against 3.2.3)

andreas

2013-03-15 19:24

reporter   ~0000247

Can't reproduce the crash with the patch applied :)

t-ishii

2013-03-15 20:39

developer   ~0000248

Glad to hear that! Will commit to master and 3.x-stable branches.

Issue History

Date Modified Username Field Change
2013-03-05 01:04 andreas New Issue
2013-03-05 01:04 andreas File Added: pgpool-log
2013-03-05 08:24 t-ishii Note Added: 0000233
2013-03-06 23:37 andreas Note Added: 0000235
2013-03-07 00:09 andreas File Added: pgpool.conf
2013-03-07 00:11 andreas File Added: core.pgpool.2987.vm-lbl.1362579912.xz
2013-03-07 00:12 andreas File Added: pgpool-ii-3.2.3-1-x86_64.pkg.tar.xz
2013-03-07 00:14 andreas Note Added: 0000236
2013-03-07 00:58 andreas File Added: pgpool.log.xz
2013-03-07 00:59 andreas File Added: statements.sql
2013-03-07 01:00 andreas Note Added: 0000237
2013-03-14 20:23 t-ishii Note Added: 0000243
2013-03-14 20:24 t-ishii File Added: pool_proto_modules.patch
2013-03-15 03:37 andreas Note Added: 0000244
2013-03-15 07:30 t-ishii Assigned To => t-ishii
2013-03-15 07:30 t-ishii Status new => assigned
2013-03-15 19:24 andreas Note Added: 0000247
2013-03-15 20:39 t-ishii Note Added: 0000248
2013-03-15 20:40 t-ishii Status assigned => resolved