- **status**: review --> fixed
- **Comment**:

changeset:   7019:f378a750ff34
tag:         tip
user:        [email protected]
date:        Mon Oct 19 10:40:30 2015 +0530
summary:     tests/ntf: add test cases for saNtfFinalize [#1521].

changeset:   7018:7963c6f42db3
parent:      7011:5b29434dd9a1
user:        [email protected]
date:        Mon Oct 19 10:40:30 2015 +0530
summary:     ntfa: fix deadlock situation due to saNtfFinalize [#1521].

changeset:   7017:fa54167cfe42
branch:      opensaf-4.7.x
user:        [email protected]
date:        Mon Oct 19 10:40:16 2015 +0530
summary:     tests/ntf: add test cases for saNtfFinalize [#1521].

changeset:   7016:a64ae24627e6
branch:      opensaf-4.7.x
parent:      7010:ed4c93647e3c
user:        [email protected]
date:        Mon Oct 19 10:40:16 2015 +0530
summary:     ntfa: fix deadlock situation due to saNtfFinalize [#1521].

changeset:   7015:a4a8aa4c4298
branch:      opensaf-4.6.x
user:        [email protected]
date:        Mon Oct 19 10:39:45 2015 +0530
summary:     tests/ntf: add test cases for saNtfFinalize [#1521].

changeset:   7014:02458309eed8
branch:      opensaf-4.6.x
parent:      7007:b92fa9ce57ee
user:        [email protected]
date:        Mon Oct 19 10:39:45 2015 +0530
summary:     ntfa: fix deadlock situation due to saNtfFinalize [#1521].

changeset:   7013:44f1a282922a
branch:      opensaf-4.5.x
user:        [email protected]
date:        Mon Oct 19 10:39:04 2015 +0530
summary:     tests/ntf: add test cases for saNtfFinalize [#1521].

https://sourceforge.net/p/opensaf/mailman/message/34538560/



---

** [tickets:#1521] ntf: Calling saNtfFinalize() parallely with Allocate() or 
Unsubscrbe() may lead to deadlock.**

**Status:** fixed
**Milestone:** 4.5.2
**Created:** Tue Oct 06, 2015 11:21 AM UTC by Praveen
**Last Updated:** Wed Oct 14, 2015 09:37 AM UTC
**Owner:** Praveen
**Attachments:**

- 
[unsubscribe.c](https://sourceforge.net/p/opensaf/tickets/1521/attachment/unsubscribe.c)
 (4.8 kB; application/octet-stream)


Currently observed between saNtfFinalize() with saNtfNotificationUnsubscribe () 
and also with saNtfStateChangeNotificationAllocate().

Generally any API called after finalize returns with BAD_HANDLE. 
But some times finalize() hangs when it is timed in between the processing of 
Allocate() or Unsubscribe() as  some resources will be in use in these APIs.

1) bt1 between Finalize() and Allocate:
Thread 4 (Thread 0x41082d40 (LWP 13508)):
\#0  0x00000039ef6cb2e6 in poll () from /lib64/libc.so.6
\#1  0x00007f34c3440754 in osaf_poll_no_timeout (io_fds=0x410824f0, i_nfds=1) 
at osaf_poll.c:31
\#2  0x00007f34c3440825 in osaf_ppoll (io_fds=0x410824f0, i_nfds=1, 
i_timeout_ts=0x0, i_sigmask=0x0)
    at osaf_poll.c:78
\#3  0x00007f34c344a681 in ncs_tmr_wait () at sysf_tmr.c:411
\#4  0x00000039f020673d in start_thread () from /lib64/libpthread.so.0
\#5  0x00000039ef6d40cd in clone () from /lib64/libc.so.6

Thread 3 (Thread 0x41389d40 (LWP 13509)):
\#0  0x00000039ef6cb2e6 in poll () from /lib64/libc.so.6
\#1  0x00007f34c3490410 in mdtm_process_recv_events () at mds_dt_tipc.c:665
\#2  0x00000039f020673d in start_thread () from /lib64/libpthread.so.0
\#3  0x00000039ef6d40cd in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x41b8b940 (LWP 13510)):
\#0  0x00000039f020d4c4 in __lll_lock_wait () from /lib64/libpthread.so.0
\#1  0x00000039f0208e1a in _L_lock_1034 () from /lib64/libpthread.so.0
\#2  0x00000039f0208cdc in pthread_mutex_lock () from /lib64/libpthread.so.0
\#3  0x00007f34c36bd068 in saNtfStateChangeNotificationAllocate 
(ntfHandle=4290772993, notification=0x601680,
    numCorrelatedNotifications=0, lengthAdditionalText=19, numAdditionalInfo=1, 
numStateChanges=1,
    variableDataSize=-1) at ntfa_api.c:1936
\#4  0x0000000000400b7d in allocate ()
\#5  0x00000039f020673d in start_thread () from /lib64/libpthread.so.0
\#6  0x00000039ef6d40cd in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f34c34256e0 (LWP 13507)):
\#0  0x00000039f020cd01 in sem_wait () from /lib64/libpthread.so.0
\#1  0x00007f34c34563c1 in hm_block_me (cell=0x1ff9ce0, pool_id=0 '\000') at 
hj_hdl.c:696
\#2  0x00007f34c3455750 in ncshm_destroy_hdl (id=NCS_SERVICE_ID_NTFA, 
uhdl=4290772993) at hj_hdl.c:366
\#3  0x00007f34c36c21a4 in ntfa_hdl_rec_del (list_head=0x7f34c38d4b28, 
rm_node=0x200b780) at ntfa_util.c:795
\#4  0x00007f34c36bafd5 in saNtfFinalize (ntfHandle=4290772993) at 
ntfa_api.c:1195
\#5  0x0000000000400df6 in main ()
(gdb)



2)BT2 between Finalize() and Unsubscribe()
Thread 4 (Thread 0x402c5d40 (LWP 13776)):
\#0  0x00000039ef6cb2e6 in poll () from /lib64/libc.so.6
\#1  0x00007fc506988754 in osaf_poll_no_timeout (io_fds=0x402c54f0, i_nfds=1) 
at osaf_poll.c:31
\#2  0x00007fc506988825 in osaf_ppoll (io_fds=0x402c54f0, i_nfds=1, 
i_timeout_ts=0x0, i_sigmask=0x0)
    at osaf_poll.c:78
\#3  0x00007fc506992681 in ncs_tmr_wait () at sysf_tmr.c:411
\#4  0x00000039f020673d in start_thread () from /lib64/libpthread.so.0
\#5  0x00000039ef6d40cd in clone () from /lib64/libc.so.6

Thread 3 (Thread 0x40bbed40 (LWP 13777)):
\#0  0x00000039ef6cb2e6 in poll () from /lib64/libc.so.6
\#1  0x00007fc5069d8410 in mdtm_process_recv_events () at mds_dt_tipc.c:665
\#2  0x00000039f020673d in start_thread () from /lib64/libpthread.so.0
\#3  0x00000039ef6d40cd in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x413c0940 (LWP 13778)):
\#0  0x00000039f020d4c4 in __lll_lock_wait () from /lib64/libpthread.so.0
\#1  0x00000039f0208e1a in _L_lock_1034 () from /lib64/libpthread.so.0
\#2  0x00000039f0208cdc in pthread_mutex_lock () from /lib64/libpthread.so.0
\#3  0x00007fc506c04379 in subscriberListItemRemove (subscriptionId=111) at 
ntfa_api.c:1635
\#4  0x00007fc506c077ab in saNtfNotificationUnsubscribe (subscriptionId=111) at 
ntfa_api.c:2785
\#5  0x0000000000400ec5 in unsubscribe ()
\#6  0x00000039f020673d in start_thread () from /lib64/libpthread.so.0
\#7  0x00000039ef6d40cd in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7fc50696d6e0 (LWP 13775)):
\#0  0x00000039f020cd01 in sem_wait () from /lib64/libpthread.so.0
\#1  0x00007fc50699e3c1 in hm_block_me (cell=0xfcece0, pool_id=0 '\000') at 
hj_hdl.c:696
\#2  0x00007fc50699d750 in ncshm_destroy_hdl (id=NCS_SERVICE_ID_NTFA, 
uhdl=4290772993) at hj_hdl.c:366
\#3  0x00007fc506c0a1a4 in ntfa_hdl_rec_del (list_head=0x7fc506e1cb28, 
rm_node=0xfe0780) at ntfa_util.c:795
\#4  0x00007fc506c02fd5 in saNtfFinalize (ntfHandle=4290772993) at 
ntfa_api.c:1195
\#5  0x0000000000400fa3 in main ()




---

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

Reply via email to