Uploaded image for project: 'IoTivity'
  1. IoTivity
  2. IOT-1464

Seg.Fault occured when OCProcess() is called after OCStop()

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Undecided
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: IoTivity 1.2.0
    • Component/s: SDK
    • Labels:
      None
    • Found in Version/s:
      latest Iotivity/1.2-rel
    • Operating System:
      Ubuntu
    • Issue Severity:
      Major
    • Reproducibility:
      Always (100%)

      Description

      Seg.Fault occured when OCProcess() is called after OCStop()
      we tested with our enrollee sample app with below step.

      1) build our easysetup module (scons option: scons service/easy-setup/ WITH_TCP=1 WITH_CLOUD=1 SECURED=1 LOGGING=1)
      2) run the sample app - enrolleewifi ((<iotivity>/service/easy-setup/sampleapp/enrollee/linux)
      3) select 'I' or 'i' menu -> this menu called OCInit() and create resource.
      4) select 'T' or 't' menu -> this menu called OCUnbindResource() and OCDeleteResouce and then OCStop().

      Seg, Fault occured when processing 4) step.

      please check below gdb log.

      (gdb) bt
      #0 0x00007ffff6f2ac37 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
      #1 0x00007ffff6f2e028 in __GI_abort () at abort.c:89
      #2 0x00007ffff6f672a4 in __libc_message (do_abort=do_abort@entry=1, fmt=fmt@entry=0x7ffff70756b0 "*** Error in `%s': %s: 0x%s ***\n") at ../sysdeps/posix/libc_fatal.c:175
      #3 0x00007ffff6f7355e in malloc_printerr (ptr=<optimized out>, str=0x7ffff70757e0 "double free or corruption (out)", action=1) at malloc.c:4996
      #4 _int_free (av=<optimized out>, p=<optimized out>, have_lock=0) at malloc.c:3840
      #5 0x00007ffff76fa6ad in u_queue_get_element () from /home/jhha85/workspace/iotivity-release/out/linux/x86_64/release/libconnectivity_abstraction.so
      #6 0x00007ffff7705242 in CAHandleRequestResponseCallbacks () from /home/jhha85/workspace/iotivity-release/out/linux/x86_64/release/libconnectivity_abstraction.so
      #7 0x00007ffff77036ed in CAHandleRequestResponse () from /home/jhha85/workspace/iotivity-release/out/linux/x86_64/release/libconnectivity_abstraction.so
      #8 0x00007ffff7b909bd in OCProcess () from /home/jhha85/workspace/iotivity-release/out/linux/x86_64/release/liboctbstack.so
      #9 0x00000000004010a1 in listeningFunc ()
      #10 0x00007ffff72c1184 in start_thread (arg=0x7ffff32b5700) at pthread_create.c:312
      #11 0x00007ffff6fee37d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

        Attachments

        # Subject Branch Project Status CR V

          Activity

            People

            • Assignee:
              jihwanseo jihwan seo
              Reporter:
              Parkhi Heewon Park
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: