I think the deletion of nodeid_mdsdest_db and hctypedb and hctypedb in
avnd_last_step_clean() was introduced due to valgrind's complains while
"opensafd stop"
If take out those changes, there are memleak complains:
==538== 16 bytes in 1 blocks are definitely lost in loss record 16 of 142
==538== at 0x4C2B0E0: operator new(unsigned long) (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==538== by 0x42D149: avnd_nodeid_mdsdest_rec_add(avnd_cb_tag*, unsigned
long) (proxydb.cc:55)
==538== by 0x42B793: avnd_evt_mds_avnd_up_evh(avnd_cb_tag*, avnd_evt_tag*)
(proxy.cc:52)
==538== by 0x425F5E: avnd_evt_process (main.cc:625)
==538== by 0x425F5E: avnd_main_process() (main.cc:576)
==538== by 0x4058B2: main (main.cc:201)
==538== 1,592 (312 direct, 1,280 indirect) bytes in 13 blocks are definitely
lost in loss record 135 of 142
==538== at 0x4C2B0E0: operator new(unsigned long) (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==538== by 0x423828: hctype_create (hcdb.cc:160)
==538== by 0x423828: avnd_hctype_config_get(unsigned long long, std::string
const&) (hcdb.cc:218)
==538== by 0x423B45: avnd_hc_config_get(avnd_comp_tag*) (hcdb.cc:119)
==538== by 0x41989A: avnd_comp_config_get_su(avnd_su_tag*) (compdb.cc:1559)
==538== by 0x4304FE: avnd_evt_avd_reg_su_evh(avnd_cb_tag*, avnd_evt_tag*)
(su.cc:161)
==538== by 0x425F5E: avnd_evt_process (main.cc:625)
==538== by 0x425F5E: avnd_main_process() (main.cc:576)
==538== by 0x4058B2: main (main.cc:201)
---
** [tickets:#2008] AMFND: Coredump while shutting down**
**Status:** assigned
**Milestone:** 5.1.RC1
**Created:** Wed Sep 07, 2016 12:35 PM UTC by Minh Hon Chau
**Last Updated:** Thu Sep 08, 2016 04:32 AM UTC
**Owner:** Minh Hon Chau
**Attachments:**
-
[osafamfnd](https://sourceforge.net/p/opensaf/tickets/2008/attachment/osafamfnd)
(135.3 kB; application/octet-stream)
During cluster shutting down phase, if both controllers do not shutdown fast
enough and active controller goes down first, then a possibility of sc failover
happens. In this situation, avnd_last_step_clean() gets called twice, a
coredump is generated
It most likely because deleting record in nodeid_mdsdest_db and hctypedb but
those container still own the key. Thus, the second call of
avnd_last_step_clean() cause coredump
BT
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/local/lib/opensaf/osafamfnd --tracemask=0xffffffff'.
Program terminated with signal SIGABRT, Aborted.
0 0x00007f56a225bcc9 in __GI_raise (sig=sig@entry=6) at
../nptl/sysdeps/unix/sysv/linux/raise.c:56
56 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
Traceback (most recent call last):
File
"/usr/share/gdb/auto-load/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19-gdb.py",
line 63, in <module>
from libstdcxx.v6.printers import register_libstdcxx_printers
ImportError: No module named 'libstdcxx'
(gdb) bt
0 0x00007f56a225bcc9 in __GI_raise (sig=sig@entry=6) at
../nptl/sysdeps/unix/sysv/linux/raise.c:56
1 0x00007f56a225f0d8 in __GI_abort () at abort.c:89
2 0x00007f56a2298394 in __libc_message (do_abort=do_abort@entry=1,
fmt=fmt@entry=0x7f56a23a6b28 "*** Error in `%s': %s: 0x%s ***\n")
at ../sysdeps/posix/libc_fatal.c:175
3 0x00007f56a22a466e in malloc_printerr (ptr=<optimized out>,
str=0x7f56a23a2c19 "free(): invalid pointer", action=1) at malloc.c:4996
4 _int_free (av=<optimized out>, p=<optimized out>, have_lock=0) at
malloc.c:3840
5 0x000000000043a616 in _M_dispose (__a=..., this=<optimized out>)
at /usr/include/c++/4.8/bits/basic_string.h:249
6 ~basic_string (this=0x1d5fa70, __in_chrg=<optimized out>)
at /usr/include/c++/4.8/bits/basic_string.h:539
7 ~avnd_hctype_tag (this=0x1d5fa70, __in_chrg=<optimized out>)
at ../../../../../osaf/services/saf/amf/amfnd/include/avnd_hc.h:46
8 avnd_last_step_clean (cb=cb@entry=0x665940 <_avnd_cb>) at term.cc:101
9 0x0000000000436ee1 in avnd_su_si_oper_done (cb=cb@entry=0x665940 <_avnd_cb>,
su=0x1d5d000,
si=si@entry=0x0) at susm.cc:1169
10 0x0000000000416629 in avnd_comp_csi_assign_done (cb=cb@entry=0x665940
<_avnd_cb>,
comp=comp@entry=0x1d63260, csi=csi@entry=0x0) at comp.cc:1642
11 0x0000000000416a6e in avnd_comp_cmplete_all_assignment (cb=cb@entry=0x665940
<_avnd_cb>,
comp=comp@entry=0x1d63260) at comp.cc:2567
12 0x000000000040bb9b in avnd_comp_clc_terming_cleansucc_hdler
(cb=cb@entry=0x665940 <_avnd_cb>,
comp=comp@entry=0x1d63260) at clc.cc:2328
13 0x000000000040f6ba in avnd_comp_clc_fsm_run (cb=cb@entry=0x665940
<_avnd_cb>,
comp=comp@entry=0x1d63260, ev=AVND_COMP_CLC_PRES_FSM_EV_CLEANUP_SUCC) at
clc.cc:876
14 0x000000000040ffca in avnd_evt_clc_resp_evh (cb=0x665940 <_avnd_cb>,
evt=0x7f568c0008c0)
at clc.cc:414
15 0x0000000000425f5f in avnd_evt_process (evt=0x7f568c0008c0) at main.cc:625
16 avnd_main_process () at main.cc:576
---
Sent from sourceforge.net because [email protected] is
subscribed to https://sourceforge.net/p/opensaf/tickets/
To unsubscribe from further messages, a project admin can change settings at
https://sourceforge.net/p/opensaf/admin/tickets/options. Or, if this is a
mailing list, you can unsubscribe from the mailing list.------------------------------------------------------------------------------
_______________________________________________
Opensaf-tickets mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets