painless-security / trust-router

Moonshot Trust Router
0 stars 0 forks source link

Segfault when preparing community update #63

Closed jennifer-richards closed 6 years ago

jennifer-richards commented 6 years ago

Encountered a segfault when preparing a community update for a TRP peer:

trps_update: rc=0 after attempting update.
trp_rtable_get_realm_entries: entered.
trp_route_set_triggered: setting route to apc.sports.psec.us/apc.sports.psec.us through  to not triggered
tr_fspec_matches: Field info_type value "comm" matches "comm" for trp_inbound filter.
tr_fspec_matches: Field comm value "apc.sports.psec.us" matches "*" for trp_inbound filter.
trps_handle_update: handling community inforec.
trps_compute_expiry: tv_sec=109903, interval=30, small_factor*interval=90
trps_handle_inforec_comm: added RP realm redsox.com to comm apc.sports.psec.us (origin tr.qa.painless-security.com:12308).
trp_rtable_get_realm_entries: entered.
trps_get_selected_route: entered. trps=0x55baa7be09f0, comm=0x55baa7be4e10, realm=0x55baa7be5020
trp_rtable_get_realm_entries: entered.
trp_rtable_get_selected_entry: looking through route table entries for realm apc.sports.psec.us.
trp_rtable_get_selected_entry: ii=0.
trps_update_one_peer: preparing triggered update for tr.qa.painless-security.com:12308
trps_update_one_peer: selecting route updates for tr.qa.painless-security.com:12308.
trp_rtable_get_realm_entries: entered.
trp_rtable_get_selected_entry: looking through route table entries for realm apc.sports.psec.us.
trp_rtable_get_selected_entry: ii=0.
trps_select_realm_update: tr.qa.painless-security.com:12308 vs 
trps_update_one_peer: selecting community updates for tr.qa.painless-security.com:12308.
trps_update_one_peer: no updates for tr.qa.painless-security.com:12308
trps_update: rc=0 after attempting update.
trp_rtable_get_realm_entries: entered.
trp_route_set_triggered: setting route to apc.sports.psec.us/apc.sports.psec.us through  to not triggered
tr_connection_update: checking peer connections.
tr_connection_update: checking peer connections.
mons_sweep_procs: monitoring process 11883 terminated.
mons_sweep_procs: monitoring process 11883 terminated by signal 11.
tr_gss_handle_connection: Attempting to accept trustmonitor connection on fd 19.
tr_gss_auth_connection: Beginning passive authentication as trustmonitor@tr.indiana.qa.painless-security.com
tr_trps_update: sending scheduled route/community updates.
trps_update_one_peer: preparing scheduled update for tr.qa.painless-security.com:12308
trps_update_one_peer: selecting route updates for tr.qa.painless-security.com:12308.
trp_rtable_get_realm_entries: entered.
trp_rtable_get_selected_entry: looking through route table entries for realm apc.sports.psec.us.
trp_rtable_get_selected_entry: ii=0.
trps_select_realm_update: tr.qa.painless-security.com:12308 vs 
trp_upd_add_inforec: adding record.
trps_update_one_peer: selecting community updates for tr.qa.painless-security.com:12308.
Segmentation fault
jennifer-richards commented 6 years ago

This was happening fairly frequently when I was starting and stopping a peer until I implemented the part of #68 that fixed cleanup of incoming TRP connections. I have not seen it since then. I suspect there was some null pointer condition caused by trying to send updates to a disconnected peer that had been partially cleaned up.

I am closing this without a test - it will be covered by other testing. Reopen if the segfault occurs again.