[pgpool-general: 1427] Segfault on pgpool2-3.2.3 ""*** glibc detected *** double free or corruption (!prev)"

Marcin Mirosław marcin at mejor.pl
Tue Feb 26 07:56:20 JST 2013

Hi all!
I've started to use pgpool2 with query cache on shmem. Unfortunatelly
I'm very often getting segfault, here is backtrace:

Core was generated by `pgpool: listonos'.
Program terminated with signal 6, Aborted.
#0  0x0000029034a66b45 in __GI_raise (sig=6) at
64        return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig);
(gdb) #0  0x0000029034a66b45 in __GI_raise (sig=6) at
#1  0x0000029034a67fbb in __GI_abort () at abort.c:91
#2  0x0000029034aa676f in __libc_message (do_abort=2, fmt=0x29034b9a6d0
"*** glibc detected *** %s: %s: 0x%s ***\n")
    at ../sysdeps/unix/sysv/linux/libc_fatal.c:198
#3  0x0000029034aac4e6 in malloc_printerr (action=3, str=0x29034b9a7e0
"double free or corruption (!prev)", ptr=<optimized out>)
    at malloc.c:5007
#4  0x0000003377cd5bcf in pool_discard_temp_query_cache
(temp_cache=0x337ad72a80) at pool_memqcache.c:2588
#5  0x0000003377cd5ca0 in pool_discard_query_cache_array
(cache_array=0x337ad713a0) at pool_memqcache.c:2505
#6  0x0000003377cd6273 in pool_reset_memqcache_buffer () at
#7  0x0000003377cd806a in pool_handle_query_cache (backend=0x337ad6aad0,
query=<optimized out>, node=<optimized out>,
    state=<optimized out>) at pool_memqcache.c:3002
#8  0x0000003377cd1f13 in ReadyForQuery (frontend=0x337ad84ae0,
backend=0x337ad6aad0, send_ready=1 '\001', cache_commit=1 '\001')
    at pool_proto_modules.c:1782
#9  0x0000003377cd247e in ProcessBackendResponse (frontend=0x337ad84ae0,
backend=0x337ad6aad0, state=0x3b32b9f964c,
    num_fields=0x3b32b9f9654) at pool_proto_modules.c:2612
#10 0x0000003377c968e5 in pool_process_query (frontend=0x337ad84ae0,
backend=0x337ad6aad0, reset_request=0) at pool_process_query.c:288
#11 0x0000003377c8620c in do_child (unix_fd=5, inet_fd=6) at child.c:371
#12 0x0000003377c80a07 in fork_a_child (unix_fd=5, inet_fd=6, id=29) at
#13 0x0000003377c7e4d4 in main (argc=<optimized out>, argv=<optimized
out>) at main.c:661
(gdb) quit

If I can provide more information please let me know.
Btw, I prepared static clang analyse for pgpool2. I'm not programmer I
can't say how much usefull it is, I can't write patch... Some errors
doesn't looks good (like "use-after-free"), here it is:


More information about the pgpool-general mailing list