amfd coredump happens in the same sceario of ticket #2477
In #2477, amfd prevents to create 2 active assignments for same 2N SI, but amfd has missed a case of 2 standby assignments, which leads to the coredump in this ticket
backtrace:
#0 0x00007f4092cdb0c7 in raise () from /lib64/libc.so.6 #1 0x00007f4092cdc478 in abort () from /lib64/libc.so.6 #2 0x00007f4093b3be2e in __osafassert_fail (__file=<optimized out>, __line=<optimized out>, __func=<optimized out>, __assertion=<optimized out>) at ../../opensaf/src/base/sysf_def.c:286 #3 0x00007f4094aa1058 in avd_sg_2n_act_susi (sg=sg@entry=0x7f4096ba41f0, stby_susi=stby_susi@entry=0x7ffe4e89ae80, cb=0x7f4094d2ce80 <_control_block>) at ../../opensaf/src/amf/amfd/sg_2n_fsm.cc:596 #4 0x00007f4094aa1b8f in avd_sg_2n_su_chose_asgn (cb=cb@entry=0x7f4094d2ce80 <_control_block>, sg=0x7f4096ba41f0) at ../../opensaf/src/amf/amfd/sg_2n_fsm.cc:649 #5 0x00007f4094aa70de in SG_2N::node_fail (this=0x7f4096ba41f0, cb=0x7f4094d2ce80 <_control_block>, su=0x7f4096bb6dd0) at ../../opensaf/src/amf/amfd/sg_2n_fsm.cc:3583 #6 0x00007f4094a97c8a in AVD_SG::failover_absent_assignment (this=0x7f4096ba41f0) at ../../opensaf/src/amf/amfd/sg.cc:2310 #7 0x00007f4094a4e155 in avd_cluster_tmr_init_evh (cb=0x7f4094d2ce80 <_control_block>, evt=<optimized out>) at ../../opensaf/src/amf/amfd/cluster.cc:103 #8 0x00007f4094a7689c in process_event (cb_now=0x7f4094d2ce80 <_control_block>, evt=0x7f4084000c20) at ../../opensaf/src/amf/amfd/main.cc:775 #9 0x00007f4094a3082e in main_loop () at ../../opensaf/src/amf/amfd/main.cc:691 #10 main (argc=<optimized out>, argv=<optimized out>) at ../../opensaf/src/amf/amfd/main.cc:848 (gdb) f 3 #3 0x00007f4094aa1058 in avd_sg_2n_act_susi (sg=sg@entry=0x7f4096ba41f0, stby_susi=stby_susi@entry=0x7ffe4e89ae80, cb=0x7f4094d2ce80 <_control_block>) at ../../opensaf/src/amf/amfd/sg_2n_fsm.cc:596 596 ../../opensaf/src/amf/amfd/sg_2n_fsm.cc: No such file or directory. (gdb) p a_susi_1->si->list_of_sisu->su->name $1 = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x7f4096bb84d8 "safSu=SC-2,safSg=2N,safApp=ABC"}} (gdb) p a_susi_1->si->list_of_sisu->state $2 = SA_AMF_HA_STANDBY (gdb) p a_susi_1->si->list_of_sisu->fsm $3 = AVD_SU_SI_STATE_ABSENT (gdb) p a_susi_1->si->list_of_sisu->si_next->su->name $4 = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x7f4096bb39d8 "safSu=db68a05892,safSg=2N,safApp=ABC"}} (gdb) p a_susi_1->si->list_of_sisu->si_next->fsm $5 = AVD_SU_SI_STATE_ASGND (gdb) p a_susi_1->si->list_of_sisu->si_next->state $6 = SA_AMF_HA_STANDBY (gdb) p a_susi_1->si->list_of_sisu->si_next->si_next->su->name $7 = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x7f4096bbb6e8 "safSu=PL-4,safSg=2N,safApp=ABC"}} (gdb) p a_susi_1->si->list_of_sisu->si_next->si_next->fsm $8 = AVD_SU_SI_STATE_ASGND (gdb) p a_susi_1->si->list_of_sisu->si_next->si_next->state $9 = SA_AMF_HA_ACTIVE (gdb)
commits:
release: [1bca53315b2a1ce0441268679a336a038f4a68be]
develop: [3aa79bfedf17dd9fe1d98708750b76db085d6568]
Related
Commit: [1bca53]
Commit: [3aa79b]