[Pgpool-general] Segfault when using MD5 auth [working patch]
Tatsuo Ishii
ishii at sraoss.co.jp
Thu Dec 16 08:49:37 UTC 2010
Here is the patch I promised. Please apply to stock pgpool-II 3.0 or
3.0 stable head.
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp
> Thanks! I have examined the patch and I think that your problem only
> occurs when none of replication mode/master slave mode/parallel are
> set *or* you have only one backend. This should explain why I couldn't
> reproduce your proplem. Can you confirm this? Also I found other
> possible bug with the module. I will come back with the patch along
> with assorted fixes.
> --
> Tatsuo Ishii
> SRA OSS, Inc. Japan
> English: http://www.sraoss.co.jp/index_en.php
> Japanese: http://www.sraoss.co.jp
>
> From: Rob Shepherd <rs at datacymru.net>
> Subject: Re: [Pgpool-general] Segfault when using MD5 auth [working patch]
> Date: Wed, 15 Dec 2010 20:40:14 +0000
> Message-ID: <4D0927AE.1000605 at datacymru.net>
>
>> Tatsuo - Sincere apologies, the last patch was an old broken copy -
>> please ignore it and accept this new one - attached.
>>
>> http://dpaste.com/hold/287099/
>>
>>
>>
>>
>>
>> Tatsuo,
>>
>> On a whim I attempted the fix found at:
>>
>> http://abdulyadi.wordpress.com/2010/09/25/pgpool-ii-3-0-bug-fixes/
>>
>> And it worked!
>>
>> I used this procedure:
>>
>> http://bradthemad.org/tech/notes/patching_rpms.php
>>
>>
>> I made a patch of the fix found on the blog post, which is attached.
>>
>> Is there any verification set suite you would like to me to run to
>> test
>> the stability of the system with the applied patch?
>>
>> Many thanks
>>
>> Rob
>>
>> Rob Shepherd wrote:
>>> Tatsuo,
>>>
>>> At last! I finally managed to work out how to use the debuginfo
>>> package.
>>> Here is a stacktrace for the gdb session with debug symbols loaded.
>>>
>>>> (gdb) cont
>>>> Continuing.
>>>>
>>>> Program received signal SIGSEGV, Segmentation fault.
>>>> 0x00000038c6c7c3fc in memcpy () from /lib64/libc.so.6
>>>> (gdb) bt
>>>> #0 0x00000038c6c7c3fc in memcpy () from /lib64/libc.so.6
>>>> #1 0x000000000040a718 in do_md5 (backend=0x15229fd0,
>>>> #frontend=0x15227370, reauth=<value optimized out>,
>>>> protoMajor=3) at pool_auth.c:990
>>>> #2 0x000000000040ac3f in pool_do_auth (frontend=0x15227370,
>>>> #cp=0x15226340) at pool_auth.c:222
>>>> #3 0x0000000000408978 in connect_backend (unix_fd=4, inet_fd=5) at
>>>> #child.c:1143
>>>> #4 do_child (unix_fd=4, inet_fd=5) at child.c:293
>>>> #5 0x0000000000403c35 in fork_a_child (unix_fd=4, inet_fd=5, id=0) at
>>>> #main.c:1024
>>>> #6 0x0000000000404467 in reaper () at main.c:1921
>>>> #7 0x0000000000406415 in main (argc=<value optimized out>, argv=<value
>>>> #optimized out>) at main.c:557
>>>> (gdb)
>>>
>>>
>>> Please let me know what more I can do.
>>>
>>>
>>> With many thanks and kind regards
>>>
>>> Rob
>>>
>>>
>>> Tatsuo Ishii wrote:
>>>>>> No problem. However, I have already provided a stacktrace for this
>>>>>> problem.
>>>>>>
>>>>>> Your response to it was:
>>>>>>
>>>>>>
>>>>>>> Thanks for the backtrace. Unfortunately the binary did not have the
>>>>>>> symbol table and did not give me usefull info. BTW while looking at
>>>>>>> the code, I found a nasty bug with pgpool-II which may or may not
>>>>>>> cause the bug. If user name is long(32 bytes), pgpool-II will crash.
>>>>>>> If this is the case, attached will fix it. If this does not work, can
>>>>>>> you please run pgpool with -d (debug)option which might give us
>>>>>>> usefull information.
>>>>>>>
>>>>>> Essentially, the binary doesn't have debug symbols.
>>>>>>
>>>>>> It seems the packager from where I installed the binaries doesn't
>>>>>> provide source-RPMs, so it may be tricky for me to build a debug
>>>>>> version.
>>>>>>
>>>>>> Do you happen to have a RedHat 5/Centos/Fedora debug binary that might
>>>>>> work?
>>>>>>
>>>>> Where did you get the rpm binary?
>>>>>
>>>>
>>>> If the rpm came from
>>>> http://yum.pgrpms.org/9.0/redhat/rhel-5-i386/
>>>> or
>>>> http://yum.pgrpms.org/9.0/redhat/rhel-5-x86_64/
>>>> You could obtain debuginfo packages to get stack trace.
>>>> --
>>>> Tatsuo Ishii
>>>> SRA OSS, Inc. Japan
>>>> English: http://www.sraoss.co.jp/index_en.php
>>>> Japanese: http://www.sraoss.co.jp
>>>>
>>>>
>>>
>>>
>>
>>
>> --
>> Rob Shepherd BEng PhD - Director / Senior Engineer - DataCymru Ltd
>> Reg. England and Wales - 06731289 - TechniumCAST, LL57 4HJ
>> rs at datacymru.net - 08452575006 - 07596154845 - www.datacymru.net
>>
>>
> _______________________________________________
> Pgpool-general mailing list
> Pgpool-general at pgfoundry.org
> http://pgfoundry.org/mailman/listinfo/pgpool-general
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pool_auth.patch
Type: text/x-patch
Size: 7522 bytes
Desc: not available
URL: <http://pgfoundry.org/pipermail/pgpool-general/attachments/20101216/3450bc20/attachment-0001.bin>
More information about the Pgpool-general
mailing list