Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core: duplicate symbols from libevent #677

Closed
rebello95 opened this issue Feb 11, 2020 · 1 comment · Fixed by #678
Closed

core: duplicate symbols from libevent #677

rebello95 opened this issue Feb 11, 2020 · 1 comment · Fixed by #678
Assignees
Labels

Comments

@rebello95
Copy link
Contributor

Similar to #617, we're seeing duplicate symbols in the final Envoy.framework/Envoy binary coming from libevent.

Example symbols appearing as duplicated:

23:26:31.067314 Found symbol '_evutil_secure_rng_get_bytes' multiple times
23:26:31.067472 Found symbol '_event_get_supported_methods' multiple times
23:26:31.067487 Found symbol '_evbuffer_copyout_from' multiple times
23:26:31.067622 Found symbol '_event_base_gettimeofday_cached' multiple times
23:26:31.067652 Found symbol '_evbuffer_add_iovec' multiple times
23:26:31.067660 Found symbol '_evmap_signal_clear_' multiple times
23:26:31.067671 Found symbol '_event_changelist_add_' multiple times
23:26:31.067681 Found symbol '_event_base_foreach_event' multiple times
23:26:31.067688 Found symbol '_evmap_check_integrity_' multiple times
23:26:31.067710 Found symbol '_evbuffer_add_file' multiple times
23:26:31.067717 Found symbol '_bufferevent_get_read_max_' multiple times
23:26:31.067978 Found symbol '_evwatch_free' multiple times
23:26:31.067991 Found symbol '_event_config_require_features' multiple times
23:26:31.068313 Found symbol '_evutil_getaddrinfo' multiple times
23:26:31.068339 Found symbol '_event_callback_cancel_nolock_' multiple times
23:26:31.068348 Found symbol '_event_kq_add_notify_event_' multiple times
23:26:31.068420 Found symbol '_event_sock_err' multiple times
23:26:31.068435 Found symbol '_evutil_gettime_monotonic' multiple times
23:26:31.068443 Found symbol '_evconnlistener_set_cb' multiple times
23:26:31.068450 Found symbol '_event_errx' multiple times
23:26:31.068531 Found symbol '_event_loopbreak' multiple times
23:26:31.068542 Found symbol '_evconnlistener_new' multiple times
23:26:31.068693 Found symbol '_event_enable_debug_logging' multiple times
23:26:31.068720 Found symbol '_event_changelist_freemem_' multiple times
23:26:31.068822 Found symbol '_bufferevent_setfd' multiple times
23:26:31.068845 Found symbol '_event_err' multiple times
23:26:31.068856 Found symbol '_evbuffer_read' multiple times
23:26:31.068866 Found symbol '_bufferevent_socket_connect_hostname_hints' multiple times
23:26:31.068879 Found symbol '_evbuffer_invoke_callbacks_' multiple times
23:26:31.069168 Found symbol '_bufferevent_enable' multiple times
23:26:31.069184 Found symbol '_event_base_dispatch' multiple times
23:26:31.069319 Found symbol '_evwatch_base' multiple times
23:26:31.069334 Found symbol '_event_deferred_cb_set_priority_' multiple times
23:26:31.069402 Found symbol '_evsig_init_' multiple times
23:26:31.069623 Found symbol '_event_active_later_nolock_' multiple times
23:26:31.069650 Found symbol '_bufferevent_disable' multiple times
23:26:31.069810 Found symbol '_evutil_usleep_' multiple times
23:26:31.069825 Found symbol '_event_get_priority' multiple times
23:26:31.069985 Found symbol '_event_logv_' multiple times
23:26:31.070281 Found symbol '_evbuffer_add_buffer' multiple times
23:26:31.070304 Found symbol '_evthread_lock_fns_' multiple times
23:26:31.070314 Found symbol '_evbuffer_add_file_segment' multiple times
23:26:31.070351 Found symbol '_bufferevent_decref' multiple times
23:26:31.070368 Found symbol '_EVUTIL_ISSPACE_' multiple times
23:26:31.070560 Found symbol '_event_init' multiple times
23:26:31.070575 Found symbol '_event_get_struct_event_size' multiple times
23:26:31.070586 Found symbol '_bufferevent_get_token_bucket_cfg' multiple times
23:26:31.070819 Found symbol '_evutil_eventfd_' multiple times
23:26:31.070837 Found symbol '_evutil_getaddrinfo_common_' multiple times
23:26:31.070888 Found symbol '_evbuffer_lock' multiple times
23:26:31.071105 Found symbol '_bufferevent_socket_get_conn_address_' multiple times
23:26:31.071123 Found symbol '_evutil_vsnprintf' multiple times
23:26:31.071134 Found symbol '_event_base_dump_events' multiple times
23:26:31.071266 Found symbol '_evutil_ascii_strcasecmp' multiple times
23:26:31.071389 Found symbol '_event_base_stop_iocp_' multiple times
23:26:31.071517 Found symbol '_event_mm_malloc_' multiple times
23:26:31.071547 Found symbol '_bufferevent_decrement_write_buckets_' multiple times
23:26:31.071793 Found symbol '_event_callback_finalize_' multiple times
23:26:31.071828 Found symbol '_event_base_get_max_events' multiple times
23:26:31.071836 Found symbol '_event_base_assert_ok_nolock_' multiple times
23:26:31.071845 Found symbol '_evconnlistener_disable' multiple times
23:26:31.071897 Found symbol '_evbuffer_cb_set_flags' multiple times
23:26:31.071910 Found symbol '_event_config_set_num_cpus_hint' multiple times
23:26:31.071921 Found symbol '_event_base_assert_ok_' multiple times
23:26:31.072011 Found symbol '_bufferevent_suspend_write_' multiple times
23:26:31.072288 Found symbol '_evbuffer_prepend' multiple times
23:26:31.072569 Found symbol '_nil_eventop' multiple times
23:26:31.072748 Found symbol '_bufferevent_socket_get_dns_error' multiple times
23:26:31.072777 Found symbol '_evutil_secure_rng_add_bytes' multiple times
23:26:31.072956 Found symbol '_bufferevent_rate_limit_group_decrement_write' multiple times
23:26:31.073085 Found symbol '_evwatch_prepare_get_timeout' multiple times
23:26:31.073315 Found symbol '_bufferevent_generic_adj_existing_timeouts_' multiple times
23:26:31.073327 Found symbol '_evbuffer_readln' multiple times
23:26:31.073335 Found symbol '_event_config_avoid_method' multiple times
23:26:31.073341 Found symbol '_evutil_gettime_monotonic_' multiple times
23:26:31.073488 Found symbol '_evthread_make_base_notifiable' multiple times
23:26:31.073520 Found symbol '_evthread_get_condition_callbacks' multiple times
23:26:31.073649 Found symbol '_EVUTIL_ISUPPER_' multiple times
23:26:31.073675 Found symbol '_evbuffer_add_reference' multiple times
23:26:31.073684 Found symbol '_evbuffer_chain_pin_' multiple times
23:26:31.073909 Found symbol '_event_mm_calloc_' multiple times
23:26:31.074133 Found symbol '_evutil_v4addr_is_local_' multiple times
23:26:31.074159 Found symbol '_evutil_sockaddr_is_loopback_' multiple times
23:26:31.074168 Found symbol '_bufferevent_get_write_limit' multiple times
23:26:31.074175 Found symbol '_bufferevent_get_underlying' multiple times
23:26:31.074182 Found symbol '_bufferevent_set_max_single_read' multiple times
23:26:31.074273 Found symbol '_evutil_socket_finished_connecting_' multiple times
23:26:31.074286 Found symbol '_evbuffer_copyout' multiple times
23:26:31.074294 Found symbol '_event_base_get_npriorities' multiple times
23:26:31.074300 Found symbol '_evutil_monotonic_timer_free' multiple times
23:26:31.074307 Found symbol '_event_base_loopbreak' multiple times
23:26:31.074457 Found symbol '_evutil_set_evdns_getaddrinfo_fn_' multiple times
23:26:31.074477 Found symbol '_evbuffer_new' multiple times
23:26:31.074561 Found symbol '_bufferevent_suspend_read_' multiple times
23:26:31.074701 Found symbol '_evutil_tv_to_msec_' multiple times
23:26:31.074719 Found symbol '_evutil_make_socket_closeonexec' multiple times
23:26:31.074768 Found symbol '_bufferevent_enable_locking_' multiple times
23:26:31.074783 Found symbol '_evbuffer_search_eol' multiple times
23:26:31.075015 Found symbol '_event_changelist_remove_all_' multiple times
23:26:31.075392 Found symbol '_event_config_new' multiple times
23:26:31.075448 Found symbol '_event_active_later_' multiple times
23:26:31.075458 Found symbol '_evutil_new_addrinfo_' multiple times
23:26:31.075464 Found symbol '_bufferevent_getfd' multiple times
23:26:31.075699 Found symbol '_evthread_set_lock_callbacks' multiple times
23:26:31.075716 Found symbol '_bufferevent_read_buffer' multiple times
23:26:31.075724 Found symbol '_bufferevent_incref' multiple times
23:26:31.075733 Found symbol '_event_base_get_method' multiple times
23:26:31.075743 Found symbol '_event_base_set' multiple times
23:26:31.075886 Found symbol '_bufferevent_rate_limit_group_get_totals' multiple times
23:26:31.075911 Found symbol '_evthread_id_fn_' multiple times
23:26:31.076049 Found symbol '_evbuffer_ptr_set' multiple times
23:26:31.076236 Found symbol '_ev_token_bucket_cfg_new' multiple times
23:26:31.076422 Found symbol '_event_get_base' multiple times
23:26:31.076437 Found symbol '_bufferevent_get_max_to_read' multiple times
23:26:31.076444 Found symbol '_bufferevent_pair_get_partner' multiple times
23:26:31.076451 Found symbol '_event_del_noblock' multiple times
23:26:31.076543 Found symbol '_event_base_loopexit' multiple times
23:26:31.076825 Found symbol '_evbuffer_cb_clear_flags' multiple times
23:26:31.077086 Found symbol '_bufferevent_init_generic_timeout_cbs_' multiple times
23:26:31.077100 Found symbol '_evbuffer_unfreeze' multiple times
23:26:31.077255 Found symbol '_bufferevent_ops_pair' multiple times
23:26:31.077369 Found symbol '_evutil_open_closeonexec_' multiple times
23:26:31.077574 Found symbol '_event_callback_init_' multiple times
23:26:31.077741 Found symbol '_evthread_get_lock_callbacks' multiple times
23:26:31.077778 Found symbol '_EVUTIL_ISLOWER_' multiple times
23:26:31.078007 Found symbol '_evutil_ersatz_socketpair_' multiple times
23:26:31.078031 Found symbol '_evutil_secure_rng_init' multiple times
23:26:31.078223 Found symbol '_event_base_loopcontinue' multiple times
23:26:31.078548 Found symbol '_evutil_v6addr_is_local_' multiple times
23:26:31.078570 Found symbol '_evutil_closesocket' multiple times
23:26:31.078582 Found symbol '_bufferevent_get_base' multiple times
23:26:31.078592 Found symbol '_evthreadimpl_disable_lock_debugging_' multiple times
23:26:31.078752 Found symbol '_event_debug_logging_mask_' multiple times
23:26:31.078783 Found symbol '_bufferevent_unsuspend_read_' multiple times
23:26:31.078798 Found symbol '_evutil_inet_ntop' multiple times
23:26:31.078898 Found symbol '_bufferevent_setwatermark' multiple times
23:26:31.078989 Found symbol '_bufferevent_unlock' multiple times
23:26:31.079227 Found symbol '_bufferevent_get_priority' multiple times
23:26:31.079251 Found symbol '_bufferevent_set_max_single_write' multiple times
23:26:31.079350 Found symbol '_evmap_signal_active_' multiple times
23:26:31.079565 Found symbol '_EVUTIL_ISPRINT_' multiple times
23:26:31.079581 Found symbol '_evbuffer_add_cb' multiple times
23:26:31.079742 Found symbol '_EVUTIL_ISALNUM_' multiple times
23:26:31.079757 Found symbol '_event_finalize' multiple times
23:26:31.079764 Found symbol '_evbuffer_decref_and_unlock_' multiple times
23:26:31.079771 Found symbol '_evbuffer_incref_' multiple times
23:26:31.079944 Found symbol '_event_base_new' multiple times
23:26:31.080053 Found symbol '_evbuffer_set_parent_' multiple times
23:26:31.080070 Found symbol '_bufferevent_rate_limit_group_free' multiple times
23:26:31.080079 Found symbol '_event_get_fd' multiple times
23:26:31.080205 Found symbol '_bufferevent_add_to_rate_limit_group' multiple times
23:26:31.080218 Found symbol '_bufferevent_setcb' multiple times
23:26:31.080524 Found symbol '_bufferevent_run_readcb_' multiple times
23:26:31.080650 Found symbol '_evbuffer_read_setup_vecs_' multiple times
23:26:31.080675 Found symbol '_evbuffer_file_segment_free' multiple times
23:26:31.080682 Found symbol '_evmap_delete_all_' multiple times
23:26:31.080810 Found symbol '_bufferevent_read' multiple times
23:26:31.080825 Found symbol '_evconnlistener_free' multiple times
23:26:31.081106 Found symbol '_event_global_current_base_' multiple times
23:26:31.081118 Found symbol '_event_base_priority_init' multiple times
23:26:31.081125 Found symbol '_evutil_make_internal_pipe_' multiple times
23:26:31.081319 Found symbol '_event_free_finalize' multiple times
23:26:31.081333 Found symbol '_event_base_update_cache_time' multiple times
23:26:31.081438 Found symbol '_evbuffer_get_max_read' multiple times
23:26:31.081452 Found symbol '_bufferevent_init_common_' multiple times
23:26:31.081460 Found symbol '_bufferevent_set_timeouts' multiple times
23:26:31.081659 Found symbol '_event_set' multiple times
23:26:31.081673 Found symbol '_event_base_get_running_event' multiple times
23:26:31.081923 Found symbol '_event_get_assignment' multiple times
23:26:31.081951 Found symbol '_evutil_addrinfo_append_' multiple times
23:26:31.082058 Found symbol '_evbuffer_file_segment_add_cleanup_cb' multiple times
23:26:31.082083 Found symbol '_bufferevent_ops_filter' multiple times
23:26:31.082091 Found symbol '_bufferevent_socket_set_conn_address_fd_' multiple times
23:26:31.082237 Found symbol '_bufferevent_run_eventcb_' multiple times
23:26:31.082253 Found symbol '_evbuffer_free' multiple times
23:26:31.082260 Found symbol '_event_base_add_virtual_' multiple times
23:26:31.082267 Found symbol '_ev_token_bucket_init_' multiple times
23:26:31.082274 Found symbol '_bufferevent_decrement_write_limit' multiple times
23:26:31.082376 Found symbol '_evbuffer_incref_and_lock_' multiple times
23:26:31.082388 Found symbol '_evbuffer_setcb' multiple times
23:26:31.082396 Found symbol '_evthread_enable_lock_debugging' multiple times
23:26:31.082403 Found symbol '_bufferevent_get_read_limit' multiple times
23:26:31.082655 Found symbol '_event_deferred_cb_schedule_' multiple times
23:26:31.082795 Found symbol '_EVUTIL_TOUPPER_' multiple times
23:26:31.082811 Found symbol '_evbuffer_readline' multiple times
23:26:31.083158 Found symbol '_evconnlistener_enable' multiple times
23:26:31.083184 Found symbol '_evutil_weakrand_range_' multiple times
23:26:31.083193 Found symbol '_event_del_block' multiple times
23:26:31.083525 Found symbol '_evutil_rtrim_lws_' multiple times
23:26:31.083540 Found symbol '_evmap_io_get_fdinfo_' multiple times
23:26:31.083756 Found symbol '_event_dispatch' multiple times
23:26:31.083772 Found symbol '_event_loop' multiple times
23:26:31.083779 Found symbol '_evbuffer_add' multiple times
23:26:31.083786 Found symbol '_evmap_io_initmap_' multiple times
23:26:31.084100 Found symbol '_bufferevent_rate_limit_group_get_read_limit' multiple times
23:26:31.084298 Found symbol '_evutil_make_tcp_listen_socket_deferred' multiple times
23:26:31.084316 Found symbol '_bufferevent_remove_from_rate_limit_group' multiple times
23:26:31.084463 Found symbol '_EVUTIL_ISXDIGIT_' multiple times
23:26:31.084542 Found symbol '_event_once' multiple times
23:26:31.084690 Found symbol '_evutil_socket_connect_' multiple times
23:26:31.084705 Found symbol '_evbuffer_drain' multiple times
23:26:31.084784 Found symbol '_evutil_make_socket_nonblocking' multiple times
23:26:31.084799 Found symbol '_event_sock_warn' multiple times
23:26:31.084806 Found symbol '_evconnlistener_get_base' multiple times
23:26:31.085109 Found symbol '_event_debug_unassign' multiple times
23:26:31.085148 Found symbol '_evbuffer_freeze' multiple times
23:26:31.085249 Found symbol '_selectops' multiple times
23:26:31.085300 Found symbol '_evmap_signal_initmap_' multiple times
23:26:31.085385 Found symbol '_bufferevent_flush' multiple times
23:26:31.085402 Found symbol '_evutil_make_listen_socket_reuseable_port' multiple times
23:26:31.085409 Found symbol '_evutil_ascii_strncasecmp' multiple times
23:26:31.085616 Found symbol '_bufferevent_getwatermark' multiple times
23:26:31.085726 Found symbol '_evthread_set_condition_callbacks' multiple times
23:26:31.085921 Found symbol '_evutil_inet_pton' multiple times
23:26:31.086071 Found symbol '_event_deferred_cb_cancel_' multiple times
23:26:31.086091 Found symbol '_evthread_enable_lock_debuging' multiple times
23:26:31.086461 Found symbol '_evutil_free_secure_rng_globals_' multiple times
23:26:31.086482 Found symbol '_bufferevent_lock' multiple times
23:26:31.087107 Found symbol '_evbuffer_remove_cb_entry' multiple times
23:26:31.087126 Found symbol '_evutil_make_listen_socket_ipv6only' multiple times
23:26:31.087275 Found symbol '_event_remove_timer_nolock_' multiple times
23:26:31.087379 Found symbol '_bufferevent_get_options_' multiple times
23:26:31.087403 Found symbol '_evmap_reinit_' multiple times
23:26:31.087411 Found symbol '_bufferevent_get_write_max_' multiple times
23:26:31.087608 Found symbol '_evbuffer_search_range' multiple times
23:26:31.087620 Found symbol '_evutil_accept4_' multiple times
23:26:31.087804 Found symbol '_bufferevent_disable_hard_' multiple times
23:26:31.087913 Found symbol '_evbuffer_add_vprintf' multiple times
23:26:31.088254 Found symbol '_evthread_cond_fns_' multiple times
23:26:31.088269 Found symbol '_event_self_cbarg' multiple times
23:26:31.088471 Found symbol '_evbuffer_remove_buffer' multiple times
23:26:31.088482 Found symbol '_bufferevent_filter_new' multiple times
23:26:31.088773 Found symbol '_event_reinit' multiple times
23:26:31.088788 Found symbol '_bufferevent_ratelim_init_' multiple times
23:26:31.088796 Found symbol '_evbuffer_chain_unpin_' multiple times
23:26:31.088803 Found symbol '_evbuffer_write_atmost' multiple times
23:26:31.088939 Found symbol '_evbuffer_defer_callbacks' multiple times
23:26:31.089009 Found symbol '_evmap_io_clear_' multiple times
23:26:31.089154 Found symbol '_evbuffer_set_max_read' multiple times
23:26:31.089178 Found symbol '_event_get_callback_arg' multiple times

These symbols can be dumped using:

nm -arch arm64 -WUgj /path/to/Envoy.framework/Envoy

Root cause

A binary search (checking out different shas of Envoy and rebuilding, then searching for duplicate symbols in the dump) shows that this upstream PR caused the duplicated symbols to appear: envoyproxy/envoy#9915, in particular this commit.

@rebello95
Copy link
Contributor Author

Proposed upstream PR to fix: envoyproxy/envoy#10002

Started Slack discussion: https://envoyproxy.slack.com/archives/CNAK09BSB/p1581403500006600

zuercher pushed a commit to envoyproxy/envoy that referenced this issue Feb 11, 2020
Risk Level: low, macOS only
Testing: n/a
Docs Changes: n/a
Release Notes: n/a
Fixes: envoyproxy/envoy-mobile#677

Signed-off-by: Michael Rebello <me@michaelrebello.com>
junr03 added a commit that referenced this issue Feb 11, 2020
This bump brings in two relevant fixes

    envoyproxy/envoy#10002 fixes #677
    envoyproxy/envoy#10003 fixes #671

Signed-off-by: Jose Nino <jnino@lyft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant