Executed the below script:

for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20;  do
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; 
do immcfg -c SaLogStreamConfig safLgStrCfg=TestLog -a saLogStreamPathName=. -a 
saLogStreamFileName=TestLog;
 echo "create ($i) - $?"; 
immcfg -d safLgStrCfg=TestLog; 
echo "Delete ($i) - $?"; 
done
done


But was not able to recreate the issue.
Below is the o/p. 
 
 
 ps -ef | grep -i log
syslog     698     1  0 02:22 ?        00:00:00 /usr/sbin/rsyslogd -n
root       768     1  0 02:22 ?        00:00:00 /lib/systemd/systemd-logind
srinivas  1857  1416  0 02:22 ?        00:00:00 /usr/bin/pulseaudio --start 
--log-target=syslog
root      2428  2382  0 15:39 pts/6    00:00:00 grep --color=auto -i log
root      2509     1  0 02:23 ?        00:00:03 /usr/local/lib/opensaf/osafimmd 
--tracemask=0xffffffff --loglevel=info
root      2521     1  0 02:23 ?        00:00:08 
/usr/local/lib/opensaf/osafimmnd --loglevel=info
root      2565     1  0 02:23 ?        00:00:04 /usr/local/lib/opensaf/osaflogd 
--tracemask=0xffffffff
root      2585     1  0 02:23 ?        00:00:00 /usr/local/lib/opensaf/osafntfd 
--loglevel=info
root      2823     1  0 02:23 ?        00:00:00 
/usr/local/lib/opensaf/osafckptd --loglevel=info

Delete (1) - 0
create (2) - 0
Delete (2) - 0
create (3) - 0
Delete (3) - 0
create (4) - 0
Delete (4) - 0
create (5) - 0
Delete (5) - 0
create (6) - 0
Delete (6) - 0
create (7) - 0
Delete (7) - 0
create (8) - 0
Delete (8) - 0
create (9) - 0
Delete (9) - 0
create (10) - 0
Delete (10) - 0
create (11) - 0
Delete (11) - 0
create (12) - 0
Delete (12) - 0
create (13) - 0
Delete (13) - 0
create (14) - 0
Delete (14) - 0
create (15) - 0
Delete (15) - 0
create (16) - 0
Delete (16) - 0
create (17) - 0
Delete (17) - 0
create (18) - 0
Delete (18) - 0
create (19) - 0
Delete (19) - 0
create (20) - 0
Delete (20) - 0
:
:

ps -ef | grep -i log
syslog     698     1  0 02:22 ?        00:00:00 /usr/sbin/rsyslogd -n
root       768     1  0 02:22 ?        00:00:00 /lib/systemd/systemd-logind
srinivas  1857  1416  0 02:22 ?        00:00:00 /usr/bin/pulseaudio --start 
--log-target=syslog
root      2509     1  0 02:23 ?        00:00:04 /usr/local/lib/opensaf/osafimmd 
--tracemask=0xffffffff --loglevel=info
root      2521     1  0 02:23 ?        00:00:09 
/usr/local/lib/opensaf/osafimmnd --loglevel=info
root      2565     1  0 02:23 ?        00:00:06 /usr/local/lib/opensaf/osaflogd 
--tracemask=0xffffffff
root      2585     1  0 02:23 ?        00:00:00 /usr/local/lib/opensaf/osafntfd 
--loglevel=info
root      2823     1  0 02:23 ?        00:00:00 
/usr/local/lib/opensaf/osafckptd --loglevel=info
root      4931  2382  0 15:40 pts/6    00:00:00 grep --color=auto -i log



---

** [tickets:#1443] log: service is crashed if creating and deleting conf obj 
class continuously**

**Status:** assigned
**Milestone:** future
**Created:** Tue Aug 11, 2015 07:37 AM UTC by Vu Minh Nguyen
**Last Updated:** Wed Sep 27, 2017 06:51 AM UTC
**Owner:** Srinivas Siva Mangipudy


When creating application object class and deleting it continuously, log 
service could be crashed.

To reproduce this case, perform following command.

> for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do immcfg -c 
> SaLogStreamConfig safLgStrCfg=TestLog -a saLogStreamPathName=. -a 
> saLogStreamFileName=TestLog; echo "create ($i) - $?"; immcfg -d 
> safLgStrCfg=TestLog; echo "Delete ($i) - $?"; done

Output something likes:
> create (1) - 0
> Delete (1) - 0
> create (2) - 0
> error - saImmOmCcbObjectDelete for 'safLgStrCfg= TestLog' FAILED: 
> SA_AIS_ERR_FAILED_OPERATION (21)
> error - saImmOmCcbApply FAILED: SA_AIS_ERR_FAILED_OPERATION (21)
> Delete (2) - 1
> error - saImmOmCcbObjectCreate_2 FAILED with SA_AIS_ERR_EXIST (14)
> create (3) - 1
> reboot: Restarting system

Here is the analysis:

1. When creating obj class is done by IMM, but logsv have not finished the 
`apply callback` job yet. 
In this case, it needs to update a run-time attribute ` 
saLogStreamCreationTimestamp`.
This is done in main thread.

2. If deleting this obj class comes before `apply callback` job finishes, IMM 
will
mark that obj class as `IMM_DELETE_LOCK` and call respective callbacks to logsv
and *wait for response*, but logsv is busy in doing `apply callback` in (1).

When the request `update runtime attribute` to IMM by logsv, IMM will returns 
TRY_AGAIN.

IMM waits for logsv response to release “IMM_DELETE_LOCK”, while logsv still 
get stuck
in `update rt attribute` as getting TRY_AGAIN. 

Consequently, logsv might be terminated if number of try-again is reached or 
delete action gets failed. 



---

Sent from sourceforge.net because opensaf-tickets@lists.sourceforge.net 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.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Opensaf-tickets mailing list
Opensaf-tickets@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets

Reply via email to