Forums - Fastcv crash on 8150

3 posts / 0 new
Last post
Fastcv crash on 8150
debug.8150
Join Date: 17 Jun 21
Posts: 1
Posted: Thu, 2021-06-17 03:30

Hello,

I'm trying to use the fastcv library on a qualcomm platform 8150.

I simply set the performance mode and then call one of the fastcv library. When running with the mode FASTCV_OP_CPU_PERFORMANCE, everything run fine, but with any other mode, it crashes.

(the calculator sample code from the hexagon sdk runs smoothly as well)

Quote:

//fcvOperationMode fastcv_mode = fcvOperationMode::FASTCV_OP_LOW_POWER;

//fcvOperationMode fastcv_mode = fcvOperationMode::FASTCV_OP_PERFORMANCE;

//fcvOperationMode fastcv_mode = fcvOperationMode::FASTCV_OP_LOW_POWER;

//fcvOperationMode fastcv_mode = fcvOperationMode::FASTCV_OP_CPU_OFFLOAD;

fcvOperationMode fastcv_mode = fcvOperationMode::FASTCV_OP_CPU_PERFORMANCE;

int status = fcvSetOperationMode(fastcv_mode);

if (status != 0)
            printf("Error when setting the fast cv operation \n");

//upscaling

int width = 320;
int height = 240;
uint8_t* input__image_ptr= (uint8_t*)fcvMemAlloc(width * height, 16u);

int upscaled_width = 1280;
int upscaled_height = 960;

uint8_t* upscaled_image_ptr= (uint8_t*)fcvMemAlloc(upscaled_width * upscaled_height, 16u);

fcvScaleu8(input__image_ptr, width, height,width * sizeof(uint8_t), upscaled_image_ptr, upscaled_width, upscaled_height, upscaled_width * sizeof(uint8_t), fcvInterpolationType::FASTCV_INTERPOLATION_TYPE_NEAREST_NEIGHBOR);

(I signed the device I'm using to get access to the sdk).

When running with another mode than FASTCV_OP_CPU_PERFORMANCE, I get the following error and crash in the android log:

Do you know how I can fix this ?

Quote:

02-20 23:08:36.823 10935 10935 I my_application: Init operation mode to FASTCV_OP_LOW_POWER
02-20 23:08:36.897 10935 10935 D fastcv_lib_log: Fastcv vendor library
02-20 23:08:36.897 10935 10935 D fastcv_lib_log: Fastcv vendor library
02-20 23:08:36.897 10935 10935 I fastcv_lib_log: QCVAQ6_deinit
02-20 23:08:36.897 10935 10935 D fastcv_lib_log: Begin of domain_channel_open cdsp_domain_handle=0x7e5a3cf020  value of cdsp_domain_handle=0
02-20 23:08:36.898 10935 10935 V ./my_application_sample: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/fastrpc_apps_user.c:1724: Successfully opened fastrpc_shell_3
02-20 23:08:36.920 10935 10935 V ./my_application_sample: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/fastrpc_apps_user.c:1870: Successfully created user PD on domain 3 (attrs 0x0)
02-20 23:08:37.047 10935 10935 V ./my_application_sample: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/fastrpc_apps_user.c:1029: remote_handle64_open: Successfully opened handle 0x5e228150 for file:///libfastcvdsp_skel.so?fastcvdsp_skel_handle_invoke&_modver=1.0&_dom=cdsp on domain 3
02-20 23:08:37.047 10935 10935 D fastcv_lib_log: Domain open is successful on CDSP. cdsp_domain_handle address=0x7e5a3cf020  cdsp_domain_handle value=542745198928
02-20 23:08:37.047 10935 10935 D fastcv_lib_log: End of domain_channel_open for CDSP
02-20 23:08:37.048 10935 10935 D fastcv_lib_log: In fcvQ6SessionInit : attrib.value=0
02-20 23:08:37.048 10935 10935 E fastcv_lib_log: Begin of fcvQ6SessionInit_internal dsp_handle=542745198928 22622 vendor/qcom/proprietary/fastcv-noship/src/qdsp_rpc/multi_domains/qcvaq6rpc_clnt_abstractionLayer.c
02-20 23:08:37.051 10935 10935 E fastcv_lib_log: Checking for fcvVersion  22629 vendor/qcom/proprietary/fastcv-noship/src/qdsp_rpc/multi_domains/qcvaq6rpc_clnt_abstractionLayer.c
02-20 23:08:37.051 10935 10935 D fastcv_lib_log: Q6 initialized successfully. Q6 FastCV functions mode 0 are enabled.
02-20 23:08:37.051 10935 10935 I fastcv_lib_log: FIT:(FeatureName=>QCVAQ6, Initialized=>1)
02-20 23:08:37.052 10935 10935 D fastcv_lib_log: Fastcv vendor library
02-20 23:08:37.052 10935 10935 D fastcv_lib_log: Fastcv vendor library
02-20 23:08:37.052 10935 10935 I fastcv_lib_log: QCVAQ6_deinit
02-20 23:08:37.052 10935 10935 D fastcv_lib_log: Begin of domain_channel_close cdsp_domain_handle=0x7e5a3cf020 cdsp_domain_handle=542745198928
02-20 23:08:37.060 10935 10937 D ./my_application_sample: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/fastrpc_apps_user.c:925: Error 0xffffffff: remote_handle_invoke failed for handle 0x3, method 4 on domain 3 (sc 0x4020200)
02-20 23:08:37.060 10935 10937 E ./my_application_sample: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/listener_android.c:244:listener protocol failure ffffffff
02-20 23:08:37.061 10935 10937 D ./my_application_sample: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/fastrpc_apps_user.c:925: Error 0x8000040d: remote_handle_invoke failed for handle 0x3, method 4 on domain 3 (sc 0x4020200)
02-20 23:08:37.061 10935 10937 E ./my_application_sample: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/listener_android.c:251::error: -2147482611: 0 == (nErr = __QAIC_HEADER(adsp_listener_next2)( ctx, nErr, 0, 0, &ctx, &handle, &sc, inBufs, inBufsLen, &inBufsLenReq))
02-20 23:08:37.061 10935 10937 E ./my_application_sample: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/listener_android.c:333:Error 0x8000040d: listener2 thread exited
02-20 23:08:37.065 10935 10937 D ./my_application_sample: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/fastrpc_apps_user.c:941: Error 0x8000040d: remote_handle64_invoke failed for handle 0x5e228150, method 3 on domain 3 (sc 0x3000000)
02-20 23:08:37.066 10935 10937 I chatty  : uid=0(root) my_application identical 2 lines
02-20 23:08:37.068 10935 10937 D ./my_application_sample: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/fastrpc_apps_user.c:941: Error 0x8000040d: remote_handle64_invoke failed for handle 0x5e228150, method 3 on domain 3 (sc 0x3000000)
02-20 23:08:37.070 10935 10938 E ./my_application_sample: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/log_config.c:319:Received exit.
02-20 23:08:37.098 10935 10935 D fastcv_lib_log: Succesfully closed channel for cdsp_domain_handle
02-20 23:08:37.098 10935 10935 D fastcv_lib_log: End of domain_channel_close for CDSP
02-20 23:08:37.098 10935 10935 D fastcv_lib_log: Begin of domain_channel_open cdsp_domain_handle=0x7e5a3cf020  value of cdsp_domain_handle=0
02-20 23:08:37.099 10935 10935 V ./my_application_sample: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/fastrpc_apps_user.c:1724: Successfully opened fastrpc_shell_3
02-20 23:08:37.124 10935 10935 V ./my_application_sample: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/fastrpc_apps_user.c:1870: Successfully created user PD on domain 3 (attrs 0x0)
02-20 23:08:37.253 10935 10935 V ./my_application_sample: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/fastrpc_apps_user.c:1029: remote_handle64_open: Successfully opened handle 0x5e2281b0 for file:///libfastcvdsp_skel.so?fastcvdsp_skel_handle_invoke&_modver=1.0&_dom=cdsp on domain 3
02-20 23:08:37.253 10935 10935 D fastcv_lib_log: Domain open is successful on CDSP. cdsp_domain_handle address=0x7e5a3cf020  cdsp_domain_handle value=542745199024
02-20 23:08:37.255 10935 10935 D fastcv_lib_log: End of domain_channel_open for CDSP
02-20 23:08:37.255 10935 10935 D fastcv_lib_log: In fcvQ6SessionInit : attrib.value=2
02-20 23:08:37.255 10935 10935 E fastcv_lib_log: Begin of fcvQ6SessionInit_internal dsp_handle=542745199024 22622 vendor/qcom/proprietary/fastcv-noship/src/qdsp_rpc/multi_domains/qcvaq6rpc_clnt_abstractionLayer.c
02-20 23:08:37.259 10935 10935 E fastcv_lib_log: Checking for fcvVersion  22629 vendor/qcom/proprietary/fastcv-noship/src/qdsp_rpc/multi_domains/qcvaq6rpc_clnt_abstractionLayer.c
02-20 23:08:37.259 10935 10935 D fastcv_lib_log: Q6 initialized successfully. Q6 FastCV functions mode 2 are enabled.
02-20 23:08:37.259 10935 10935 I fastcv_lib_log: FIT:(FeatureName=>QCVAQ6, Initialized=>1)
02-20 23:08:37.273 10905 10905 W ServiceManagement: Waited one second for [email protected]::ISecureElement/SIM1
02-20 23:08:37.277 10905 10905 I ServiceManagement: getService: Trying again for [email protected]::ISecureElement/SIM1...
02-20 23:08:37.391 10935 10935 D fastcv_lib_log: Fastcv vendor library
02-20 23:08:37.391 10935 10935 I fastcv_lib_log: QCVAQ6_deinit
02-20 23:08:37.391 10935 10935 D fastcv_lib_log: Begin of domain_channel_close cdsp_domain_handle=0x7e5a3cf020 cdsp_domain_handle=542745199024
02-20 23:08:37.400 10935 10939 D ./my_application_sample: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/fastrpc_apps_user.c:925: Error 0xffffffff: remote_handle_invoke failed for handle 0x3, method 4 on domain 3 (sc 0x4020200)
02-20 23:08:37.400 10935 10939 E ./my_application_sample: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/listener_android.c:244:listener protocol failure ffffffff
02-20 23:08:37.402 10935 10939 D ./my_application_sample: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/fastrpc_apps_user.c:925: Error 0x8000040d: remote_handle_invoke failed for handle 0x3, method 4 on domain 3 (sc 0x4020200)
02-20 23:08:37.402 10935 10939 E ./my_application_sample: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/listener_android.c:251::error: -2147482611: 0 == (nErr = __QAIC_HEADER(adsp_listener_next2)( ctx, nErr, 0, 0, &ctx, &handle, &sc, inBufs, inBufsLen, &inBufsLenReq))
02-20 23:08:37.403 10935 10939 E ./my_application_sample: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/listener_android.c:333:Error 0x8000040d: listener2 thread exited
02-20 23:08:37.408 10935 10939 D ./my_application_sample: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/fastrpc_apps_user.c:941: Error 0x8000040d: remote_handle64_invoke failed for handle 0x5e2281b0, method 3 on domain 3 (sc 0x3000000)
02-20 23:08:37.409 10935 10939 I chatty  : uid=0(root) my_application identical 2 lines
02-20 23:08:37.410 10935 10939 D ./my_application_sample: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/fastrpc_apps_user.c:941: Error 0x8000040d: remote_handle64_invoke failed for handle 0x5e2281b0, method 3 on domain 3 (sc 0x3000000)
02-20 23:08:37.413 10935 10940 E ./my_application_sample: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/log_config.c:319:Received exit.
02-20 23:08:37.438 10935 10935 D fastcv_lib_log: Succesfully closed channel for cdsp_domain_handle
02-20 23:08:37.438 10935 10935 D fastcv_lib_log: End of domain_channel_close for CDSP
02-20 23:08:37.438 10935 10935 D fastcv_lib_log: Begin of domain_channel_open cdsp_domain_handle=0x7e5a3cf020  value of cdsp_domain_handle=0
02-20 23:08:37.439 10935 10935 V ./my_application_sample: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/fastrpc_apps_user.c:1724: Successfully opened fastrpc_shell_3
02-20 23:08:37.468 10935 10935 V ./my_application_sample: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/fastrpc_apps_user.c:1870: Successfully created user PD on domain 3 (attrs 0x0)
02-20 23:08:37.594 10935 10935 V ./my_application_sample: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/fastrpc_apps_user.c:1029: remote_handle64_open: Successfully opened handle 0x56fec350 for file:///libfastcvdsp_skel.so?fastcvdsp_skel_handle_invoke&_modver=1.0&_dom=cdsp on domain 3
02-20 23:08:37.594 10935 10935 D fastcv_lib_log: Domain open is successful on CDSP. cdsp_domain_handle address=0x7e5a3cf020  cdsp_domain_handle value=542625416016
02-20 23:08:37.595 10935 10935 D fastcv_lib_log: End of domain_channel_open for CDSP
02-20 23:08:37.595 10935 10935 D fastcv_lib_log: In fcvQ6SessionInit : attrib.value=0
02-20 23:08:37.595 10935 10935 E fastcv_lib_log: Begin of fcvQ6SessionInit_internal dsp_handle=542625416016 22622 vendor/qcom/proprietary/fastcv-noship/src/qdsp_rpc/multi_domains/qcvaq6rpc_clnt_abstractionLayer.c
02-20 23:08:37.598 10935 10935 E fastcv_lib_log: Checking for fcvVersion  22629 vendor/qcom/proprietary/fastcv-noship/src/qdsp_rpc/multi_domains/qcvaq6rpc_clnt_abstractionLayer.c
02-20 23:08:37.598 10935 10935 D fastcv_lib_log: Q6 initialized successfully. Q6 FastCV functions mode 0 are enabled.
02-20 23:08:37.598 10935 10935 I fastcv_lib_log: FIT:(FeatureName=>QCVAQ6, Initialized=>1)
02-20 23:08:37.603 10935 10935 I my_application: read file sample_data/sample_color_rgb24_1232_1640_0.bin
02-20 23:08:37.679 10935 10935 I my_application: upscaling
02-20 23:08:37.681 10935 10935 F libc    : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x668 in tid 10935 (my_application), pid 10935 (my_application)
02-20 23:08:37.845 10948 10948 I crash_dump64: obtaining output fd from tombstoned, type: kDebuggerdTombstone
02-20 23:08:37.848  1147  1147 I /system/bin/tombstoned: received crash request for pid 10935
02-20 23:08:37.852 10948 10948 I crash_dump64: performing dump of process 10935 (target tid = 10935)
02-20 23:08:37.856 10948 10948 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
02-20 23:08:37.857 10948 10948 F DEBUG   : Build fingerprint: 'qti/msmnile/msmnile:9/PKQ1.190202.001/lnxbuild02201020:userdebug/test-keys'
02-20 23:08:37.857 10948 10948 F DEBUG   : Revision: '0'
02-20 23:08:37.857 10948 10948 F DEBUG   : ABI: 'arm64'
02-20 23:08:37.857 10948 10948 F DEBUG   : pid: 10935, tid: 10935, name: my_application  >>> ./my_application_sample <<<
02-20 23:08:37.857 10948 10948 F DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x668
02-20 23:08:37.857 10948 10948 F DEBUG   : Cause: null pointer dereference
02-20 23:08:37.857 10948 10948 F DEBUG   :     x0  0000007e5d800010  x1  0000000000000668  x2  00000000000004d0  x3  fffffffffffffff0
02-20 23:08:37.857 10948 10948 F DEBUG   :     x4  000000002da00008  x5  0000000000000c80  x6  00000000000004b0  x7  0000000000000002
02-20 23:08:37.857 10948 10948 F DEBUG   :     x8  000000002da00008  x9  00000000000004b0  x10 0000007e5d8009b0  x11 00000000000004c8
02-20 23:08:37.857 10948 10948 F DEBUG   :     x12 0000000000000000  x13 0000000000000000  x14 0000000000000000  x15 0000000000000000
02-20 23:08:37.858 10948 10948 F DEBUG   :     x16 00000000000004c8  x17 0000000000000c80  x18 0000000000000668  x19 0000000000000960
02-20 23:08:37.858 10948 10948 F DEBUG   :     x20 00000000000004b0  x21 0000000000000000  x22 0000000000000002  x23 0000000000000c90
02-20 23:08:37.858 10948 10948 F DEBUG   :     x24 0000007e5d800020  x25 0000000000007fff  x26 00000000ffff8000  x27 0000000000000000
02-20 23:08:37.858 10948 10948 F DEBUG   :     x28 0000000000000000  x29 000000000000009a
02-20 23:08:37.858 10948 10948 F DEBUG   :     sp  0000007ff33b3010  lr  0000000000000000  pc  0000005c7f063044
02-20 23:08:37.849 10948 10948 I crash_dump64: type=1400 audit(0.0:3408): avc: denied { read } for name="my_application_sample" dev="dm-0" ino=1049364 scontext=u:r:crash_dump:s0 tcontext=u:object_r:shell_data_file:s0 tclass=file permissive=1
02-20 23:08:37.849 10948 10948 I crash_dump64: type=1400 audit(0.0:3409): avc: denied { open } for path="/data/local/tmp/work/my_application_sample" dev="dm-0" ino=1049364 scontext=u:r:crash_dump:s0 tcontext=u:object_r:shell_data_file:s0 tclass=file permissive=1
02-20 23:08:37.849 10948 10948 I crash_dump64: type=1400 audit(0.0:3410): avc: denied { getattr } for path="/data/local/tmp/work/my_application_sample" dev="dm-0" ino=1049364 scontext=u:r:crash_dump:s0 tcontext=u:object_r:shell_data_file:s0 tclass=file permissive=1
02-20 23:08:37.849 10948 10948 I crash_dump64: type=1400 audit(0.0:3411): avc: denied { map } for path="/data/local/tmp/work/my_application_sample" dev="dm-0" ino=1049364 scontext=u:r:crash_dump:s0 tcontext=u:object_r:shell_data_file:s0 tclass=file permissive=1
02-20 23:08:37.860 10948 10948 F DEBUG   :
02-20 23:08:37.860 10948 10948 F DEBUG   : backtrace:
02-20 23:08:37.860 10948 10948 F DEBUG   :     #00 pc 000000000025b044  /data/local/tmp/work/my_application_sample (fcvV3w+4356)

 



 

 

 

  • Up0
  • Down0
jeff4s Moderator
Join Date: 4 Nov 12
Posts: 106
Posted: Thu, 2021-06-24 11:38

 

can you try using fcvMemInit & fcvMemDeinit , like given in the following sequence? 

//initalize 

fcvSetOperationMode(FASTCV_OP_PERFORMANCE);  // use desired mode here. 

fcvMemInit(); 

//allocate buffers 

fcvMemAlloc(..);

// Call scale and other api's of interest

fcvScaleu8(..);

 

// tear down

fcvMemFree (..);

fcvMemDeInit();

fcvCleanUp();

  • Up0
  • Down0
qjv001
Join Date: 7 Sep 12
Location: Chicago, IL
Posts: 3
Posted: Fri, 2021-09-24 09:00

I see a similar crash on 8250 when using anything other than FASTCV_OP_CPU_PERFORMANCE.

I also tried a similar init/deinit flow but to no avail. I was trying to run this in an app (NDK).

fcvSetOperationMode(FASTCV_OP_PERFORMANCE);  // use desired mode here. 

fcvMemInit(); 

fcvMemAlloc(..);

my ops.:
fcvScaleu8_v2 & fcvBoxFilter3x3u8_v2

fcvMemFree (..);

fcvMemDeInit();

fcvCleanUp();

 

  • 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.