<div dir="ltr">Hi Ishii-San<div><br></div><div>I have pushed the fix for this one.</div><div><br></div><div>Thanks</div><div>Best Regards</div><div>Muhammad Usama</div><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 22, 2017 at 3:30 PM, Muhammad Usama <span dir="ltr"><<a href="mailto:m.usama@gmail.com" target="_blank">m.usama@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I am looking into this<br>
<br>
Thanks<br>
Best regards<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
> On 22-May-2017, at 1:49 PM, Tatsuo Ishii <<a href="mailto:ishii@sraoss.co.jp">ishii@sraoss.co.jp</a>> wrote:<br>
><br>
> Usama,<br>
><br>
> From commit:<br>
> <a href="https://git.postgresql.org/gitweb/?p=pgpool2.git;a=commit;h=18f4d2ea08c2562361858b09534490a6fa09d496" rel="noreferrer" target="_blank">https://git.postgresql.org/<wbr>gitweb/?p=pgpool2.git;a=<wbr>commit;h=<wbr>18f4d2ea08c2562361858b09534490<wbr>a6fa09d496</a><br>
> "Allow to configure health check parameters for each individual node."<br>
><br>
> I have been experincing regression failure on my Ubuntu 17 laptop.<br>
> Actually it is caused by pg_md5 segfault. For example following<br>
> command reliably segfaults.<br>
><br>
> $ temp/installed/bin/pg_md5 -m -f tests/001.load_balance/<wbr>testdir/etc/pgpool.conf -u aaa aaa<br>
><br>
> Here's the stack trace info.<br>
><br>
> $ gdb temp/installed/bin/pg_md5<br>
> GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.04) 7.11.1<br>
> Copyright (C) 2016 Free Software Foundation, Inc.<br>
> License GPLv3+: GNU GPL version 3 or later <<a href="http://gnu.org/licenses/gpl.html" rel="noreferrer" target="_blank">http://gnu.org/licenses/gpl.<wbr>html</a>><br>
> This is free software: you are free to change and redistribute it.<br>
> There is NO WARRANTY, to the extent permitted by law. Type "show copying"<br>
> and "show warranty" for details.<br>
> This GDB was configured as "x86_64-linux-gnu".<br>
> Type "show configuration" for configuration details.<br>
> For bug reporting instructions, please see:<br>
> <<a href="http://www.gnu.org/software/gdb/bugs/" rel="noreferrer" target="_blank">http://www.gnu.org/software/<wbr>gdb/bugs/</a>>.<br>
> Find the GDB manual and other documentation resources online at:<br>
> <<a href="http://www.gnu.org/software/gdb/documentation/" rel="noreferrer" target="_blank">http://www.gnu.org/software/<wbr>gdb/documentation/</a>>.<br>
> For help, type "help".<br>
> Type "apropos word" to search for commands related to "word"...<br>
> Reading symbols from temp/installed/bin/pg_md5...<wbr>done.<br>
> (gdb) run -m -f tests/001.load_balance/<wbr>testdir/etc/pgpool.conf -u aaa aaa<br>
> Starting program: /home/t-ishii/tmp/pgpool2-<wbr>18f4d2e/src/test/regression/<wbr>temp/installed/bin/pg_md5 -m -f tests/001.load_balance/<wbr>testdir/etc/pgpool.conf -u aaa aaa<br>
> *** Error in `/home/t-ishii/tmp/pgpool2-<wbr>18f4d2e/src/test/regression/<wbr>temp/installed/bin/pg_md5': free(): invalid next size (fast): 0x0000000000652c60 ***<br>
> ======= Backtrace: =========<br>
> /lib/x86_64-linux-gnu/libc.so.<wbr>6(+0x777e5)[0x7ffff7a857e5]<br>
> /lib/x86_64-linux-gnu/libc.so.<wbr>6(+0x7fe0a)[0x7ffff7a8de0a]<br>
> /lib/x86_64-linux-gnu/libc.so.<wbr>6(cfree+0x4c)[0x7ffff7a9198c]<br>
> /lib/x86_64-linux-gnu/libc.so.<wbr>6(+0xe0224)[0x7ffff7aee224]<br>
> /lib/x86_64-linux-gnu/libc.so.<wbr>6(regcomp+0xbf)[<wbr>0x7ffff7af569f]<br>
> /home/t-ishii/tmp/pgpool2-<wbr>18f4d2e/src/test/regression/<wbr>temp/installed/bin/pg_md5[<wbr>0x408b6b]<br>
> /home/t-ishii/tmp/pgpool2-<wbr>18f4d2e/src/test/regression/<wbr>temp/installed/bin/pg_md5[<wbr>0x404e84]<br>
> /home/t-ishii/tmp/pgpool2-<wbr>18f4d2e/src/test/regression/<wbr>temp/installed/bin/pg_md5[<wbr>0x407507]<br>
> /home/t-ishii/tmp/pgpool2-<wbr>18f4d2e/src/test/regression/<wbr>temp/installed/bin/pg_md5[<wbr>0x40887e]<br>
> /home/t-ishii/tmp/pgpool2-<wbr>18f4d2e/src/test/regression/<wbr>temp/installed/bin/pg_md5[<wbr>0x401d6c]<br>
> /home/t-ishii/tmp/pgpool2-<wbr>18f4d2e/src/test/regression/<wbr>temp/installed/bin/pg_md5[<wbr>0x401aa8]<br>
> /lib/x86_64-linux-gnu/libc.so.<wbr>6(__libc_start_main+0xf0)[<wbr>0x7ffff7a2e830]<br>
> /home/t-ishii/tmp/pgpool2-<wbr>18f4d2e/src/test/regression/<wbr>temp/installed/bin/pg_md5[<wbr>0x401c29]<br>
> ======= Memory map: ========<br>
> 00400000-00411000 r-xp 00000000 08:05 16694994 /home/t-ishii/tmp/pgpool2-<wbr>18f4d2e/src/test/regression/<wbr>temp/installed/bin/pg_md5<br>
> 00610000-00611000 r--p 00010000 08:05 16694994 /home/t-ishii/tmp/pgpool2-<wbr>18f4d2e/src/test/regression/<wbr>temp/installed/bin/pg_md5<br>
> 00611000-00617000 rw-p 00011000 08:05 16694994 /home/t-ishii/tmp/pgpool2-<wbr>18f4d2e/src/test/regression/<wbr>temp/installed/bin/pg_md5<br>
> 00617000-00655000 rw-p 00000000 00:00 0 [heap]<br>
> 7ffff0000000-7ffff0021000 rw-p 00000000 00:00 0<br>
> 7ffff0021000-7ffff4000000 ---p 00000000 00:00 0<br>
> 7ffff77f8000-7ffff780e000 r-xp 00000000 08:05 12062567 /lib/x86_64-linux-gnu/libgcc_<wbr>s.so.1<br>
> 7ffff780e000-7ffff7a0d000 ---p 00016000 08:05 12062567 /lib/x86_64-linux-gnu/libgcc_<wbr>s.so.1<br>
> 7ffff7a0d000-7ffff7a0e000 rw-p 00015000 08:05 12062567 /lib/x86_64-linux-gnu/libgcc_<wbr>s.so.1<br>
> 7ffff7a0e000-7ffff7bcd000 r-xp 00000000 08:05 12183870 /lib/x86_64-linux-gnu/<a href="http://libc-2.23.so" rel="noreferrer" target="_blank">libc-2.<wbr>23.so</a><br>
> 7ffff7bcd000-7ffff7dcd000 ---p 001bf000 08:<a href="tel:05%2012183870" value="+92512183870">05 12183870</a> /lib/x86_64-linux-gnu/<a href="http://libc-2.23.so" rel="noreferrer" target="_blank">libc-2.<wbr>23.so</a><br>
> 7ffff7dcd000-7ffff7dd1000 r--p 001bf000 08:<a href="tel:05%2012183870" value="+92512183870">05 12183870</a> /lib/x86_64-linux-gnu/<a href="http://libc-2.23.so" rel="noreferrer" target="_blank">libc-2.<wbr>23.so</a><br>
> 7ffff7dd1000-7ffff7dd3000 rw-p 001c3000 08:<a href="tel:05%2012183870" value="+92512183870">05 12183870</a> /lib/x86_64-linux-gnu/<a href="http://libc-2.23.so" rel="noreferrer" target="_blank">libc-2.<wbr>23.so</a><br>
> 7ffff7dd3000-7ffff7dd7000 rw-p 00000000 00:00 0<br>
> 7ffff7dd7000-7ffff7dfd000 r-xp 00000000 08:05 12183871 /lib/x86_64-linux-gnu/<a href="http://ld-2.23.so" rel="noreferrer" target="_blank">ld-2.23.<wbr>so</a><br>
> 7ffff7fd2000-7ffff7fd5000 rw-p 00000000 00:00 0<br>
> 7ffff7ff5000-7ffff7ff8000 rw-p 00000000 00:00 0<br>
> 7ffff7ff8000-7ffff7ffa000 r--p 00000000 00:00 0 [vvar]<br>
> 7ffff7ffa000-7ffff7ffc000 r-xp 00000000 00:00 0 [vdso]<br>
> 7ffff7ffc000-7ffff7ffd000 r--p 00025000 08:05 12183871 /lib/x86_64-linux-gnu/<a href="http://ld-2.23.so" rel="noreferrer" target="_blank">ld-2.23.<wbr>so</a><br>
> 7ffff7ffd000-7ffff7ffe000 rw-p 00026000 08:<a href="tel:05%2012183871" value="+92512183871">05 12183871</a> /lib/x86_64-linux-gnu/<a href="http://ld-2.23.so" rel="noreferrer" target="_blank">ld-2.23.<wbr>so</a><br>
> 7ffff7ffe000-7ffff7fff000 rw-p 00000000 00:00 0<br>
> 7ffffffde000-7ffffffff000 rw-p 00000000 00:00 0 [stack]<br>
> ffffffffff600000-<wbr>ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]<br>
><br>
> Program received signal SIGABRT, Aborted.<br>
> 0x00007ffff7a43428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/<wbr>raise.c:54<br>
> 54 ../sysdeps/unix/sysv/linux/<wbr>raise.c: そのようなファイルやディレクトリはありません.<br>
> (gdb) bt<br>
> #0 0x00007ffff7a43428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/<wbr>raise.c:54<br>
> #1 0x00007ffff7a4502a in __GI_abort () at abort.c:89<br>
> #2 0x00007ffff7a857ea in __libc_message (do_abort=do_abort@entry=2,<br>
> fmt=fmt@entry=0x7ffff7b9e2e0 "*** Error in `%s': %s: 0x%s ***\n")<br>
> at ../sysdeps/posix/libc_fatal.c:<wbr>175<br>
> #3 0x00007ffff7a8de0a in malloc_printerr (ar_ptr=<optimized out>, ptr=<optimized out>,<br>
> str=0x7ffff7b9e358 "free(): invalid next size (fast)", action=3) at malloc.c:5004<br>
> #4 _int_free (av=<optimized out>, p=<optimized out>, have_lock=0) at malloc.c:3865<br>
> #5 0x00007ffff7a9198c in __GI___libc_free (mem=<optimized out>) at malloc.c:2966<br>
> #6 0x00007ffff7aee224 in analyze (preg=0x7fffffff7e10) at regcomp.c:1166<br>
> #7 re_compile_internal (preg=preg@entry=<wbr>0x7fffffff7e10, pattern=pattern@entry=0x651e90 "^nextval$",<br>
> length=<optimized out>, syntax=syntax@entry=4436732) at regcomp.c:791<br>
> #8 0x00007ffff7af569f in __regcomp (preg=preg@entry=<wbr>0x7fffffff7e10, pattern=0x651e90 "^nextval$",<br>
> cflags=<optimized out>) at regcomp.c:498<br>
> #9 0x0000000000408b6b in add_regex_pattern (type=<optimized out>, s=<optimized out>)<br>
> at pool_config.l:177<br>
> #10 0x0000000000404e84 in initialize_variables_with_<wbr>default (<br>
> gconf=0x6141b0 <ConfigureNamesStringList+304><wbr>) at pool_config_variables.c:2363<br>
> #11 0x0000000000407507 in InitializeConfigOptions () at pool_config_variables.c:2449<br>
> #12 0x000000000040887e in pool_init_config () at pool_config.l:119<br>
> #13 0x0000000000401d6c in update_pool_passwd (<br>
> conf_file=conf_file@entry=<wbr>0x7fffffffc110 "tests/001.load_balance/<wbr>testdir/etc/pgpool.conf",<br>
> username=username@entry=<wbr>0x7fffffffbff0 "aaa", password=0x7fffffffe6b8 "aaa") at pg_md5.c:199<br>
> #14 0x0000000000401aa8 in main (argc=7, argv=0x7fffffffe238) at pg_md5.c:179<br>
> (gdb)<br>
><br>
> Also valgrind shows some errors.<br>
><br>
> t-ishii@localhost: valgrind temp/installed/bin/pg_md5 -m -f tests/001.load_balance/<wbr>testdir/etc/pgpool.conf -u aaa aaa<br>
> ==16881== Memcheck, a memory error detector<br>
> ==16881== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.<br>
> ==16881== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info<br>
> ==16881== Command: temp/installed/bin/pg_md5 -m -f tests/001.load_balance/<wbr>testdir/etc/pgpool.conf -u aaa aaa<br>
> ==16881==<br>
> ==16881== Invalid write of size 8<br>
> ==16881== at 0x4074A2: build_variable_groups (pool_config_variables.c:2075)<br>
> ==16881== by 0x4074A2: build_config_variables (pool_config_variables.c:2016)<br>
> ==16881== by 0x4074A2: InitializeConfigOptions (pool_config_variables.c:2441)<br>
> ==16881== by 0x40887D: pool_init_config (pool_config.l:119)<br>
> ==16881== by 0x401D6B: update_pool_passwd (pg_md5.c:199)<br>
> ==16881== by 0x401AA7: main (pg_md5.c:179)<br>
> ==16881== Address 0x5227018 is 0 bytes after a block of size 40 alloc'd<br>
> ==16881== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_<wbr>memcheck-amd64-linux.so)<br>
> ==16881== by 0x4094B4: pg_malloc (fe_memutils.c:33)<br>
> ==16881== by 0x4094DD: pg_malloc0 (fe_memutils.c:47)<br>
> ==16881== by 0x407432: build_variable_groups (pool_config_variables.c:2064)<br>
> ==16881== by 0x407432: build_config_variables (pool_config_variables.c:2016)<br>
> ==16881== by 0x407432: InitializeConfigOptions (pool_config_variables.c:2441)<br>
> ==16881== by 0x40887D: pool_init_config (pool_config.l:119)<br>
> ==16881== by 0x401D6B: update_pool_passwd (pg_md5.c:199)<br>
> ==16881== by 0x401AA7: main (pg_md5.c:179)<br>
> ==16881==<br>
> ==16881== Invalid write of size 8<br>
> ==16881== at 0x4074B4: build_variable_groups (pool_config_variables.c:2077)<br>
> ==16881== by 0x4074B4: build_config_variables (pool_config_variables.c:2016)<br>
> ==16881== by 0x4074B4: InitializeConfigOptions (pool_config_variables.c:2441)<br>
> ==16881== by 0x40887D: pool_init_config (pool_config.l:119)<br>
> ==16881== by 0x401D6B: update_pool_passwd (pg_md5.c:199)<br>
> ==16881== by 0x401AA7: main (pg_md5.c:179)<br>
> ==16881== Address 0x5227020 is 8 bytes after a block of size 40 alloc'd<br>
> ==16881== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_<wbr>memcheck-amd64-linux.so)<br>
> ==16881== by 0x4094B4: pg_malloc (fe_memutils.c:33)<br>
> ==16881== by 0x4094DD: pg_malloc0 (fe_memutils.c:47)<br>
> ==16881== by 0x407432: build_variable_groups (pool_config_variables.c:2064)<br>
> ==16881== by 0x407432: build_config_variables (pool_config_variables.c:2016)<br>
> ==16881== by 0x407432: InitializeConfigOptions (pool_config_variables.c:2441)<br>
> ==16881== by 0x40887D: pool_init_config (pool_config.l:119)<br>
> ==16881== by 0x401D6B: update_pool_passwd (pg_md5.c:199)<br>
> ==16881== by 0x401AA7: main (pg_md5.c:179)<br>
> ==16881==<br>
> ==16881== Invalid write of size 8<br>
> ==16881== at 0x4074C6: build_variable_groups (pool_config_variables.c:2079)<br>
> ==16881== by 0x4074C6: build_config_variables (pool_config_variables.c:2016)<br>
> ==16881== by 0x4074C6: InitializeConfigOptions (pool_config_variables.c:2441)<br>
> ==16881== by 0x40887D: pool_init_config (pool_config.l:119)<br>
> ==16881== by 0x401D6B: update_pool_passwd (pg_md5.c:199)<br>
> ==16881== by 0x401AA7: main (pg_md5.c:179)<br>
> ==16881== Address 0x5227028 is 16 bytes after a block of size 40 alloc'd<br>
> ==16881== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_<wbr>memcheck-amd64-linux.so)<br>
> ==16881== by 0x4094B4: pg_malloc (fe_memutils.c:33)<br>
> ==16881== by 0x4094DD: pg_malloc0 (fe_memutils.c:47)<br>
> ==16881== by 0x407432: build_variable_groups (pool_config_variables.c:2064)<br>
> ==16881== by 0x407432: build_config_variables (pool_config_variables.c:2016)<br>
> ==16881== by 0x407432: InitializeConfigOptions (pool_config_variables.c:2441)<br>
> ==16881== by 0x40887D: pool_init_config (pool_config.l:119)<br>
> ==16881== by 0x401D6B: update_pool_passwd (pg_md5.c:199)<br>
> ==16881== by 0x401AA7: main (pg_md5.c:179)<br>
> ==16881==<br>
> ==16881==<br>
> ==16881== HEAP SUMMARY:<br>
> ==16881== in use at exit: 159,848 bytes in 3,700 blocks<br>
> ==16881== total heap usage: 5,872 allocs, 2,172 frees, 483,653 bytes allocated<br>
> ==16881==<br>
> ==16881== LEAK SUMMARY:<br>
> ==16881== definitely lost: 4,586 bytes in 1,034 blocks<br>
> ==16881== indirectly lost: 0 bytes in 0 blocks<br>
> ==16881== possibly lost: 0 bytes in 0 blocks<br>
> ==16881== still reachable: 155,262 bytes in 2,666 blocks<br>
> ==16881== suppressed: 0 bytes in 0 blocks<br>
> ==16881== Rerun with --leak-check=full to see details of leaked memory<br>
> ==16881==<br>
> ==16881== For counts of detected and suppressed errors, rerun with: -v<br>
> ==16881== ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)<br>
><br>
> Any idea?<br>
><br>
> Best regards,<br>
> --<br>
> Tatsuo Ishii<br>
> SRA OSS, Inc. Japan<br>
> English: <a href="http://www.sraoss.co.jp/index_en.php" rel="noreferrer" target="_blank">http://www.sraoss.co.jp/index_<wbr>en.php</a><br>
> Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.<wbr>jp</a><br>
> ______________________________<wbr>_________________<br>
> pgpool-hackers mailing list<br>
> <a href="mailto:pgpool-hackers@pgpool.net">pgpool-hackers@pgpool.net</a><br>
> <a href="http://www.pgpool.net/mailman/listinfo/pgpool-hackers" rel="noreferrer" target="_blank">http://www.pgpool.net/mailman/<wbr>listinfo/pgpool-hackers</a><br>
</div></div></blockquote></div><br></div></div></div>