PdhAddCounterW() failed: unknown error when starting a demo - openvino

I followed instructions on https://docs.openvino.ai/latest/omz_demos.html#doxid-omz-demos.
I finished the setup/installation, downloaded the needed models with the omz_download tool and tried to start the interactive demo:
interactive_face_detection_demo ^ --loop ^ -m "C:\Intel\face-detection-adas-0001\FP16\face-detection-adas-0001.xml"
[ INFO ] version: 2022.1.0
[ INFO ] build: 2022.1.0-7019-cdb9bec7210-releases/2022/1
[ INFO ] Reading model: C:\Intel\face-detection-adas-0001\FP16\face-detection-adas-0001.xml
[ INFO ] Model name: mobilenet_ssd_672x384
[ INFO ] Inputs:
[ INFO ] data, f32, {1,3,384,672}, [N,C,H,W]
[ INFO ] Outputs:
[ INFO ] detection_out, f32, {1,1,200,7}, [...]
[ INFO ] The model C:\Intel\face-detection-adas-0001\FP16\face-detection-adas-0001.xml is loaded to CPU
[ INFO ] Device: CPU
[ INFO ] Number of streams: 1
[ INFO ] Number of threads: AUTO
[ ERROR ] PdhAddCounterW() failed: unknown error
How can I get more information about that error / is this a problem with my setup?
(I was able to get everything running on another machine)
System information:
Systemmodell Surface Pro 4
Betriebsystemname Microsoft Windows 10 Pro
Version 10.0.19043 Build 19043
Prozessor Intel(R) Core(TM) i5-6300U CPU # 2.40GHz, 2496 MHz, 2 Kern(e), 4 logische(r) Prozessor(en)
RAM: 4GB
openvino_2022.1.0.643
4.5.5-90-gc3d60a6ca (OpenVINO/2022.1)
Visual Studio 16 2019

Your error appears to be related to Windows performance-counter-API and this error is not related to OpenVINO. For more information about PdhAddCounterW(), you can refer to PdhAddCounterW function (pdh.h).
On another note, try specifying input to the demo as it requires an input to process. Here is an example command:
interactive_face_detection_demo -m "C:\Intel\face-detection-adas-0001\FP16\face-detection-adas-0001.xml" -i <path_to_video>\<input_video>.mp4

Related

How to Diagnose Weatherreport from CouchDB

After building CouchDB from github. I run weatherreport as recommended in documentation to get the following error. How do you diagnose exactly whats going wrong? This seems like a bunch of random numbers
17:38:27 WARN: 'escriptize' command does not apply to directory /home/test/workspace/CouchDB-ant_rhel/couchdb
17:38:27 [ * ] Setup environment ... ok
17:38:27 [ * ] Ensure CouchDB is built ... ok
17:38:27 [ * ] Ensure Erlang boot script exists ... ok
17:38:27 [ * ] Prepare configuration files ... ok
17:38:27 [ * ] Start node node1 ... ok
17:38:28 [ * ] Check node at http://127.0.0.1:15984/ ... ok
17:38:28 [ * ] Running cluster setup ... ok
17:38:30 [ * ] Exec command bin/weatherreport --etc dev/lib/node1/etc --level error ... ['node1_diag35200#127.0.0.1'] [crit] Bad rpc call executing check weatherreport_check_memory_use: {'EXIT',{badarg,[{erlang,list_to_float,[[101]],[{error_info,#{module => erl_erts_errors}}]},{weatherreport_util,binary_to_float,1,[{file,[115,114,99,47,119,101,97,116,104,101,114,114,101,112,111,114,116,95,117,116,105,108,46,101,114,108]},{line,80}]},{weatherreport_check_memory_use,check,1,[{file,[115,114,99,47,119,101,97,116,104,101,114,114,101,112,111,114,116,95,99,104,101,99,107,95,109,101,109,111,114,121,95,117,115,101,46,101,114,108]},{line,56}]},{weatherreport_check,check,2,[{file,[115,114,99,47,119,101,97,116,104,101,114,114,101,112,111,114,116,95,99,104,101,99,107,46,101,114,108]},{line,81}]},{weatherreport_runner,'-run/2-fun-0-',2,[{file,[115,114,99,47,119,101,97,116,104,101,114,114,101,112,111,114,116,95,114,117,110,110,101,114,46,101,114,108]},{line,54}]},{erlang,apply,2,[]}]}}

feature 'postinstall' required for "adu-swupdate.sh" in sw-description is absent

I am currently working on Azure Device Update using layers meta-azure-device-update and meta-swupdate. I want to run a post-install script. I have followed sources mentioned below:
1.sw-description.rst
https://git.rigado.com/vesta/swupdate/-/blob/acf50e361a8752db48e69ffe3c20a167c402d35f/doc/source/sw-description.rst#board-specific-settings
2.adu-swupdate.sh
https://github.com/Azure/iot-hub-device-update/blob/main/src/adu-shell/scripts/adu-swupdate.sh
The image was built successfully and I was able to locate adu-swupdate.sh in .swu file which I provided Azure Device Update. The install failed giving below mentioned error:
Sep 21 07:21:30 rpi AducIotAgent[281]: -> 07:21:29 PUBLISH | IS_DUP: false | RETAIN: 0 | QOS: DELIVER_AT_MOST_ONCE | TOPIC_NAME: $iothub/twin2021-09-21T07:21:30.2396Z [E] Install failed, extendedResultCode = 1 [Install]
Sep 21 07:21:30 rpi AducIotAgent[281]: 2021-09-21T07:21:30.2398Z [E] Install failed. error 0, 1 - Expecting service to send Cancel action [ADUC_Workflow_WorkCompletionCallback]
The sw-update log is as given below:
Swupdate v2021.04.0
Licensed under GPLv2. See source distribution for detailed copyright notices.
[INFO ] : SWUPDATE running : [main] : Running on raspberrypi4 Revision 1.0
[INFO ] : SWUPDATE running : [print_registered_handlers] : Registered handlers:
[INFO ] : SWUPDATE running : [print_registered_handlers] : dummy
[INFO ] : SWUPDATE running : [print_registered_handlers] : archive
[INFO ] : SWUPDATE running : [print_registered_handlers] : tar
[INFO ] : SWUPDATE running : [print_registered_handlers] : uboot
[INFO ] : SWUPDATE running : [print_registered_handlers] : bootloader
[INFO ] : SWUPDATE running : [print_registered_handlers] : raw
[INFO ] : SWUPDATE running : [print_registered_handlers] : rawfile
[INFO ] : SWUPDATE running : [print_registered_handlers] : rawcopy
[INFO ] : SWUPDATE running : [main] : software set: stable mode: copy2
[TRACE] : SWUPDATE running : [listener_create] : creating socket at /tmp/swupdateprog
[TRACE] : SWUPDATE running : [network_initializer] : Main loop daemon
[TRACE] : SWUPDATE running : [listener_create] : creating socket at /tmp/sockinstctrl
[TRACE] : SWUPDATE running : [network_thread] : Incoming network request: processing...
[INFO ] : SWUPDATE started : Software Update started !
[TRACE] : SWUPDATE running : [network_initializer] : Software update started
[WARN ] : SWUPDATE running : [scan_mtd_devices] : MTD is not present on the target
[TRACE] : SWUPDATE running : [extract_file_to_tmp] : Found file
[TRACE] : SWUPDATE running : [extract_file_to_tmp] : filename sw-description
[TRACE] : SWUPDATE running : [extract_file_to_tmp] : size 1144
[TRACE] : SWUPDATE running : [extract_file_to_tmp] : Found file
[TRACE] : SWUPDATE running : [extract_file_to_tmp] : filename sw-description.sig
[TRACE] : SWUPDATE running : [extract_file_to_tmp] : size 256
[TRACE] : SWUPDATE running : [swupdate_verify_file] : Verify signed image: Read 1144 bytes
[TRACE] : SWUPDATE running : [swupdate_verify_file] : Verified OK
[TRACE] : SWUPDATE running : [get_common_fields] : Version 0.1.0.1
[TRACE] : SWUPDATE running : [parse_hw_compatibility] : Accepted Hw Revision : 1.0
[TRACE] : SWUPDATE running : [_parse_images] : Found compressed Image: core-image-base-raspberrypi4.ext4.gz in device : /dev/mmcblk0p3 for handler raw
[TRACE] : SWUPDATE running : [_parse_scripts] : Found Script: adu-swupdate.sh
[ERROR] : SWUPDATE failed [0] ERROR : feature 'postinstall' required for 'adu-swupdate.sh' in sw-description is absent!
[ERROR] : SWUPDATE failed [0] ERROR : Compatible SW not found
[ERROR] : SWUPDATE failed [1] Image invalid or corrupted. Not installing ...
[TRACE] : SWUPDATE running : [network_initializer] : Main thread sleep again !
[INFO ] : No SWUPDATE running : Waiting for requests...
[INFO ] : SWUPDATE running : [endupdate] : Swupdate *failed* !```
So, After hours of exploration and reading each page of SW-UPDATE Wiki, I figured out that there are handlers for each function which we must enable before using it.
you can read more about them here. https://sbabic.github.io/swupdate/handlers.html
These handlers are available in the meta-swupdate/recipes-support/swupdate/defconfig
#
# Automatically generated file; DO NOT EDIT.
# Swupdate Configuration
#
CONFIG_HAVE_DOT_CONFIG=y
#
# Swupdate Settings
#
#
# General Configuration
#
# CONFIG_CURL is not set
# CONFIG_CURL_SSL is not set
# CONFIG_SYSTEMD is not set
CONFIG_DEFAULT_CONFIG_FILE="/etc/swupdate.cfg"
CONFIG_SCRIPTS=y
CONFIG_HW_COMPATIBILITY=y
CONFIG_HW_COMPATIBILITY_FILE="/etc/hwrevision"
CONFIG_SW_VERSIONS_FILE="/etc/sw-versions"
#
# Socket Paths
#
CONFIG_SOCKET_CTRL_PATH=""
CONFIG_SOCKET_PROGRESS_PATH=""
CONFIG_SOCKET_REMOTE_HANDLER_DIRECTORY="/tmp/"
CONFIG_MTD=y
CONFIG_LUA=y
CONFIG_LUAPKG="lua"
# CONFIG_FEATURE_SYSLOG is not set
#
# Build Options
#
CONFIG_CROSS_COMPILE=""
CONFIG_SYSROOT=""
CONFIG_EXTRA_LDLIBS=""
#
# Debugging Options
#
# CONFIG_DEBUG is not set
# CONFIG_WERROR is not set
# CONFIG_NOCLEANUP is not set
# CONFIG_BOOTLOADER_EBG is not set
CONFIG_UBOOT=y
# CONFIG_BOOTLOADER_NONE is not set
# CONFIG_BOOTLOADER_GRUB is not set
CONFIG_UBOOT_FWENV="/etc/fw_env.config"
CONFIG_UBOOT_DEFAULTENV="/etc/u-boot-initial-env"
# CONFIG_SSL_IMPL_NONE is not set
CONFIG_SSL_IMPL_OPENSSL=y
# CONFIG_SSL_IMPL_MBEDTLS is not set
# CONFIG_DOWNLOAD is not set
# CONFIG_HASH_VERIFY is not set
# CONFIG_SIGNED_IMAGES is not set
# CONFIG_ENCRYPTED_IMAGES is not set
# CONFIG_SURICATTA is not set
CONFIG_WEBSERVER=y
CONFIG_MONGOOSE=y
CONFIG_MONGOOSEIPV6=y
CONFIG_MONGOOSESSL=y
CONFIG_GUNZIP=y
# CONFIG_ZSTD is not set
#
# Parser Features
#
CONFIG_LIBCONFIG=y
CONFIG_PARSERROOT=""
# CONFIG_JSON is not set
# CONFIG_LUAEXTERNAL is not set
# CONFIG_SETSWDESCRIPTION is not set
#
# Image Handlers
#
# CONFIG_UBIVOL is not set
CONFIG_CFI=y
# CONFIG_CFIHAMMING1 is not set
# CONFIG_DISKPART is not set
CONFIG_RAW=y
# CONFIG_RDIFFHANDLER is not set
CONFIG_LUASCRIPTHANDLER=y
CONFIG_SHELLSCRIPTHANDLER=y
# CONFIG_HANDLER_IN_LUA is not set
# CONFIG_ARCHIVE is not set
# CONFIG_REMOTE_HANDLER is not set
# CONFIG_SWUFORWARDER_HANDLER is not set
# CONFIG_BOOTLOADERHANDLER is not set
# CONFIG_SSBLSWITCH is not set
# CONFIG_UCFWHANDLER is not set
So to enable post and preinstall script feature you should edit this defconfig file at
CONFIG_SHELLSCRIPTHANDLER=y
This will enable the post and preinstall script feature for your swupdate.

Mongod is not a service | Ubuntu | WSL. Error: mongod: unrecognized service

I'm using WSL2 with Ubuntu 20.04.2 LTS. I tried setting up mongodb. There are two issues:
Running the command sudo apt-get install -y mongodb-org results in the error below.
Errors were encountered while processing:
/tmp/apt-dpkg-install-NtCqHi/1-mongodb-org-server_4.4.4_amd64.deb
/tmp/apt-dpkg-install-NtCqHi/2-mongodb-org-mongos_4.4.4_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Although the command mongod --version results in:
db version v3.6.8
git version: 8e540c0b6db93ce994cc548f000900bdc740f80a
OpenSSL version: OpenSSL 1.1.1f 31 Mar 2020
allocator: tcmalloc
modules: none
build environment:
distarch: x86_64
target_arch: x86_64
which is not the latest, even though I installed the latest community version.
running sudo service mongod start shows the following error:
mongod: unrecognized service
the list of available services currently in the system are:
sudo service --status-all
[ - ] apparmor
[ ? ] apport
[ - ] atd
[ - ] console-setup.sh
[ - ] cron
[ ? ] cryptdisks
[ ? ] cryptdisks-early
[ - ] dbus
[ ? ] hwclock.sh
[ + ] irqbalance
[ - ] iscsid
[ - ] keyboard-setup.sh
[ ? ] kmod
[ - ] lvm2
[ - ] lvm2-lvmpolld
[ - ] multipath-tools
[ + ] open-iscsi
[ - ] open-vm-tools
[ ? ] plymouth
[ ? ] plymouth-log
[ - ] postgresql
[ - ] procps
[ + ] redis-server
[ - ] rsync
[ - ] rsyslog
[ - ] screen-cleanup
[ - ] ssh
[ - ] sysstat
[ - ] udev
[ - ] ufw
[ - ] unattended-upgrades
[ - ] uuidd
[ - ] x11-common
This works for me:
sudo apt-get update
sudo apt-get install mongodb
sudo service mongodb start
:: My setup: [win10, wsl2]

Android O porting

I am trying to port android O to my device but encountering issue due to vendor partition not being created (which is mandatory for Android O), as a result the SELinux policy is not being fetched and boot process is being terminated. How can I create a vendor partition to flash the vendor image into.
my device runs on a Qualcomm msm8953 SOC.
below are the boot logs.
309800] nq-nci 5-0028: nqx_probe: probing nqxx failed, check hardware
[ 7.317273] Freeing unused kernel memory: 1196K
[ 7.321143] Freeing alternatives memory: 112K
[ 7.329257] init: init first stage started!
[ 7.332716] init: Using Android DT directory /proc/device-tree/firmware/android/
[ 7.724741] init: bool android::init::FirstStageMount::InitRequiredDevices(): partition(s) not found in /sys, waiting for their uevent(s): vendor
[ 8.878132] of_batterydata_get_best_profile: 2951034_foxda_ef501esp_3000mah_averaged_masterslave_jun6th2017 found
[ 8.894872] FG: fg_batt_profile_init: Battery SOC: 97, V: 4249242uV
[ 8.900528] of_batterydata_get_best_profile: 2951034_foxda_ef501esp_3000mah_averaged_masterslave_jun6th2017 found
[ 8.910371] SMBCHG: smbchg_config_chg_battery_type: Vfloat changed from 4400mV to 4350mV for battery-type 2951034_foxda_ef501esp_3000mah_averaged_masterslave_jun6th2017
[ 17.746065] init: Wait for partitions returned after 10009ms
[ 17.750729] init: bool android::init::FirstStageMount::InitRequiredDevices(): partition(s) not found after polling timeout: vendor
[ 17.768123] init: Failed to mount required partitions early ...
[ 17.773010] init: panic: rebooting to bootloader
[ 17.777611] init: Reboot start, reason: reboot, rebootTarget: bootloader
[ 17.784364] init: android::WriteStringToFile open failed: No such file or directory
[ 17.791947] init: Shutdown timeout: 0 ms
[ 17.795852] init: property_set("persist.vendor.crash.detect", "false") failed: __system_property_add failed
[ 17.805838] init: waitid failed: No child processes
[ 17.810437] init: vold not running, skipping vold shutdown
[ 17.916293] init: powerctl_shutdown_time_ms:138:0
[ 17.919991] init: Reboot ending, jumping to kernel
[ 17.924752] msm_thermal:msm_thermal_update_freq Freq mitigation task is not initialized
[ 17.978348] mdss_fb_release_all: try to close unopened fb 1! from pid:1 name:init
[ 17.984816] mdss_fb_release_all: try to close unopened fb 0! from pid:1 name:init
[ 17.993627] reboot: Restarting system with command 'bootloader'
[ 17.998538] Going down for restart now
[ 18.002831] qcom,qpnp-power-on qpnp-power-on-12: PMIC#SID2: configuring PON for reset
I am encountering this myself and I believe it has to do with a mix of incomplete defconfig and dm-verity in the SoC's dts. Unless you have worked it out by now.
In particular to incomplete defconfig, I had to add options like CONFIG_PINCTRL_MSM8937=y as my android device is technically a 8937. Also, in arch/arm/boot/dts/qcom/msm8937.dtsi I needed to pull the verify flag from fsmgr_flags.
I now have other issues, but I am getting closer to booting.

Javacard scriptgen

I try to use the oracle java card development kit 3.0.5u2 command line tools.
I use the cap file generated by netbeans
I use verifycap.bat on my cap together with the export files in the api_export_files directory of the sdk.
verifycap.bat -nobanner -nowarn ..\api_export_files\javacard\framework\javacard\framework.exp ..\api_export_files\javacard\security\javacard\security.exp ..\api_export_files\java\lang\javacard\lang.exp kaylat.cap > kaylat.hash
I get a hash file with this content:
[ INFO: ] [v3.0.5] Off-Card Verifier, Version {1}.
[ INFO: ] Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
[ INFO: ] VĂ©rification du fichier CAP kaylat.cap
[ INFO: ] Hash for kaylat/javacard/ConstantPool.cap [SHA-256: ad9ece95c64174d87b92488213081d1f977c975ba116fd7dead60246a1a94099]
[ INFO: ] Hash for kaylat/javacard/StaticField.cap [SHA-256: 5863e9740af5fb905922380b2aa88309a16a285dd3412417ae8af941327901ee]
[ INFO: ] Hash for kaylat/javacard/Descriptor.cap [SHA-256: 957c5fd5ebee857a06b38129d5b94b3a0bf155d989c6db4080bc8f0ec2c26606]
[ INFO: ] Hash for kaylat/javacard/Header.cap [SHA-256: 67802c08d73cee2e77947b76dd5f5f728055fec8c9ab4820369b18f845bb4eab]
[ INFO: ] Hash for kaylat/javacard/Directory.cap [SHA-256: 803ba29574f2013b4dc895253afaf0bc8376deb1110eb35ee90c6e6807b70a59]
[ INFO: ] Hash for kaylat/javacard/Applet.cap [SHA-256: 17b671b4e2371e00eea2717f84cb016baa818a92c46687e25b5392023a071229]
[ INFO: ] Hash for kaylat/javacard/Method.cap [SHA-256: 9e7dd02202e95de04a33fd812f1ab38cf5554ee1ee3c0d982d31140c1313f97f]
[ INFO: ] Hash for kaylat/javacard/Class.cap [SHA-256: f788cc84d355e9a2cda8432c6af815aad6ed5574b5246641122158167850c6dc]
[ INFO: ] Hash for kaylat/javacard/RefLocation.cap [SHA-256: 16e7d9445917130b643bee62728b460c37511ce12b5c65c7653f9f75b8fa5df6]
[ INFO: ] Hash for kaylat/javacard/Import.cap [SHA-256: ce4ee9399ef89f122c68620d0330239a0f40a178992aae6c60fdf02caa492817]
[ INFO: ] 0 warnings and 0 errors.
I run scriptgen.bat:
scriptgen.bat kaylat.cap -hashfile kaylat.hash
This command fails with message:
Missing hash for required component: header.cap
Instead of redirecting the output of verifycap.bat to a file ("> kaylat.hash"), you should probably use the program option "-outfile <file-name>", which will write the digest values in the correct format to the file. Then use this file for input to scriptgen.bat.
If I use the console output of the program as input to the scriptgen.bat, I get the same error. If I use the -outfile option, all works fine.
C:\verifycap.bat
[ INFO: ] Usage: verifycap [options] <export files> <CAP file>
(or)
verifycap <-C | --commandoptionsfile> <command options file>
Where options include:
-digest <alg-name> specify the digest to use (default: SHA-256)
-help Print this message and exit.
-nobanner Suppress banner message.
-nowarn Suppress warning messages.
-outfile <file-name> Specify the name of the output file to store digest (default: no output file created)
-package <pkg> Set the name of the package to be verified
-verbose Turn on verbose mode.
-version Print version number and exit.

Resources