Forums - Crash in libcdsprpc.so

2 posts / 0 new
Last post
Crash in libcdsprpc.so
sttwo2
Join Date: 17 Jan 19
Posts: 3
Posted: Mon, 2019-02-04 05:05

Hello. I'm using Hexagon SDK 3.4.2. I compiled calculator project, and pushed it to devices, generated signature, and it run ok from 'adb shell':

 /vendor/bin/calculator 0 1000                                        

- starting calculator test
- allocate 4000 bytes from ION heap
- creating sequence of numbers from 0 to 999
- compute sum on the DSP
- sum = 499500
- success

Then I compiled the APK, installed it, run, and got next crash:

2019-02-04 15:30:22.244 13871-13871/com.mycompany.secret.myskel D/CALCULATOR: ENTERING
2019-02-04 15:30:22.246 13871-13871/com.mycompany.secret.myskel V/com.mycompany.secret.myskel: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:1011: /dsp/fastrpc_shell_0 load failed 45, searching...
2019-02-04 15:30:22.248 13871-13871/com.mycompany.secret.myskel V/com.mycompany.secret.myskel: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:1109: create user pd with attributes 0 domain 0
2019-02-04 15:30:22.285 13871-13934/com.mycompany.secret.myskel E/com.mycompany.secret.myskel: vendor/qcom/proprietary/adsprpc/src/apps_std_imp.c:695:Error 45: fopen failed for oemconfig.so. (No such file or directory)
2019-02-04 15:30:22.286 13871-13934/com.mycompany.secret.myskel E/com.mycompany.secret.myskel: vendor/qcom/proprietary/adsprpc/src/apps_std_imp.c:695:Error 45: fopen failed for libcalculator_skel.so. (No such file or directory)
2019-02-04 15:30:22.286 13871-13871/com.mycompany.secret.myskel D/com.mycompany.secret.myskel: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:720: Error fffffffb: remote handle open domain failed. domain 0, name file:///libcalculator_skel.so?calculator_skel_handle_invoke&_modver=1.0&_dom=adsp, dlerror cannot open oemconfig.so
2019-02-04 15:30:22.286 13871-13871/com.mycompany.secret.myskel D/com.mycompany.secret.myskel: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:663: Error 8000041d: remote handle invoke failed. domain 0, handle 0, sc 1010200, pra 0xffaac758
2019-02-04 15:30:22.286 13871-13871/com.mycompany.secret.myskel D/com.mycompany.secret.myskel: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:770: Error 8000041d: remote handle close failed. error oemconfig.so
2019-02-04 15:30:22.286 13871-13871/com.mycompany.secret.myskel D/com.mycompany.secret.myskel: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:756: Error fffffffb: remote handle64 open failed. name file:///libcalculator_skel.so?calculator_skel_handle_invoke&_modver=1.0&_dom=adsp
2019-02-04 15:30:22.286 13871-13871/com.mycompany.secret.myskel D/CALCULATOR: Failed to open domain, code -5
2019-02-04 15:30:22.273 13871-13871/com.mycompany.secret.myskel W/.secret.myskel: type=1400 audit(0.0:183): avc: denied { read } for name="libcalculator_skel.so" dev="mmcblk0p16" ino=7203 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:vendor_file:s0 tclass=file permissive=0
2019-02-04 15:30:22.400 13939-13939/? A/DEBUG:     #00 pc 00003ea4  /vendor/lib/libcdsprpc.so (verify_local_handle+23)
2019-02-04 15:30:22.400 13939-13939/? A/DEBUG:     #01 pc 000031b1  /vendor/lib/libcdsprpc.so (get_domain_from_handle+24)
2019-02-04 15:30:22.400 13939-13939/? A/DEBUG:     #02 pc 0000377d  /vendor/lib/libcdsprpc.so (remote_handle64_close+28)
2019-02-04 15:30:22.400 13939-13939/? A/DEBUG:     #03 pc 00001757  /data/app/com.mycompany.secret.myskel-zrVvAaXvV92TY5Pxx-0vkA==/lib/arm/libcalculator.so (calculator_close+22)
2019-02-04 15:30:22.400 13939-13939/? A/DEBUG:     #04 pc 000015e1  /data/app/com.mycompany.secret.myskel-zrVvAaXvV92TY5Pxx-0vkA==/lib/arm/libcalculator.so (Java_com_mycompany_secret_myskel_MainCalculator_sum+528)
2019-02-04 15:30:23.283 1626-13944/system_process W/ActivityManager:   Force finishing activity com.mycompany.secret.myskel/.MainCalculator
2019-02-04 15:30:23.324 5850-5880/com.mycompany.secret.platform D/METRICA: reportError: data_app_native_crash:com.mycompany.secret.myskel ys.ch: Process: com.mycompany.secret.myskel


    Package: com.mycompany.secret.myskel v1 (1.0)
    Foreground: Yes
    Build: mycompany/Secret/Secret:8.1.0/8710.1.A.0047-SS.20190125/01251457:userdebug/release-keys

    *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    Build fingerprint: 'mycompany/Secret/Secret:8.1.0/8710.1.A.0047-SS.20190125/01251457:userdebug/release-keys'
    Revision: '0'
    ABI: 'arm'
    pid: 13871, tid: 13871, name: .secret.myskel  >>> com.mycompany.secret.myskel <<<
    signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x7
    Cause: null pointer dereference
        r0 ffffffff  r1 ffffffff  r2 00016e14  r3 ffffffff
        r4 ffaaca3c  r5 ccba7df0  r6 ffffffff  r7 ccba7df0
        r8 ccba7df0  r9 e710f000  sl ffaacb40  fp ffaacacc
        ip cccadf90  sp ffaac850  lr ccb911b5  pc ccb91ea4  cpsr a00b0030

    backtrace:
        #00 pc 00003ea4  /vendor/lib/libcdsprpc.so (verify_local_handle+23)
        #01 pc 000031b1  /vendor/lib/libcdsprpc.so (get_domain_from_handle+24)
        #02 pc 0000377d  /vendor/lib/libcdsprpc.so (remote_handle64_close+28)
        #03 pc 00001757  /data/app/com.mycompany.secret.myskel-zrVvAaXvV92TY5Pxx-0vkA==/lib/arm/libcalculator.so (calculator_close+22)
        #04 pc 000015e1  /data/app/com.mycompany.secret.myskel-zrVvAaXvV92TY5Pxx-0vkA==/lib/arm/libcalculator.so (Java_com_mycompany_secret_myskel_MainCalculator_sum+528)
        #05 pc 0000b121  /data/app/com.mycompany.secret.myskel-zrVvAaXvV92TY5Pxx-0vkA==/oat/arm/base.odex (offset 0xb000)

I tried to run apk provided by Qualcomm the directory calculator_c++_app, and it fails with the same error

I compiled shared object with nextcommand:

make tree V=hexagon_Debug_dynamic_toolv83_v60

I signed the result(libcalculator_skel.so) and pushed to /data/app

my processor is Snapdragon SDM630, with hexagon 642

As I understand, cDSP is not available on my procesor, but library libcdsprpc.so is pointed here, instead of libadsprpc.so
Any help will be really appreciated

  • Up0
  • Down0
maitreyi
Join Date: 21 Nov 18
Posts: 3
Posted: Thu, 2019-02-07 09:40

Hi 

Looks like your app is getting linked to libcdsprpc. You need to change the linker flag in CMakeLists.txt to be able to link libadsprpc. Check line#17 of CMakeLists.txt in \calculator_c++_app\app\. 

Regards,

Maitreyi

 

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.