[pgpool-general: 4231] Re: pgpool segfault

Muhammad Usama m.usama at gmail.com
Fri Nov 20 21:51:46 JST 2015


Hi

Can you please try the attached patch if it fixes the crash because of
ERRORDATA_STACK_SIZE
exceeded.
Please note that the patch is generated against the V3_4_STABLE pgpool-II
branch.

Thanks
Best regards
Muhammad Usama


On Wed, Nov 18, 2015 at 5:48 PM, Ziyun Audrey Wang <ziyun.wang at ericsson.com>
wrote:

> Hi,
>
> Here is what I have now
>
>
> # gdb /usr/bin/pgpool core-pgpool-11-0-0-8096-1447690344
> GNU gdb (GDB) Red Hat Enterprise Linux (7.2-83.el6)
> Copyright (C) 2010 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <
> http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "x86_64-redhat-linux-gnu".
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/gdb/bugs/>...
> Reading symbols from /usr/bin/pgpool...(no debugging symbols found)...done.
> [New Thread 8096]
> Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols
> found)...done.
> Loaded symbols for /lib64/ld-linux-x86-64.so.2
> Core was generated by `pgpool: md'.
> Program terminated with signal 11, Segmentation fault.
> #0  0x000000000048e352 in appendStringInfoChar ()
> Missing separate debuginfos, use: debuginfo-install
> pgpool-II-pg93-3.4.3-1pgdg.rhel6.x86_64
> (gdb) bt
> #0  0x000000000048e352 in appendStringInfoChar ()
> Cannot access memory at address 0x7ffcb6f33e80
>
>
>
>
> -----Original Message-----
> From: Tatsuo Ishii [mailto:ishii at postgresql.org]
> Sent: November-17-15 10:40 PM
> To: Ziyun Audrey Wang
> Cc: ishii at postgresql.org; pgpool-general at pgpool.net; Nabil Khoury
> Subject: Re: [pgpool-general: 4187] pgpool segfault
>
> Please type "bt" when gdb shows "(gdb)", and send the output. That's the
> stack trace.
>
> Best regards,
> --
> Tatsuo Ishii
> SRA OSS, Inc. Japan
> English: http://www.sraoss.co.jp/index_en.php
> Japanese:http://www.sraoss.co.jp
> > Hi,
> >
> > Here is the info
> >
> > # gdb /usr/bin/pgpool core-pgpool-11-0-0-8096-1447690344
> > GNU gdb (GDB) Red Hat Enterprise Linux (7.2-83.el6) Copyright (C) 2010
> > Free Software Foundation, Inc.
> > License GPLv3+: GNU GPL version 3 or later
> > <http://gnu.org/licenses/gpl.html>
> > This is free software: you are free to change and redistribute it.
> > There is NO WARRANTY, to the extent permitted by law.  Type "show
> copying"
> > and "show warranty" for details.
> > This GDB was configured as "x86_64-redhat-linux-gnu".
> > For bug reporting instructions, please see:
> > <http://www.gnu.org/software/gdb/bugs/>...
> > Reading symbols from /usr/bin/pgpool...(no debugging symbols
> found)...done.
> > [New Thread 8096]
> > Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols
> found)...done.
> > Loaded symbols for /lib64/ld-linux-x86-64.so.2 Core was generated by
> > `pgpool: md'.
> > Program terminated with signal 11, Segmentation fault.
> > #0  0x000000000048e352 in appendStringInfoChar () Missing separate
> > debuginfos, use: debuginfo-install
> > pgpool-II-pg93-3.4.3-1pgdg.rhel6.x86_64
> > (gdb)
> >
> >
> >
> >
> >
> > -----Original Message-----
> > From: Tatsuo Ishii [mailto:ishii at postgresql.org]
> > Sent: November-17-15 8:13 AM
> > To: Ziyun Audrey Wang
> > Cc: ishii at postgresql.org; pgpool-general at pgpool.net; Nabil Khoury
> > Subject: Re: [pgpool-general: 4187] pgpool segfault
> >
> > Thanks but the core is not very usefull for me because to take an
> accurate stack trace, I have to have identical environment as you. Can you
> please take a stack trace on the machine where the core dump files were
> generated. i.e.
> >
> > gdb /usr/bin/pgpool core-pgpool-11-0-0-8096-1447690344
> >
> >> bt (from gdb prompt)
> >
> > Best regards,
> > --
> > Tatsuo Ishii
> > SRA OSS, Inc. Japan
> > English: http://www.sraoss.co.jp/index_en.php
> > Japanese:http://www.sraoss.co.jp
> >
> >> 2nd core dump file
> >>
> >> -----Original Message-----
> >> From: Ziyun Audrey Wang
> >> Sent: November-17-15 8:01 AM
> >> To: 'Tatsuo Ishii'
> >> Cc: pgpool-general at pgpool.net; Nabil Khoury
> >> Subject: RE: [pgpool-general: 4187] pgpool segfault
> >>
> >> Hello
> >>
> >> We have been able to reproduce the problem and get the core dumps.
> Since there are many core dump files, I am sending two of them, one is from
> the starting time, one is the finish time and please let me know if you
> need more.
> >>
> >> The step to reproduce is to trigger the failover.
> >>
> >> Thanks!
> >>
> >> Best Regards
> >> Audrey
> >>
> >>
> >> -----Original Message-----
> >> From: Tatsuo Ishii [mailto:ishii at postgresql.org]
> >> Sent: November-11-15 6:50 PM
> >> To: Ziyun Audrey Wang
> >> Cc: pgpool-general at pgpool.net
> >> Subject: Re: [pgpool-general: 4187] pgpool segfault
> >>
> >> Please send info either:
> >>
> >> 1) stack trace info using gdb
> >>
> >> or
> >>
> >> 2) step to reproduce the problem
> >>
> >> Best regards,
> >> --
> >> Tatsuo Ishii
> >> SRA OSS, Inc. Japan
> >> English: http://www.sraoss.co.jp/index_en.php
> >> Japanese:http://www.sraoss.co.jp
> >>
> >>> Hello,
> >>>
> >>> We have
> >>> # pgpool -version
> >>> pgpool-II version 3.4.2 (tataraboshi)
> >>>
> >>> in the system message log,
> >>>
> >>> we found lots of segfault, like the following:
> >>>
> >>> pgpool-00 kernel: pgpool[15458]: segfault at 0 ip 000000000042cb69
> >>> sp
> >>> 00007ffdb08d5fd0 error 4 in pgpool[400000+12d000]
> >>>
> >>> pgpool-00 kernel: pgpool[27931]: segfault at 10 ip 0000000000430933
> >>> sp 00007ffc814d1370 error 4 in pgpool[400000+12d000]
> >>>
> >>> what's the cause of this?
> >>>
> >>> Thanks very much!
> >>>
> >>> Best Regards
> >>> Ziyun Audrey Wang
> >>>
> >>>
> >>>
> >>>
> _______________________________________________
> pgpool-general mailing list
> pgpool-general at pgpool.net
> http://www.pgpool.net/mailman/listinfo/pgpool-general
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.sraoss.jp/pipermail/pgpool-general/attachments/20151120/1e4ad20f/attachment.html>
-------------- next part --------------
diff --git a/src/utils/pool_stream.c b/src/utils/pool_stream.c
index f84d355..f76eda0 100644
--- a/src/utils/pool_stream.c
+++ b/src/utils/pool_stream.c
@@ -548,6 +548,7 @@ int pool_flush_it(POOL_CONNECTION *cp)
 			/* If this is the backend stream, report error. Otherwise
 			 * just report debug message.
 			 */
+			cp->socket_state = POOL_SOCKET_ERROR;
 			if (cp->isbackend)
 				ereport(DEBUG1,
 					(errmsg("write on backend %d failed with error :\"%s\"",cp->db_node_id,strerror(errno)),


More information about the pgpool-general mailing list