Dear haproxy maintainers:
if we should add check for memory allocation? I got 3 coredumps(haproxy version is 2.6.6): bt 1 Program terminated with signal SIGSEGV, Segmentation fault. #0 0x00007f0a03a50a57 in BIO_meth_set_write (biom=0x0, bwrite=bwrite@entry=0x55fbf4ac5260 <ha_ssl_write>) at crypto/bio/bio_meth.c:92 92 biom->bwrite_old = bwrite; (gdb) bt #0 0x00007f0a03a50a57 in BIO_meth_set_write (biom=0x0, bwrite=bwrite@entry=0x55fbf4ac5260 <ha_ssl_write>) at crypto/bio/bio_meth.c:92 #1 0x000055fbf4ac50d5 in __ssl_sock_init () at src/ssl_sock.c:8150 #2 0x000055fbf4aba0e6 in main (argc=3, argv=0x7ffe3895b718) at src/haproxy.c:3075 bt 2 Program terminated with signal SIGSEGV, Segmentation fault. #0 __memmove_evex_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:307 307 VMOVU %VEC(0), (%rdi) (gdb) bt #0 __memmove_evex_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:307 #1 0x000056542cb0dba1 in memcpy (__len=46, __src=0x56542dbff1a0, __dest=<optimized out>) at /usr/include/bits/string_fortified.h:29 #2 __b_putblk (b=<optimized out>, len=46, blk=0x56542dbff1a0 "register section 'log-forward': out of memory.\n") at include/haproxy/buf.h:552 #3 b_putblk (b=<optimized out>, len=46, blk=0x56542dbff1a0 "register section 'log-forward': out of memory.\n") at include/haproxy/buf.h:568 #4 usermsgs_put (msg=<synthetic pointer>) at src/errors.c:50 #5 print_message (use_usermsgs_ctx=<optimized out>, label=<optimized out>, fmt=<optimized out>, argp=<optimized out>) at src/errors.c:216 #6 0x000056542cb0de0e in ha_alert (fmt=fmt@entry=0x56542cb581a8 "register section '%s': out of memory.\n") at src/errors.c:253 #7 0x000056542ca4bcfc in cfg_register_section (post_section_parser=0x0, section_parser=0x56542ca444c0 <cfg_parse_log_forward>, section_name=0x56542cb56e3a "log-forward") at src/cfgparse.c:4318 #8 cfg_register_section (section_name=0x56542cb56e3a "log-forward", section_parser=0x56542ca444c0 <cfg_parse_log_forward>, post_section_parser=0x0) at src/cfgparse.c:4303 #9 0x000056542c94f0e6 in main (argc=3, argv=0x7ffefb267388) at src/haproxy.c:3075 (gdb) f 4 #4 usermsgs_put (msg=<synthetic pointer>) at src/errors.c:50 50 b_putblk(&usermsgs_buf, msg->ptr, msg->len); (gdb) p usermsgs_buf $1 = {size = 1024, area = 0x0, data = 0, head = 0} (gdb) bt 3 Program terminated with signal SIGSEGV, Segmentation fault. #0 __pthread_clockjoin_ex (threadid=1, thread_return=thread_return@entry=0x0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, block=block@entry=true) at pthread_join_common.c:43 43 if (INVALID_NOT_TERMINATED_TD_P (pd)) (gdb) bt #0 __pthread_clockjoin_ex (threadid=1, thread_return=thread_return@entry=0x0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, block=block@entry=true) at pthread_join_common.c:43 #1 0x00007ff1708aa043 in ___pthread_join (threadid=<optimized out>, thread_return=thread_return@entry=0x0) at pthread_join.c:25 #2 0x000055b6ed0c64d1 in preload_libgcc_s () at src/thread.c:950 #3 __thread_init () at src/thread.c:964 #4 0x000055b6ecf10086 in main (argc=3, argv=0x7ffc1849dbc8) at src/haproxy.c:3073 The attachments is my patches. Looking forward to your response. | | eaglegai | | eagle...@163.com |
add-check-for-ha_meth.patch
Description: Binary data
add-check-for-usermsgs_buf.area-in-usermsgs_put.patch
Description: Binary data
add-check-for-pthread_create.patch
Description: Binary data