- **Comment**:

We are some how able to simulated one case where slimier core dump occurs.

their can some other case this core dump can occur , as soon as we fund root 

we will provide the patch for that as well.

In this test case , If OSAF_CKPT_SHM_ALLOC_GUARANTEE is NOT set and  SHM is 
100% used in system ,
cpnd Segmentation fault (core dumped) at LEAP memcpy().

Following are the detailed steps how we reproduced  ,
this test is generating same core dumb as below.

Test application  : cpsv_shm_2202.c


1)  /etc/init.d/opensafd stop

2)  Change the defaults /dev/shm  size to 3MB

      # vi /etc/fstab  tmpfs

     And add following line

     ` tmpfs               /dev/shm             tmpfs defaults,size=3m   0 0`

3)  Remount /dev/shm

    #mount -o remount /dev/shm

4)  Check /dev/shm reflected with new value

    # df -k /dev/shm/

    Filesystem     1K-blocks  Used Available Use% Mounted on
    tmpfs               3072     0      3072   0% /dev/shm

5) set  ulimit to   unlimited

    #ulimit -c  unlimited

6) #/etc/init.d/opensafd start

7)  Compile & run attached test application ( cpsv_shm_2202.c )

    #gcc cpsv_shm_2202.c -o ckpt_shm -lSaCkpt

    # ./ckpt_shm

8)  Once /dev/shm/ reach 100% Use you will see core dump  same as yours

    # df -k /dev/shm/

7) Then we applied the patch  test again with  no core dump

   saCkptSectionCreate 1  returned 18. ( no core dump )


** [tickets:#2207] cpnd: osafckptnd core dump while handling error 

**Status:** review
**Milestone:** 5.2.FC
**Created:** Thu Nov 24, 2016 09:45 AM UTC by Vo Minh Hoang
**Last Updated:** Thu Nov 24, 2016 09:56 AM UTC
**Owner:** Vo Minh Hoang

the steps to add a section is add_db_tree -> update_sec_hdr -> update_ckpt_hdr 
so if an error occur cpsv should handle error in reverse order.
currently, section_hdr_update_fails, cpsv revert ckpt_hdr also that possibly 
cause the problem

Core was generated by `/usr/lib64/opensaf/osafckptnd'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007f1846da1109 in __memcpy_sse2_unaligned () from /lib64/libc.so.6
Missing separate debuginfos, use: zypper install 
(gdb) bt
#0  0x00007f1846da1109 in __memcpy_sse2_unaligned () from /lib64/libc.so.6
#1  0x00007f1847f26f25 in memcpy (__len=<optimized out>, __src=<optimized out>, 
__dest=<optimized out>)
    at /usr/include/x86_64-linux-gnu/bits/string3.h:53
#2  ncs_os_posix_shm (req=req@entry=0x7ffd24f978f0) at os_defs.c:859
#3  0x000000000041561d in cpnd_ckpt_hdr_update (cp_node=cp_node@entry=0xa708e0) 
at cpnd_proc.c:1833
#4  0x000000000041b016 in cpnd_ckpt_sec_del (cp_node=cp_node@entry=0xa708e0, 
    at cpnd_sec.cc:220
#5  0x0000000000406190 in cpnd_ckpt_sec_add (cp_node=cp_node@entry=0xa708e0, 
    exp_time=1479906629297747000, gen_flag=gen_flag@entry=0) at cpnd_db.c:473
#6  0x000000000040cfe2 in cpnd_evt_proc_ckpt_sect_create (cb=cb@entry=0x8c77f0,
    evt=evt@entry=0x7f184000a560, sinfo=sinfo@entry=0x7f184000abb8) at 
#7  0x000000000040e7cc in cpnd_process_evt (evt=0x7f184000a550) at 
#8  0x00000000004103bd in cpnd_main_process (cb=cb@entry=0x8c77f0) at 
#9  0x0000000000405383 in main (argc=<optimized out>, argv=<optimized out>) at 

consequence of #2202


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.
Opensaf-tickets mailing list

Reply via email to