Skip to content
This repository has been archived by the owner on Feb 10, 2023. It is now read-only.

编译报错 gcc version 4.8.5 cmake version 2.8.12.2 #13

Closed
quqiufeng opened this issue Jul 30, 2019 · 4 comments
Closed

编译报错 gcc version 4.8.5 cmake version 2.8.12.2 #13

quqiufeng opened this issue Jul 30, 2019 · 4 comments

Comments

@quqiufeng
Copy link

../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o): In function ha_tokupart': /root/tokudb/storage/tokudb/ha_tokupart.h:34: undefined reference to native_part::Partition_base::Partition_base(handlerton*, TABLE_SHARE*, native_part::Partition_base*, st_mem_root*)'
/root/tokudb/storage/tokudb/ha_tokupart.h:34: undefined reference to native_part::Partition_base::~Partition_base()' /root/tokudb/storage/tokudb/ha_tokupart.h:26: undefined reference to native_part::Partition_base::Partition_base(handlerton*, TABLE_SHARE*)'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o): In function ha_tokudb::delete_rename_partitioned_table(char const*, char const*, std::string const&)': /root/tokudb/storage/tokudb/ha_tokudb.cc:7623: undefined reference to native_part::parse_partition_info(THD*, std::string const&)'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o): In function ha_tokupart': /root/tokudb/storage/tokudb/ha_tokupart.h:26: undefined reference to native_part::Partition_base::Partition_base(handlerton*, TABLE_SHARE*)'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o): In function ha_tokudb::delete_rename_partitioned_table(char const*, char const*, std::string const&)': /root/tokudb/storage/tokudb/ha_tokudb.cc:7629: undefined reference to native_part::Partition_base::initialize_partition(st_mem_root*)'
/root/tokudb/storage/tokudb/ha_tokudb.cc:7633: undefined reference to native_part::Partition_base::rename_table(char const*, char const*)' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o): In function ~ha_tokupart':
/root/tokudb/storage/tokudb/ha_tokupart.h:38: undefined reference to native_part::Partition_base::~Partition_base()' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o): In function ha_tokudb::delete_rename_partitioned_table(char const*, char const*, std::string const&)':
/root/tokudb/storage/tokudb/ha_tokudb.cc:7635: undefined reference to native_part::Partition_base::delete_table(char const*)' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o): In function ~ha_tokupart':
/root/tokudb/storage/tokudb/ha_tokupart.h:38: undefined reference to native_part::Partition_base::~Partition_base()' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o): In function ha_tokudb::delete_table(char const*)':
/root/tokudb/storage/tokudb/ha_tokudb.cc:7649: undefined reference to native_part::get_part_str_for_table(char const*, std::string&)' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o): In function ha_tokudb::rename_table(char const*, char const*)':
/root/tokudb/storage/tokudb/ha_tokudb.cc:7733: undefined reference to native_part::get_part_str_for_table(char const*, std::string&)' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o): In function ha_tokupart::~ha_tokupart()':
/root/tokudb/storage/tokudb/ha_tokupart.h:38: undefined reference to native_part::Partition_base::~Partition_base()' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o): In function ha_tokupart::~ha_tokupart()':
/root/tokudb/storage/tokudb/ha_tokupart.h:38: undefined reference to native_part::Partition_base::~Partition_base()' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTI11ha_tokupart[_ZTI11ha_tokupart]+0x10): undefined reference to typeinfo for native_part::Partition_base'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x38): undefined reference to native_part::Partition_base::init_with_fields()' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x40): undefined reference to native_part::Partition_base::print_error(int, int)'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x48): undefined reference to native_part::Partition_base::get_error_message(int, String*)' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x58): undefined reference to native_part::Partition_base::change_table_ptr(TABLE*, TABLE_SHARE*)'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x60): undefined reference to native_part::Partition_base::scan_time()' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x68): undefined reference to native_part::Partition_base::read_time(unsigned int, unsigned int, unsigned long long)'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0xb8): undefined reference to native_part::Partition_base::keys_to_use_for_scanning()' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0xc0): undefined reference to native_part::Partition_base::extra_rec_buf_length() const'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0xd8): undefined reference to native_part::Partition_base::records(unsigned long long*)' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0xe0): undefined reference to native_part::Partition_base::estimate_rows_upper_bound()'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0xe8): undefined reference to native_part::Partition_base::get_row_type() const' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0xf0): undefined reference to native_part::Partition_base::index_type(unsigned int)'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x178): undefined reference to native_part::Partition_base::has_gap_locks() const' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x180): undefined reference to native_part::Partition_base::rpl_can_handle_stm_event() const'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x1e0): undefined reference to native_part::Partition_base::records_in_range(unsigned int, st_key_range*, st_key_range*)' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x1f0): undefined reference to native_part::Partition_base::info(unsigned int)'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x200): undefined reference to native_part::Partition_base::extra(ha_extra_function)' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x220): undefined reference to native_part::Partition_base::was_semi_consistent_read()'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x228): undefined reference to native_part::Partition_base::try_semi_consistent_read(bool)' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x230): undefined reference to native_part::Partition_base::unlock_row()'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x238): undefined reference to native_part::Partition_base::start_stmt(THD*, thr_lock_type)' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x240): undefined reference to native_part::Partition_base::get_auto_increment(unsigned long long, unsigned long long, unsigned long long, unsigned long long*, unsigned long long*)'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x250): undefined reference to native_part::Partition_base::update_create_info(st_ha_create_information*)' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x258): undefined reference to native_part::Partition_base::assign_to_keycache(THD*, st_ha_check_opt*)'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x260): undefined reference to native_part::Partition_base::preload_keys(THD*, st_ha_check_opt*)' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x268): undefined reference to native_part::Partition_base::indexes_are_disabled()'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x288): undefined reference to native_part::Partition_base::can_switch_engines()' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x2b0): undefined reference to native_part::Partition_base::init_table_handle_for_HANDLER()'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x2c0): undefined reference to native_part::Partition_base::table_type() const' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x2d8): undefined reference to native_part::Partition_base::max_supported_record_length() const'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x2e0): undefined reference to native_part::Partition_base::max_supported_keys() const' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x2e8): undefined reference to native_part::Partition_base::max_supported_key_parts() const'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x2f0): undefined reference to native_part::Partition_base::max_supported_key_length() const' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x2f8): undefined reference to native_part::Partition_base::max_supported_key_part_length(st_ha_create_information*) const'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x300): undefined reference to native_part::Partition_base::min_record_length(unsigned int) const' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x318): undefined reference to native_part::Partition_base::is_crashed() const'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x320): undefined reference to native_part::Partition_base::auto_repair() const' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x328): undefined reference to native_part::Partition_base::lock_count() const'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x330): undefined reference to native_part::Partition_base::store_lock(THD*, st_thr_lock_data**, thr_lock_type)' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x338): undefined reference to native_part::Partition_base::table_cache_type()'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x350): undefined reference to native_part::Partition_base::cmp_ref(unsigned char const*, unsigned char const*)' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x368): undefined reference to native_part::Partition_base::idx_cond_push(unsigned int, Item*)'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x370): undefined reference to native_part::Partition_base::cancel_pushed_idx_cond()' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x3a0): undefined reference to native_part::Partition_base::check_if_incompatible_data(st_ha_create_information*, unsigned int)'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x3a8): undefined reference to native_part::Partition_base::check_if_supported_inplace_alter(TABLE*, Alter_inplace_info*)' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x3b0): undefined reference to native_part::Partition_base::prepare_inplace_alter_table(TABLE*, Alter_inplace_info*)'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x3b8): undefined reference to native_part::Partition_base::inplace_alter_table(TABLE*, Alter_inplace_info*)' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x3c0): undefined reference to native_part::Partition_base::commit_inplace_alter_table(TABLE*, Alter_inplace_info*, bool)'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x3c8): undefined reference to native_part::Partition_base::notify_table_changed()' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x3e8): undefined reference to native_part::Partition_base::rename_table(char const*, char const*)'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x3f0): undefined reference to native_part::Partition_base::delete_table(char const*)' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x3f8): undefined reference to native_part::Partition_base::open(char const*, int, unsigned int)'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x400): undefined reference to native_part::Partition_base::close()' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x440): undefined reference to native_part::Partition_base::reset()'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x448): undefined reference to native_part::Partition_base::table_flags() const' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x450): undefined reference to native_part::Partition_base::external_lock(THD*, int)'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x460): undefined reference to native_part::Partition_base::check_for_upgrade(st_ha_check_opt*)' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x468): undefined reference to native_part::Partition_base::check(THD*, st_ha_check_opt*)'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x470): undefined reference to native_part::Partition_base::repair(THD*, st_ha_check_opt*)' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x478): undefined reference to native_part::Partition_base::start_bulk_insert(unsigned long long)'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x480): undefined reference to native_part::Partition_base::end_bulk_insert()' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x4a0): undefined reference to native_part::Partition_base::delete_all_rows()'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x4a8): undefined reference to native_part::Partition_base::truncate()' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x4b0): undefined reference to native_part::Partition_base::optimize(THD*, st_ha_check_opt*)'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x4b8): undefined reference to native_part::Partition_base::analyze(THD*, st_ha_check_opt*)' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x4c0): undefined reference to native_part::Partition_base::check_and_repair(THD*)'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x4c8): undefined reference to native_part::Partition_base::disable_indexes(unsigned int)' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x4d0): undefined reference to native_part::Partition_base::enable_indexes(unsigned int)'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x4d8): undefined reference to native_part::Partition_base::discard_or_import_tablespace(char)' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x4e8): undefined reference to native_part::Partition_base::create(char const*, TABLE*, st_ha_create_information*)'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x4f8): undefined reference to native_part::Partition_base::set_ha_share_ref(Handler_share**)' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x500): undefined reference to native_part::Partition_base::update_field_defs_with_zip_dict_info(THD*, char const*)'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x508): undefined reference to native_part::Partition_base::rpl_lookup_rows()' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x510): undefined reference to native_part::Partition_base::rpl_before_write_rows()'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x518): undefined reference to native_part::Partition_base::rpl_after_write_rows()' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x520): undefined reference to native_part::Partition_base::rpl_before_delete_rows()'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x528): undefined reference to native_part::Partition_base::rpl_after_delete_rows()' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x530): undefined reference to native_part::Partition_base::rpl_before_update_rows()'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x538): undefined reference to native_part::Partition_base::rpl_after_update_rows()' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x550): undefined reference to native_part::Partition_base::initialize_partition(st_mem_root*)'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x560): undefined reference to native_part::Partition_base::prepare_for_new_partitions(unsigned int, bool)' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x568): undefined reference to native_part::Partition_base::create_new_partition(TABLE*, st_ha_create_information*, char const*, unsigned int, partition_element*)'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x570): undefined reference to native_part::Partition_base::write_row_in_new_part(unsigned int)' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x578): undefined reference to native_part::Partition_base::close_new_partitions()'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x580): undefined reference to native_part::Partition_base::truncate_partition_low()' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x588): undefined reference to native_part::Partition_base::get_dynamic_partition_info(ha_statistics*, unsigned int*, unsigned int)'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x590): undefined reference to native_part::Partition_base::release_auto_increment_all_parts()' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x5b0): undefined reference to native_part::Partition_base::write_row_in_part(unsigned int, unsigned char*)'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x5b8): undefined reference to native_part::Partition_base::update_row_in_part(unsigned int, unsigned char const*, unsigned char*)' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x5c0): undefined reference to native_part::Partition_base::delete_row_in_part(unsigned int, unsigned char const*)'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x5c8): undefined reference to native_part::Partition_base::rnd_init_in_part(unsigned int, bool)' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x5d0): undefined reference to native_part::Partition_base::rnd_next_in_part(unsigned int, unsigned char*)'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x5d8): undefined reference to native_part::Partition_base::rnd_end_in_part(unsigned int, bool)' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x5e0): undefined reference to native_part::Partition_base::position_in_last_part(unsigned char*, unsigned char const*)'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x5e8): undefined reference to native_part::Partition_base::rnd_pos_in_part(unsigned int, unsigned char*, unsigned char*)' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x5f0): undefined reference to native_part::Partition_base::index_init_in_part(unsigned int, unsigned int, bool)'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x5f8): undefined reference to native_part::Partition_base::index_end_in_part(unsigned int)' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x600): undefined reference to native_part::Partition_base::index_last_in_part(unsigned int, unsigned char*)'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x608): undefined reference to native_part::Partition_base::index_first_in_part(unsigned int, unsigned char*)' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x610): undefined reference to native_part::Partition_base::index_prev_in_part(unsigned int, unsigned char*)'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x618): undefined reference to native_part::Partition_base::index_next_in_part(unsigned int, unsigned char*)' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x620): undefined reference to native_part::Partition_base::index_next_same_in_part(unsigned int, unsigned char*, unsigned char const*, unsigned int)'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x628): undefined reference to native_part::Partition_base::index_read_map_in_part(unsigned int, unsigned char*, unsigned char const*, unsigned long, ha_rkey_function)' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x630): undefined reference to native_part::Partition_base::index_read_idx_map_in_part(unsigned int, unsigned char*, unsigned int, unsigned char const*, unsigned long, ha_rkey_function)'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x638): undefined reference to native_part::Partition_base::index_read_last_map_in_part(unsigned int, unsigned char*, unsigned char const*, unsigned long)' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x640): undefined reference to native_part::Partition_base::read_range_first_in_part(unsigned int, unsigned char*, st_key_range const*, st_key_range const*, bool, bool)'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x648): undefined reference to native_part::Partition_base::read_range_next_in_part(unsigned int, unsigned char*)' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x650): undefined reference to native_part::Partition_base::checksum_in_part(unsigned int) const'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x658): undefined reference to native_part::Partition_base::initialize_auto_increment(bool)' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x6d8): undefined reference to non-virtual thunk to native_part::Partition_base::write_row_in_part(unsigned int, unsigned char*)'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x6e0): undefined reference to non-virtual thunk to native_part::Partition_base::update_row_in_part(unsigned int, unsigned char const*, unsigned char*)' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x6e8): undefined reference to non-virtual thunk to native_part::Partition_base::delete_row_in_part(unsigned int, unsigned char const*)'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x6f0): undefined reference to non-virtual thunk to native_part::Partition_base::initialize_auto_increment(bool)' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x6f8): undefined reference to non-virtual thunk to native_part::Partition_base::release_auto_increment_all_parts()'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x708): undefined reference to non-virtual thunk to native_part::Partition_base::rnd_init_in_part(unsigned int, bool)' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x710): undefined reference to non-virtual thunk to native_part::Partition_base::rnd_next_in_part(unsigned int, unsigned char*)'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x718): undefined reference to non-virtual thunk to native_part::Partition_base::rnd_end_in_part(unsigned int, bool)' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x720): undefined reference to non-virtual thunk to native_part::Partition_base::position_in_last_part(unsigned char*, unsigned char const*)'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x728): undefined reference to non-virtual thunk to native_part::Partition_base::rnd_pos_in_part(unsigned int, unsigned char*, unsigned char*)' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x730): undefined reference to non-virtual thunk to native_part::Partition_base::index_init_in_part(unsigned int, unsigned int, bool)'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x738): undefined reference to non-virtual thunk to native_part::Partition_base::index_end_in_part(unsigned int)' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x740): undefined reference to non-virtual thunk to native_part::Partition_base::index_first_in_part(unsigned int, unsigned char*)'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x748): undefined reference to non-virtual thunk to native_part::Partition_base::index_last_in_part(unsigned int, unsigned char*)' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x750): undefined reference to non-virtual thunk to native_part::Partition_base::index_prev_in_part(unsigned int, unsigned char*)'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x758): undefined reference to non-virtual thunk to native_part::Partition_base::index_next_in_part(unsigned int, unsigned char*)' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x760): undefined reference to non-virtual thunk to native_part::Partition_base::index_next_same_in_part(unsigned int, unsigned char*, unsigned char const*, unsigned int)'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x768): undefined reference to non-virtual thunk to native_part::Partition_base::index_read_map_in_part(unsigned int, unsigned char*, unsigned char const*, unsigned long, ha_rkey_function)' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x770): undefined reference to non-virtual thunk to native_part::Partition_base::index_read_last_map_in_part(unsigned int, unsigned char*, unsigned char const*, unsigned long)'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x778): undefined reference to non-virtual thunk to native_part::Partition_base::read_range_first_in_part(unsigned int, unsigned char*, st_key_range const*, st_key_range const*, bool, bool)' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x780): undefined reference to non-virtual thunk to native_part::Partition_base::read_range_next_in_part(unsigned int, unsigned char*)'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x788): undefined reference to non-virtual thunk to native_part::Partition_base::index_read_idx_map_in_part(unsigned int, unsigned char*, unsigned int, unsigned char const*, unsigned long, ha_rkey_function)' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x7a0): undefined reference to non-virtual thunk to native_part::Partition_base::checksum_in_part(unsigned int) const'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x7b0): undefined reference to non-virtual thunk to native_part::Partition_base::prepare_for_new_partitions(unsigned int, bool)' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x7b8): undefined reference to non-virtual thunk to native_part::Partition_base::create_new_partition(TABLE*, st_ha_create_information*, char const*, unsigned int, partition_element*)'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x7c0): undefined reference to non-virtual thunk to native_part::Partition_base::close_new_partitions()' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x7c8): undefined reference to non-virtual thunk to native_part::Partition_base::write_row_in_new_part(unsigned int)'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x7e8): undefined reference to non-virtual thunk to native_part::Partition_base::get_dynamic_partition_info(ha_statistics*, unsigned int*, unsigned int)' ../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x810): undefined reference to non-virtual thunk to native_part::Partition_base::initialize_partition(st_mem_root*)'
../../../archive_output_directory/libtokudb.a(ha_tokudb.cc.o):(.data.rel.ro._ZTV11ha_tokupart[_ZTV11ha_tokupart]+0x820): undefined reference to `non-virtual thunk to native_part::Partition_base::truncate_partition_low()'
collect2: error: ld returned 1 exit status
make[2]: *** [storage/perfschema/unittest/pfs_connect_attr-t] Error 1
make[1]: *** [storage/perfschema/unittest/CMakeFiles/pfs_connect_attr-t.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[100%] Built target mysqld
make: *** [all] Error 2

@BohuTANG
Copy link
Collaborator

Hello,

What's your gcc/g++ and cmake version?

@quqiufeng
Copy link
Author

gcc version 7.3.1
cmake version 2.8.12.2

@BohuTANG
Copy link
Collaborator

From the error stack, we can't address the issue caused.
Please clean cmake cache files and try gcc/g++-5 what the travis build:
https://github.com/xelabs/tokudb/blob/5.7/.travis.yml#L13

Travis build passing job log is here:
https://travis-ci.org/xelabs/tokudb/builds/546552477?utm_source=github_status&utm_medium=notification

@quqiufeng
Copy link
Author

fixed!

TCeason pushed a commit to TCeason/tokudb that referenced this issue Mar 8, 2020
…E TO A SERVER

Problem
========================================================================
Running the GCS tests with ASAN seldomly reports a user-after-free of
the server reference that the acceptor_learner_task uses.

Here is an excerpt of ASAN's output:

==43936==ERROR: AddressSanitizer: heap-use-after-free on address 0x63100021c840 at pc 0x000000530ff8 bp 0x7fc0427e8530 sp 0x7fc0427e8520
WRITE of size 8 at 0x63100021c840 thread T3
    #0 0x530ff7 in server_detected /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_transport.c:962
    #1 0x533814 in buffered_read_bytes /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_transport.c:1249
    #2 0x5481af in buffered_read_msg /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_transport.c:1399
    xelabs#3 0x51e171 in acceptor_learner_task /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_base.c:4690
    xelabs#4 0x562357 in task_loop /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/task.c:1140
    xelabs#5 0x5003b2 in xcom_taskmain2 /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_base.c:1324
    xelabs#6 0x6a278a in Gcs_xcom_proxy_impl::xcom_init(unsigned short, node_address*) /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/gcs_xcom_proxy.cc:164
    xelabs#7 0x59b3c1 in xcom_taskmain_startup /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/gcs_xcom_control_interface.cc:107
    xelabs#8 0x7fc04a2e4dd4 in start_thread (/lib64/libpthread.so.0+0x7dd4)
    xelabs#9 0x7fc047ff2bfc in __clone (/lib64/libc.so.6+0xfebfc)

0x63100021c840 is located 64 bytes inside of 65688-byte region [0x63100021c800,0x63100022c898)
freed by thread T3 here:
    #0 0x7fc04a5d7508 in __interceptor_free (/lib64/libasan.so.4+0xde508)
    #1 0x52cf86 in freesrv /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_transport.c:836
    #2 0x52ea78 in srv_unref /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_transport.c:868
    xelabs#3 0x524c30 in reply_handler_task /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_base.c:4914
    xelabs#4 0x562357 in task_loop /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/task.c:1140
    xelabs#5 0x5003b2 in xcom_taskmain2 /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_base.c:1324
    xelabs#6 0x6a278a in Gcs_xcom_proxy_impl::xcom_init(unsigned short, node_address*) /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/gcs_xcom_proxy.cc:164
    xelabs#7 0x59b3c1 in xcom_taskmain_startup /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/gcs_xcom_control_interface.cc:107
    xelabs#8 0x7fc04a2e4dd4 in start_thread (/lib64/libpthread.so.0+0x7dd4)

previously allocated by thread T3 here:
    #0 0x7fc04a5d7a88 in __interceptor_calloc (/lib64/libasan.so.4+0xdea88)
    #1 0x543604 in mksrv /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_transport.c:721
    #2 0x543b4c in addsrv /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_transport.c:755
    xelabs#3 0x54af61 in update_servers /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_transport.c:1747
    xelabs#4 0x501082 in site_install_action /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_base.c:1572
    xelabs#5 0x55447c in import_config /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/site_def.c:486
    xelabs#6 0x506dfc in handle_x_snapshot /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_base.c:5257
    xelabs#7 0x50c444 in xcom_fsm /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_base.c:5325
    xelabs#8 0x516c36 in dispatch_op /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_base.c:4510
    xelabs#9 0x521997 in acceptor_learner_task /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_base.c:4772
    xelabs#10 0x562357 in task_loop /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/task.c:1140
    xelabs#11 0x5003b2 in xcom_taskmain2 /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_base.c:1324
    xelabs#12 0x6a278a in Gcs_xcom_proxy_impl::xcom_init(unsigned short, node_address*) /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/gcs_xcom_proxy.cc:164
    xelabs#13 0x59b3c1 in xcom_taskmain_startup /home/tvale/mysql/plugin/group_replication/libmysqlgcs/src/bindings/xcom/gcs_xcom_control_interface.cc:107
    xelabs#14 0x7fc04a2e4dd4 in start_thread (/lib64/libpthread.so.0+0x7dd4)

Analysis
========================================================================
The server structure is reference counted by the associated sender_task
and reply_handler_task.
When they finish, they unreference the server, which leads to its memory
being freed.

However, the acceptor_learner_task keeps a "naked" reference to the
server structure.
Under the right ordering of operations, i.e. the sender_task and
reply_handler_task terminating after the acceptor_learner_task acquires,
but before it uses, the reference to the server structure, leads to the
acceptor_learner_task accessing the server structure after it has been
freed.

Solution
========================================================================
Let the acceptor_learner_task also reference count the server structure
so it is not freed while still in use.

Reviewed-by: André Negrão <andre.negrao@oracle.com>
Reviewed-by: Venkatesh Venugopal <venkatesh.venugopal@oracle.com>
RB: 21209
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants