- **status**: fixed --> accepted
- **Comment**:

Reopened.

Problem in the attribute validity check when creating and modifying log stream 
IMM objects. This may cause log to crash instead of returning an appropriate 
error message in some cases if attributes are set in an incorrect way when 
creating or modifying  IMM objects for streams. The current fix for #771 
handles one of the problems but there is more to fix.



---

** [tickets:#771] logd crashed when logsv application is running **

**Status:** accepted
**Milestone:** 4.5.FC
**Created:** Fri Feb 07, 2014 06:46 AM UTC by Sirisha Alla
**Last Updated:** Tue Apr 22, 2014 07:53 AM UTC
**Owner:** elunlen

The issue is seen on cs 4871 with patches #688, #711 and #721. After we have 
observed the issue we ran the same app on cs 4733 and we observed the same 
issue.

The backtrace of the crash is as follows:

Program terminated with signal 11, Segmentation fault.
  #0  stream_ccb_apply_modify (opdata=0x65cff0) at lgs_imm.c:1387
1387    lgs_imm.c: No such file or directory.
        in lgs_imm.c
(gdb) bt
  #0  stream_ccb_apply_modify (opdata=0x65cff0) at lgs_imm.c:1387
  #1  0x0000000000411d48 in stream_ccb_apply (opdata=0x65cff0) at lgs_imm.c:1476
  #2  0x0000000000411eea in ccbApplyCallback (immOiHandle=<optimized out>, 
ccbId=<optimized out>) at lgs_imm.c:1520
  #3  0x00007effed26532a in imma_process_callback_info (cb=0x7effed4812e0, 
cl_node=0x653260, callback=0x65c8c0, immHandle=17180000527) at imma_proc.c:2071
  #4  0x00007effed267475 in imma_hdl_callbk_dispatch_all (cb=0x7effed4812e0, 
immHandle=17180000527) at imma_proc.c:1688
  #5  0x00007effed25870d in saImmOiDispatch (immOiHandle=17180000527, 
dispatchFlags=SA_DISPATCH_ALL) at imma_oi_api.c:543
  #6  0x0000000000412336 in main (argc=<optimized out>, argv=<optimized out>) 
at lgs_main.c:497
(gdb) thread apply all bt

Thread 5 (Thread 0x7effedad8b00 (LWP 3727)):
  #0  0x00007effec5464f6 in poll () from /lib64/libc.so.6
  #1  0x00007effed6b36fd in osaf_ppoll (io_fds=0x7effedad81d0, i_nfds=1, 
i_timeout_ts=0x7effedad81a0, i_sigmask=<optimized out>) at osaf_poll.c:104
  #2  0x00007effed6b38a7 in osaf_poll (io_fds=0x7effedad81d0, i_nfds=1, 
i_timeout=<optimized out>) at osaf_poll.c:43
  #3  0x00007effed6b38f4 in osaf_poll_one_fd (i_fd=11, i_timeout=30000) at 
osaf_poll.c:136
  #4  0x00007effece16ff4 in rda_read_msg (sockfd=-307396144, msg=0x7effedad8250 
"", size=30000) at rda_papi.c:662
  #5  0x00007effece17970 in rda_callback_task (rda_callback_cb=0x630be0) at 
rda_papi.c:128
  #6  0x00007effecc007b6 in start_thread () from /lib64/libpthread.so.0
  #7  0x00007effec54f9cd in clone () from /lib64/libc.so.6
  #8  0x0000000000000000 in ?? ()

Thread 4 (Thread 0x7effebc3f700 (LWP 3724)):
  #0  0x00007effecc0461c in pthread_cond_wait@@GLIBC_2.3.2 () from 
/lib64/libpthread.so.0
  #1  0x000000000041d3b8 in file_hndl_thread (noparam=<optimized out>) at 
lgs_file.c:132
  #2  0x00007effecc007b6 in start_thread () from /lib64/libpthread.so.0
  #3  0x00007effec54f9cd in clone () from /lib64/libc.so.6
  #4  0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7effedaf8b00 (LWP 3726)):
  #0  0x00007effec5464f6 in poll () from /lib64/libc.so.6
  #1  0x00007effed6eec6e in mdtm_process_recv_events () at mds_dt_tipc.c:580
  #2  0x00007effecc007b6 in start_thread () from /lib64/libpthread.so.0
  #3  0x00007effec54f9cd in clone () from /lib64/libc.so.6
  #4  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7effedb28b00 (LWP 3725)):
  #0  0x00007effec5464f6 in poll () from /lib64/libc.so.6
  #1  0x00007effed6b362a in osaf_poll_no_timeout (io_fds=0x7effedb28290, 
i_nfds=1) at osaf_poll.c:31
  #2  0x00007effed6b3825 in osaf_ppoll (io_fds=0x7effedb28290, i_nfds=1, 
i_timeout_ts=0xffffffffffffffff, i_sigmask=0xffffffffffffffff) at osaf_poll.c:78
  #3  0x00007effed6b9edf in ncs_tmr_wait () at sysf_tmr.c:411
  #4  0x00007effecc007b6 in start_thread () from /lib64/libpthread.so.0
  #5  0x00007effec54f9cd in clone () from /lib64/libc.so.6
  #6  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7effedafb700 (LWP 3720)):
  #0  stream_ccb_apply_modify (opdata=0x65cff0) at lgs_imm.c:1387
  #1  0x0000000000411d48 in stream_ccb_apply (opdata=0x65cff0) at lgs_imm.c:1476
  #2  0x0000000000411eea in ccbApplyCallback (immOiHandle=<optimized out>, 
ccbId=<optimized out>) at lgs_imm.c:1520
  #3  0x00007effed26532a in imma_process_callback_info (cb=0x7effed4812e0, 
cl_node=0x653260, callback=0x65c8c0, immHandle=17180000527) at imma_proc.c:2071
  #4  0x00007effed267475 in imma_hdl_callbk_dispatch_all (cb=0x7effed4812e0, 
immHandle=17180000527) at imma_proc.c:1688
  #5  0x00007effed25870d in saImmOiDispatch (immOiHandle=17180000527, 
dispatchFlags=SA_DISPATCH_ALL) at imma_oi_api.c:543
---Type <return> to continue, or q <return> to quit---
  #6  0x0000000000412336 in main (argc=<optimized out>, argv=<optimized out>) 
at lgs_main.c:497
(gdb) fr 0
  #0  stream_ccb_apply_modify (opdata=0x65cff0) at lgs_imm.c:1387
1387    in lgs_imm.c
(gdb) p *opdata
$1 = {next = 0x0, userData = 0x0, userStatus = 0, operationType = 
CCBUTIL_MODIFY, objectName = {length = 43, 
    value = "safLgStrCfg=appstream1,safApp=safLogService", '\000' <repeats 212 
times>}, ccbId = 175, param = {create = {className = 0x65d130 "+", parentName = 
0x65d234, 
      attrValues = 0x0}, deleteOp = {objectName = 0x65d130}, modify = 
{objectName = 0x65d130, attrMods = 0x65d234}}}
        
(gdb) DIR /home/sirisha/6.4/incrementaldropstaging/osaf/services/saf/logsv/lgs/
Source directories searched: 
/home/sirisha/6.4/incrementaldropstaging/osaf/services/saf/logsv/lgs:$cdir:$cwd
(gdb) list
1382                    void *value;
1383                    const SaImmAttrValuesT_2 *attribute = &attrMod->modAttr;
1384    
1385                    TRACE("attribute %s", attribute->attrName);
1386    
1387                    value = attribute->attrValues[0];
1388    
1389                    if (!strcmp(attribute->attrName, 
"saLogStreamFileName")) {
1390                            char *fileName = *((char **)value);
1391                            n = snprintf(stream->fileName, NAME_MAX, "%s", 
fileName);
(gdb) p opdata->param->modify->attrMods
$2 = (const SaImmAttrModificationT_2 **) 0x65d234
(gdb) p opdata->param->modify->attrMods[0]
$3 = (const SaImmAttrModificationT_2 *) 0x65d244
(gdb) p *opdata->param->modify->attrMods[0]
$4 = {modType = SA_IMM_ATTR_VALUES_REPLACE, modAttr = {attrName = 0x65d264 
"saLogStreamLogFullHaltThreshold", attrValueType = SA_IMM_ATTR_SAUINT32T, 
attrValuesNumber = 0, 
    attrValues = 0x0}}
(gdb) p *opdata->param->modify->attrMods[1]
Cannot access memory at address 0x0
(gdb) 

/var/log/messages of SC-1:

Feb  7 12:06:54 SLES-64BIT-SLOT1 osafimmnd[3708]: NO Ccb 172 COMMITTED 
(immcfg_SLES-64BIT-SLOT1_21847)
Feb  7 12:06:54 SLES-64BIT-SLOT1 osafimmnd[3708]: NO Ccb 173 COMMITTED 
(immcfg_SLES-64BIT-SLOT1_21855)
Feb  7 12:06:54 SLES-64BIT-SLOT1 osafimmnd[3708]: NO Ccb 174 COMMITTED 
(immcfg_SLES-64BIT-SLOT1_21860)
Feb  7 12:06:54 SLES-64BIT-SLOT1 osafimmnd[3708]: NO Ccb 175 COMMITTED 
(immcfg_SLES-64BIT-SLOT1_21864)
Feb  7 12:06:54 SLES-64BIT-SLOT1 kernel: [ 3032.247789] osaflogd[3720]: 
segfault at 0 ip 00000000004117fc sp 00007fff167f1fb0 error 4 in 
osaflogd[400000+28000]
Feb  7 12:06:54 SLES-64BIT-SLOT1 osafamfnd[3776]: NO 
'safComp=LOG,safSu=SC-1,safSg=2N,safApp=OpenSAF' faulted due to 'avaDown' : 
Recovery is 'nodeFailfast'
Feb  7 12:06:54 SLES-64BIT-SLOT1 osafamfnd[3776]: ER 
safComp=LOG,safSu=SC-1,safSg=2N,safApp=OpenSAF Faulted due to:avaDown Recovery 
is:nodeFailfast
Feb  7 12:06:54 SLES-64BIT-SLOT1 osafamfnd[3776]: Rebooting OpenSAF NodeId = 
131343 EE Name = , Reason: Component faulted: recovery is node failfast, 
OwnNodeId = 131343, SupervisionTime = 60
Feb  7 12:06:54 SLES-64BIT-SLOT1 osafimmnd[3708]: NO Implementer locally 
disconnected. Marking it as doomed 1 <4, 2010f> (safLogService)
Feb  7 12:06:54 SLES-64BIT-SLOT1 osafimmnd[3708]: NO Implementer disconnected 1 
<4, 2010f> (safLogService)
Feb  7 12:06:54 SLES-64BIT-SLOT1 opensaf_reboot: Rebooting local node; 
timeout=60
Feb  7 12:06:57 SLES-64BIT-SLOT1 kernel: [ 3034.430264] md: stopping all md 
devices.
Feb  7 12:06:57 SLES-64BIT-SLOT1 kernel: [ 3035.430796] sd 0:0:0:0: [sda] 
Synchronizing SCSI cache


Logd trace is attached.


---

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.
------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Opensaf-tickets mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets

Reply via email to