Skip to content

Instantly share code, notes, and snippets.

@yoku0825
Created February 2, 2023 06:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yoku0825/73bd79fca85915e72a3d366ca81b9c14 to your computer and use it in GitHub Desktop.
Save yoku0825/73bd79fca85915e72a3d366ca81b9c14 to your computer and use it in GitHub Desktop.
MySQL Bugs: #109875: binlog_transaction_compression causes OOM when crash recovery happened https://bugs.mysql.com/bug.php?id=109875
--------------------------------------------------------------------------------
n time(i) total(B) useful-heap(B) extra-heap(B) stacks(B)
--------------------------------------------------------------------------------
85 54,500,074,813 21,078,405,512 20,888,346,655 190,058,857 0
86 54,512,142,231 21,078,405,512 20,888,346,655 190,058,857 0
99.10% (20,888,346,655B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
->40.12% (8,455,717,998B) 0x2078B1C: allocate (new_allocator.h:127)
| ->40.12% (8,455,717,998B) 0x2078B1C: allocate (alloc_traits.h:460)
| ->40.12% (8,455,717,998B) 0x2078B1C: _M_allocate (stl_vector.h:346)
| ->40.12% (8,455,717,998B) 0x2078B1C: void std::vector<unsigned char, std::allocator<unsigned char> >::_M_realloc_insert<unsigned char>(__gnu_cxx::__normal_iterator<unsigned char*, std::vector<unsigned
char, std::allocator<unsigned char> > >, unsigned char&&) (vector.tcc:440)
| ->40.12% (8,455,717,998B) 0x2079418: emplace_back<unsigned char> (vector.tcc:121)
| ->40.12% (8,455,717,998B) 0x2079418: push_back (stl_vector.h:1204)
| ->40.12% (8,455,717,998B) 0x2079418: binary_log::Rows_event::Rows_event(char const*, binary_log::Format_description_event const*) (rows_event.cpp:478)
| ->40.12% (8,455,717,998B) 0x1CA20E8: Write_rows_log_event::Write_rows_log_event(char const*, binary_log::Format_description_event const*) (log_event.cc:11877)
| | ->40.12% (8,455,717,998B) 0x1C86540: binlog_event_deserialize(unsigned char const*, unsigned int, binary_log::Format_description_event const*, bool, Log_event**) (binlog_reader.cc:273)
| | ->40.12% (8,455,717,998B) 0x1CD98B8: binlog::tools::Iterator::do_next() (iterators.cc:102)
| | ->40.12% (8,455,717,998B) 0x1CD463C: binlog::Binlog_recovery::recover() (recovery.cc:63)
| | ->40.12% (8,455,717,998B) 0x1C8266A: MYSQL_BIN_LOG::open_binlog(char const*) (binlog.cc:7880)
| | ->40.12% (8,455,717,998B) 0xCAE810: init_server_components() (mysqld.cc:6816)
| | ->40.12% (8,455,717,998B) 0xCB5B72: mysqld_main(int, char**) (mysqld.cc:7803)
| | ->40.12% (8,455,717,998B) 0x6A9B554: (below main) (in /usr/lib64/libc-2.17.so)
| |
| ->00.00% (0B) in 1+ places, all below ms_print's threshold (01.00%)
|
->20.38% (4,295,114,752B) 0x2070F9D: binary_log::transaction::compression::Base_compressor_decompressor::reserve(unsigned long) (base.cpp:81)
| ->20.38% (4,295,114,752B) 0x2071EC7: binary_log::transaction::compression::Zstd_dec::decompress(unsigned char const*, unsigned long) (zstd.cpp:232)
| ->20.38% (4,295,114,752B) 0x20714B5: binary_log::transaction::compression::Iterable_buffer::Iterable_buffer(char const*, unsigned long, unsigned long, binary_log::transaction::compression::type) (iterat
or.cpp:54)
| ->20.38% (4,295,114,752B) 0x1CD97B2: binlog::tools::Iterator::do_next() (iterators.cc:79)
| ->20.38% (4,295,114,752B) 0x1CD463C: binlog::Binlog_recovery::recover() (recovery.cc:63)
| ->20.38% (4,295,114,752B) 0x1C8266A: MYSQL_BIN_LOG::open_binlog(char const*) (binlog.cc:7880)
| ->20.38% (4,295,114,752B) 0xCAE810: init_server_components() (mysqld.cc:6816)
| ->20.38% (4,295,114,752B) 0xCB5B72: mysqld_main(int, char**) (mysqld.cc:7803)
| ->20.38% (4,295,114,752B) 0x6A9B554: (below main) (in /usr/lib64/libc-2.17.so)
|
->20.06% (4,228,033,228B) 0x204F45C: std_allocator (my_malloc.cc:70)
| ->20.06% (4,228,033,228B) 0x204F45C: my_raw_malloc<redirecting_allocator> (my_malloc.cc:322)
| ->20.06% (4,228,033,228B) 0x204F45C: void* my_internal_malloc<&(redirecting_allocator(unsigned long, int))>(unsigned int, unsigned long, int) (my_malloc.cc:372)
| ->20.06% (4,227,863,239B) 0x1CD9884: binlog::tools::Iterator::do_next() (iterators.cc:95)
| | ->20.06% (4,227,863,239B) 0x1CD463C: binlog::Binlog_recovery::recover() (recovery.cc:63)
| | ->20.06% (4,227,863,239B) 0x1C8266A: MYSQL_BIN_LOG::open_binlog(char const*) (binlog.cc:7880)
| | ->20.06% (4,227,863,239B) 0xCAE810: init_server_components() (mysqld.cc:6816)
| | ->20.06% (4,227,863,239B) 0xCB5B72: mysqld_main(int, char**) (mysqld.cc:7803)
| | ->20.06% (4,227,863,239B) 0x6A9B554: (below main) (in /usr/lib64/libc-2.17.so)
| |
| ->00.00% (169,989B) in 1+ places, all below ms_print's threshold (01.00%)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment