[Pgpool-general] segfault after 2.2.2 version

simone.tregnago at simplernet.org simone.tregnago at simplernet.org
Fri Dec 10 10:33:02 UTC 2010


Hi all again,
sorry, isn't there anyone who could help me to solve the bug reported below?
Tatsuo?

Thanks again,
Simone

----------

Hi all,
last week I've tried to upgrade from pgpool 2.2.2 to 2.3.3, but all the 
versions
after the 2.2.2 crashes with a segfault error.
Note that the ERP that queries pgpool already rose a segfault error with 
the 2.2 version,
solved by Tatsuo in May 2009: 
http://pgfoundry.org/pipermail/pgpool-general/2009-May/001861.html.

This time the error is raised in pool_proto_modules.c
Here's the stack trace:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fdead88f700 (LWP 16797)]
0x00007fdeac79f401 in strncpy () from /lib/libc.so.6

backtrace:
#0  0x00007fdeac79f401 in strncpy () from /lib/libc.so.6
#1  0x000000000043ff5d in Execute (frontend=0x1ec44c0, backend=0x1eb78b0)
      at pool_proto_modules.c:828
#2  0x00000000004420b4 in ProcessFrontendResponse (frontend=0x1ec44c0, 
backend=0x1eb78b0)
      at pool_proto_modules.c:1797
#3  0x0000000000417a9d in pool_process_query (frontend=0x1ec44c0, 
backend=0x1eb78b0,
      reset_request=0) at pool_process_query.c:349
#4  0x00000000004093b7 in do_child (unix_fd=3, inet_fd=4) at child.c:403
#5  0x000000000040479a in fork_a_child (unix_fd=3, inet_fd=4, id=0) at 
main.c:946
#6  0x00000000004062d6 in main (argc=<value optimized out>, argv=<value 
optimized out>)
      at main.c:466


I've added two messages to the Execute function to see who was the bad 
pointer, and from the log below you can see that string1 is null

2010-11-23 23:12:48 DEBUG: pid 17996: statement2: PREPARE "ARCO1" 
(int4,int4,int4,int4,text,int4,text,text,text,text,int4) AS UPDATE 
ZSTATUS SET "IDSTATUS"=$1, "CODPROCESS"=$2, "IDUTENTE"=$3, 
"LASTEVENTD"=$4, "YEAR"=$5, "ID_UTENTE"=$6, "COD_FRAME"=$7, "INDICE"=$8, 
"COD_WINDOW"=$9, "WIN_TITLE"=$10, "IDRECORD"=$11 WHERE "IDSTATUS" = 26315
2010-11-23 23:12:48 DEBUG: pid 17996: do_command: Query: BEGIN
2010-11-23 23:12:48 DEBUG: pid 17996: wait_for_query_response: waiting 
for backend 0 completing the query
2010-11-23 23:12:48 DEBUG: pid 17996: detect_error: kind: C
2010-11-23 23:12:48 DEBUG: pid 17996: do_command: kind: C
2010-11-23 23:12:48 DEBUG: pid 17996: do_command: kind: Z
2010-11-23 23:12:48 DEBUG: pid 17996: do_command: transaction state: T
2010-11-23 23:12:48 DEBUG: pid 17996: do_command: Query: BEGIN
2010-11-23 23:12:48 DEBUG: pid 17996: wait_for_query_response: waiting 
for backend 1 completing the query
2010-11-23 23:12:48 DEBUG: pid 17996: detect_error: kind: C
2010-11-23 23:12:48 DEBUG: pid 17996: do_command: kind: C
2010-11-23 23:12:48 DEBUG: pid 17996: do_command: kind: Z
2010-11-23 23:12:48 DEBUG: pid 17996: do_command: transaction state: T
2010-11-23 23:12:48 DEBUG: pid 17996: wait_for_query_response: waiting 
for backend 0 completing the query
2010-11-23 23:12:48 DEBUG: pid 17996: wait_for_query_response: waiting 
for backend 1 completing the query
2010-11-23 23:12:48 DEBUG: pid 17996: read_kind_from_backend: read kind 
from 0 th backend C NUM_BACKENDS: 2
2010-11-23 23:12:48 DEBUG: pid 17996: read_kind_from_backend: read kind 
from 1 th backend C NUM_BACKENDS: 2
2010-11-23 23:12:48 DEBUG: pid 17996: pool_process_query: kind from 
backend: C
2010-11-23 23:12:48 DEBUG: pid 17996: read_kind_from_backend: read kind 
from 0 th backend Z NUM_BACKENDS: 2
2010-11-23 23:12:48 DEBUG: pid 17996: read_kind_from_backend: read kind 
from 1 th backend Z NUM_BACKENDS: 2
2010-11-23 23:12:48 DEBUG: pid 17996: pool_process_query: kind from 
backend: Z
2010-11-23 23:12:48 DEBUG: pid 17996: pool_read_message_length: slot: 0 
length: 5
2010-11-23 23:12:48 DEBUG: pid 17996: pool_read_message_length: slot: 1 
length: 5
2010-11-23 23:12:48 DEBUG: pid 17996: ReadyForQuery: message length: 5
2010-11-23 23:12:48 DEBUG: pid 17996: ReadyForQuery: transaction state: T
2010-11-23 23:12:48 DEBUG: pid 17996: do_command: Query: COMMIT
2010-11-23 23:12:48 DEBUG: pid 17996: wait_for_query_response: waiting 
for backend 1 completing the query
2010-11-23 23:12:48 DEBUG: pid 17996: detect_error: kind: C
2010-11-23 23:12:48 DEBUG: pid 17996: do_command: kind: C
2010-11-23 23:12:48 DEBUG: pid 17996: do_command: kind: Z
2010-11-23 23:12:48 DEBUG: pid 17996: do_command: Query: COMMIT
2010-11-23 23:12:48 DEBUG: pid 17996: wait_for_query_response: waiting 
for backend 0 completing the query
2010-11-23 23:12:48 DEBUG: pid 17996: detect_error: kind: C
2010-11-23 23:12:48 DEBUG: pid 17996: do_command: kind: C
2010-11-23 23:12:48 DEBUG: pid 17996: do_command: kind: Z
2010-11-23 23:12:48 DEBUG: pid 17996: pool_read_message_length: slot: 0 
length: 5
2010-11-23 23:12:48 DEBUG: pid 17996: pool_read_message_length: slot: 1 
length: 5
2010-11-23 23:12:48 DEBUG: pid 17996: ReadyForQuery: message length: 5
2010-11-23 23:12:48 DEBUG: pid 17996: ReadyForQuery: transaction state: I
2010-11-23 23:12:48 DEBUG: pid 17996: read kind from frontend B(42)
2010-11-23 23:12:48 DEBUG: pid 17996: bind message: portal_name 
stmt_name ARCO1
2010-11-23 23:12:48 DEBUG: pid 17996: read_kind_from_backend: read kind 
from 0 th backend 2 NUM_BACKENDS: 2
2010-11-23 23:12:48 DEBUG: pid 17996: read_kind_from_backend: read kind 
from 1 th backend 2 NUM_BACKENDS: 2
2010-11-23 23:12:48 DEBUG: pid 17996: read kind from frontend D(44)
2010-11-23 23:12:48 DEBUG: pid 17996: read_kind_from_backend: read kind 
from 0 th backend n NUM_BACKENDS: 2
2010-11-23 23:12:48 DEBUG: pid 17996: read_kind_from_backend: read kind 
from 1 th backend n NUM_BACKENDS: 2
2010-11-23 23:12:48 DEBUG: pid 17996: read kind from frontend E(45)
2010-11-23 23:12:48 DEBUG: pid 17996: Execute: portal name <>
2010-11-23 23:12:48 DEBUG: pid 17996: Execute: query: (null)
2010-11-23 23:12:48 DEBUG: pid 17996: SIMONE: string1 null


Attached is the diff with the log lines I've added to pool_proto_modules.c

Thanks
Simone

-- 
SIMPLER DI TREGNAGO SIMONE - www.simplernet.org
simone.tregnago at simplernet.org - PEC simpler at pec.simplernet.org
Via Trofarello 14, 10023 Chieri(TO)
Tel. +39 3408685071 Fax. +39 0115503536


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pool_proto_modules.c-diff
URL: <http://pgfoundry.org/pipermail/pgpool-general/attachments/20101210/1bd33853/attachment.ksh>


More information about the Pgpool-general mailing list