- **status**: review --> fixed
- **Comment**:
default (5.1) [staging:04e220]
changeset: 7705:04e22070263d
user: Hung Nguyen <[email protected]>
date: Wed Jun 08 16:03:44 2016 +0700
summary: imm: Do not dispatch after finalizing oi handle in
OmThreadInterference testcase [#1804]
opensaf-5.0.x [staging:ed5616]
changeset: 7706:ed5616151a26
user: Hung Nguyen <[email protected]>
date: Wed Jun 08 16:03:44 2016 +0700
summary: imm: Do not dispatch after finalizing oi handle in
OmThreadInterference testcase [#1804]
opensaf-4.7.x [staging:f5715c]
changeset: 7707:f5715c9f3ced
user: Hung Nguyen <[email protected]>
date: Wed Jun 08 16:03:44 2016 +0700
summary: imm: Do not dispatch after finalizing oi handle in
OmThreadInterference testcase [#1804]
---
** [tickets:#1804] imm: "OM Thread Interference" testcase crashes**
**Status:** fixed
**Milestone:** 4.7.2
**Created:** Tue May 03, 2016 11:05 AM UTC by Hung Nguyen
**Last Updated:** Fri May 06, 2016 06:11 AM UTC
**Owner:** Hung Nguyen
**Attachments:**
-
[bt_core.1461263164.immomtest.1536.PL-3](https://sourceforge.net/p/opensaf/tickets/1804/attachment/bt_core.1461263164.immomtest.1536.PL-3)
(7.4 kB; application/octet-stream)
Not always reproducible. Full backtrace is attached to this ticket.
root@SC-1:~# immomtest 1 20
~~~
Thread 4 (Thread 0x7f9299243780 (LWP 1536)):
#0 0x00007f92982f9f3d in nanosleep () at ../sysdeps/unix/syscall-template.S:81
No locals.
#1 0x00007f929832b4a4 in usleep (useconds=<optimized out>) at
../sysdeps/unix/sysv/linux/usleep.c:32
ts = {tv_sec = 0, tv_nsec = 200000}
#2 0x0000000000432f6d in saImmOmThreadInterference_01 () at
test_saImmOmThreadInterference.c:173
immHandle = 498216338191
immOiHandle = 502511305487
ownerHandle = 1461263164437942973
searchHandle = 0
ccbHandle = 1461263164439715898
threadid1 = 140267581654784
threadid2 = 140267573262080
rc = SA_AIS_ERR_LIBRARY
attrDef = {attrName = 0x44e7b1 "rdn", attrValueType =
SA_IMM_ATTR_SASTRINGT, attrFlags = 258, attrDefaultValue = 0x0}
attrDefs = {0x7ffff768dc30, 0x0}
classCategory = (unknown: 4150844272)
attrDefinitions = 0x0
accessorHandle = 1461263164479509139
attributeNames = {0x44e7b5 "SaImmAttrClassName", 0x0}
attributes = 0x7ffff768de00
objNames = {0x666b00 <objectName>, 0x0}
attrValue = {attrName = 0x44e7b1 "rdn", attrValueType =
SA_IMM_ATTR_SANAMET, attrValuesNumber = 1, attrValues = 0x7ffff768dbd0}
attrValues = {0x7ffff768dc10, 0x0}
modAttrValue = {0x44e7c8, 0x0}
attrMod = {modType = SA_IMM_ATTR_VALUES_REPLACE, modAttr = {attrName =
0x44e7cd "attr4", attrValueType = SA_IMM_ATTR_SASTRINGT, attrValuesNumber = 1,
attrValues = 0x7ffff768dbf0}}
attrMods = {0x7ffff768dc50, 0x0}
__PRETTY_FUNCTION__ = "saImmOmThreadInterference_01"
#3 0x000000000043987e in run_test_case (suite=1, tcase=20) at utest.c:175
No locals.
#4 0x0000000000439c78 in test_run (suite=1, tcase=20) at utest.c:231
i = 32624793
j = 0
#5 0x0000000000442a71 in main (argc=4, argv=0x7ffff768de08) at immtest.c:113
suite = 1
tcase = 20
rc = 0
i = 4
index = 2
longDn = 1
failed = 0
endptr = 0x7ffff768ff0b ""
~~~
~~~
Thread 1 (Thread 0x7f929760c700 (LWP 1544)):
#0 0x00007f9298853add in search (pTree=0x7f9298d9e230 <imma_cb+176>,
key=0x7f929760be58 "\017\003\002") at patricia.c:93
pNode = 0x0
pPrevNode = 0x7f9298d9e230 <imma_cb+176>
#1 0x00007f9298854504 in ncs_patricia_tree_get (pTree=0x7f9298d9e230
<imma_cb+176>, pKey=0x7f929760be58 "\017\003\002") at patricia.c:433
pNode = 0x7f9298d9e198 <imma_cb+24>
#2 0x00007f9298b43602 in imma_client_node_get (client_tree=0x7f9298d9e230
<imma_cb+176>, cl_hdl=0x7f929760be58, cl_node=0x7f929760be70) at imma_db.c:55
No locals.
#3 0x00007f9298b35263 in saImmOiDispatch (immOiHandle=502511305487,
dispatchFlags=SA_DISPATCH_ONE) at imma_oi_api.c:531
rc = SA_AIS_OK
cb = 0x7f9298d9e180 <imma_cb>
cl_node = 0x0
locked = true
pend_fin = 0
pend_dis = 0
__FUNCTION__ = "saImmOiDispatch"
#4 0x0000000000432395 in implementer_thread (arg=0x7ffff768db68) at
test_saImmOmThreadInterference.c:63
fd = {{fd = 9, events = 1, revents = 32}}
selObject = 9
ret = 1
err = SA_AIS_OK
immOiHandle = 502511305487
#5 0x00007f9298606182 in start_thread (arg=0x7f929760c700) at
pthread_create.c:312
__res = <optimized out>
pd = 0x7f929760c700
now = <optimized out>
unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140267581654784,
8097029872058037852, 0, 0, 140267581655488, 140267581654784,
-8107813012334774692, -8107784432235776420}, mask_was_saved = 0}}, priv = {pad
= {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
not_first_call = <optimized out>
pagesize_m1 = <optimized out>
sp = <optimized out>
freesize = <optimized out>
__PRETTY_FUNCTION__ = "start_thread"
#6 0x00007f929833347d in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:111
~~~
---
Analysis:
At the end of the testcase, saImmOiFinalize() is called on the main thread.
In saImmOiFinalize(), imma_callback_ipc_destroy() is called and indicates an
event on the OI sel-obj.
On the OI thread, saImmOiDispatch() is called due to the event on OI sel-obj.
So saImmOiFinalize() and saImmOiDispatch() are invoked simultaneously on two
different threads.
saImmOiFinalize() calls ncs_patricia_tree_del().
saImmOiDispatch() calls ncs_patricia_tree_get().
That causes the segmentation fault.
---
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.------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Opensaf-tickets mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets