View Revisions: Issue #565

Summary 0000565: Segmentation falut happend by worker process
Revision 2019-12-10 16:01 by hoshiai
Description If apllication_name of standby's replication worker is ''(empty string), worker process of pgpool causes segment fault and this worker resatrt many times.

pgpool.log is :
2019-12-10 15:37:03: pid 16868: WARNING: worker child process with pid: 18230 was terminated by segmentation fault
2019-12-10 15:37:03: pid 16868: LOG: fork a new worker child process with pid: 18234
2019-12-10 15:37:03: pid 16868: WARNING: worker child process with pid: 18234 was terminated by segmentation fault
2019-12-10 15:37:03: pid 16868: LOG: fork a new worker child process with pid: 18238
2019-12-10 15:37:03: pid 16868: WARNING: worker child process with pid: 18238 was terminated by segmentation fault
2019-12-10 15:37:03: pid 16868: LOG: fork a new worker child process with pid: 18242
2019-12-10 15:37:03: pid 16868: WARNING: worker child process with pid: 18242 was terminated by segmentation fault
2019-12-10 15:37:03: pid 16868: LOG: fork a new worker child process with pid: 18246
2019-12-10 15:37:03: pid 16868: WARNING: worker child process with pid: 18246 was terminated by segmentation fault
2019-12-10 15:37:03: pid 16868: LOG: fork a new worker child process with pid: 18250
2019-12-10 15:37:04: pid 16868: WARNING: worker child process with pid: 18250 was terminated by segmentation fault
2019-12-10 15:37:04: pid 16868: LOG: fork a new worker child process with pid: 18254
2019-12-10 15:37:04: pid 16868: WARNING: worker child process with pid: 18254 was terminated by segmentation fault
2019-12-10 15:37:04: pid 16868: LOG: fork a new worker child process with pid: 18258
2019-12-10 15:37:04: pid 16868: WARNING: worker child process with pid: 18258 was terminated by segmentation fault
2019-12-10 15:37:04: pid 16868: LOG: fork a new worker child process with pid: 18262
2019-12-10 15:37:04: pid 16868: WARNING: worker child process with pid: 18262 was terminated by segmentation fault
2019-12-10 15:37:04: pid 16868: LOG: fork a new worker child process with pid: 18266
2019-12-10 15:37:04: pid 16868: WARNING: worker child process with pid: 18266 was terminated by segmentation fault
2019-12-10 15:37:04: pid 16868: LOG: fork a new worker child process with pid: 18270

backtrace is :
Program received signal SIGSEGV, Segmentation fault.
0x00007fdfd3c58706 in __strcmp_sse42 () from /lib64/libc.so.6
(gdb) bt
#0 0x00007fdfd3c58706 in __strcmp_sse42 () from /lib64/libc.so.6
0000001 0x000000000044f738 in check_replication_time_lag () at streaming_replication/pool_worker_child.c:404
0000002 do_worker_child () at streaming_replication/pool_worker_child.c:174
0000003 0x000000000040a0a2 in worker_fork_a_child (type=PT_WORKER, func=0x44ee40 <do_worker_child>, params=0x0) at main/pgpool_main.c:713
0000004 0x000000000040a841 in reaper () at main/pgpool_main.c:2661
0000005 0x000000000041163f in PgpoolMain (discard_status=discard_status@entry=1 '\001', clear_memcache_oidmaps=clear_memcache_oidmaps@entry=0 '\000') at main/pgpool_main.c:458
0000006 0x000000000040882a in main (argc=<optimized out>, argv=<optimized out>) at main/main.c:356


This problem is happend by strcmp() which first agument is NULL poinnter.
I think that 'application_name' col of pg_stat_replication is handled not enough.
Revision 2019-12-10 15:47 by hoshiai
Description If apllication_name of standby's replication worker is ''(empty string), worker process of pgpool causes segment fault and this worker resatrt many times.

pgpool.log is :
2019-12-10 15:37:03: pid 16868: WARNING: worker child process with pid: 18230 was terminated by segmentation fault
2019-12-10 15:37:03: pid 16868: LOG: fork a new worker child process with pid: 18234
2019-12-10 15:37:03: pid 16868: WARNING: worker child process with pid: 18234 was terminated by segmentation fault
2019-12-10 15:37:03: pid 16868: LOG: fork a new worker child process with pid: 18238
2019-12-10 15:37:03: pid 16868: WARNING: worker child process with pid: 18238 was terminated by segmentation fault
2019-12-10 15:37:03: pid 16868: LOG: fork a new worker child process with pid: 18242
2019-12-10 15:37:03: pid 16868: WARNING: worker child process with pid: 18242 was terminated by segmentation fault
2019-12-10 15:37:03: pid 16868: LOG: fork a new worker child process with pid: 18246
2019-12-10 15:37:03: pid 16868: WARNING: worker child process with pid: 18246 was terminated by segmentation fault
2019-12-10 15:37:03: pid 16868: LOG: fork a new worker child process with pid: 18250
2019-12-10 15:37:04: pid 16868: WARNING: worker child process with pid: 18250 was terminated by segmentation fault
2019-12-10 15:37:04: pid 16868: LOG: fork a new worker child process with pid: 18254
2019-12-10 15:37:04: pid 16868: WARNING: worker child process with pid: 18254 was terminated by segmentation fault
2019-12-10 15:37:04: pid 16868: LOG: fork a new worker child process with pid: 18258
2019-12-10 15:37:04: pid 16868: WARNING: worker child process with pid: 18258 was terminated by segmentation fault
2019-12-10 15:37:04: pid 16868: LOG: fork a new worker child process with pid: 18262
2019-12-10 15:37:04: pid 16868: WARNING: worker child process with pid: 18262 was terminated by segmentation fault
2019-12-10 15:37:04: pid 16868: LOG: fork a new worker child process with pid: 18266
2019-12-10 15:37:04: pid 16868: WARNING: worker child process with pid: 18266 was terminated by segmentation fault
2019-12-10 15:37:04: pid 16868: LOG: fork a new worker child process with pid: 18270

backtrace is :
Program received signal SIGSEGV, Segmentation fault.
0x00007fdfd3c58706 in __strcmp_sse42 () from /lib64/libc.so.6
(gdb) bt
#0 0x00007fdfd3c58706 in __strcmp_sse42 () from /lib64/libc.so.6
0000001 0x000000000044f738 in check_replication_time_lag () at streaming_replication/pool_worker_child.c:405
0000002 do_worker_child () at streaming_replication/pool_worker_child.c:174
0000003 0x000000000040a0a2 in worker_fork_a_child (type=PT_WORKER, func=0x44ee40 <do_worker_child>, params=0x0) at main/pgpool_main.c:713
0000004 0x000000000040a841 in reaper () at main/pgpool_main.c:2661
0000005 0x000000000041163f in PgpoolMain (discard_status=discard_status@entry=1 '\001', clear_memcache_oidmaps=clear_memcache_oidmaps@entry=0 '\000') at main/pgpool_main.c:458
0000006 0x000000000040882a in main (argc=<optimized out>, argv=<optimized out>) at main/main.c:356


This problem is happend by strcmp() which first agument is NULL poinnter.
I think that 'application_name' col of pg_stat_replication is handled not enough.